Hi,
I'm trying to configure a GN4 instance with an external CAS service.
By reading the doc <https://geonetwork-opensource.org/manuals/4.0.x/en/administrator-guide/managing-users-and-groups/authentication-mode.html#configuring-cas>, to configure the CAS + database service , I understand I have to
* uncomment config-security-cas.xml and
config-security-cas-dabatase.xml lines in
config-security/config-security.xml
* configure the cas variables in
config-security/config-security.properties
And this should be enough, right ?
And I understand that what I would get would be:
* clicking the login button should redirect to CAS authentication
* authentication is checked against CAS
* user, if authenticated, would be created (if necessary) in the GN
database and considered as logged in
Instead, I'm getting only partially working behaviour:
* If I click on the GN login button and provide my credentials,
there's no error, but I don't get logged in. I'm redirected to
catalog.search, but in the GET parameters, I'm seeing a lot of
stuff, including my password...
* If the user does not exist yet in the GN DB and is not logged in,
when asking for a restricted page,
o I'm forwarded to the CAS login page
o when I log in, I'm getting a 401 unauthorized response (path is
http://localhost:8080/geonetwork/login/cas?ticket=ST-108-MwaS2nSBKVvj4AJXGdLN-dsiinpn)
* If the user was previously created in the GN DB and is not logged
it, when asking for a restricted page,
o I'm forwarded to the CAS login page
o when I've provided my credentials, I appear logged in, but I'm
not forwarded to the required page, but rather to the home page
So to sum up, it seems that the GN login button does not take the CAS configuration into account, which is quite unfortunate. And GN seems not to be creating authorized users automatically. It seems to me quite unfortunate too.
Have I missed something ? Is it expected behaviour for CAS + database config ?
thanks,
Jean
--
*Jean Pommier -- pi-Geosolutions*
Ingénieur, consultant indépendant
Tél. : (+33) 6 09 23 21 36
E-mail : jp@anonymised.com
Web : www.pi-geosolutions.fr