geosolutions-it / ckanext-provbz-auth

SPID authentication for prov BZ
Other
0 stars 1 forks source link

Update authentication mechanism #5

Open etj opened 1 month ago

etj commented 1 month ago

Auth has changed from shibboleth to something similar to a propritary API.

Link to docs: https://servicemanual.services.siag.it/#/nuts-and-bolts/user-authentication/?id=ssocivisbzit Swagger: https://sso.civis.bz.it/swagger/index.html

Sample login procedure

Step1: call to /api/Auth/Login

Params:

Step 2: authentication

image

After the login you'll get the auth token, e.g. ?token=iromuzdn28uudjozimc2olxhxdv5hnigzh34eju9vi3hiqgcod92fckjhu8sicbu

Using the token you can

At the end of the session call /api/Auth/Logout

The auth server has a host whitelist for the hosts that needs to use the auth services. localhost is always whitelisted, for all the other hosts we'll need to ask whitelisting for the domains calling sso.civis.bz.it

etj commented 1 month ago

There are 2 kinds of users:

External users need also to be created internally in CKAN, because many objects have a foreign key toward an user object; anyway an external user should not be able to log in via username/password using CKAN default auth mechanism.

The external system authentication is called via its own procedure. Full login procedure for CKAN system.

From now on the SSO system is not needed anymore, if not for logging out the user when requested. All the session info should be retained in CKAN as per a "normal" login, since the session is bound to a user internally stored.

Gpetrak commented 4 weeks ago

Thank you @etj for the detailed description of the issue. The related PR can be found here .