Australian-Imaging-Service / xnat-openid-auth-plugin

GNU General Public License v3.0
3 stars 1 forks source link

AIS 1.0 XNAT updates needed to migrate to upstream openid plugin #8

Open markendr opened 2 years ago

markendr commented 2 years ago

Migration to the upstream code base at https://bitbucket.org/xnatx/openid-auth-plugin requires the following updates to existing AIS 1.0 deployments using the openid plugin with AAF:

Add the usernamePattern property to the openid-auth.properties file

The username format was hard-coded in the AIS 1.0 version of the plugin. The following property needs to be added to the $xnat_home/config/auth/openid-provider.properties file for deployments using AAF

openid.aaf.usernamePattern=[providerId]_[sub]

Correct auth_method and auth_method_id entries in the xhbm_xdat_user_auth table for any existing users

The following PSQL query shows entries for AAF users in the Postgres database. Incorrect entries will have auth_method and auth_method_id set to "localdb" and NULL.

select * from public.xhbm_xdat_user_auth where xdat_username like 'aaf_%';

The following PSQL query can be used to correct the issue:

update public.xhbm_xdat_user_auth set auth_method = 'openid', auth_method_id = 'aaf'
    where xdat_username like 'aaf_%' and auth_method = 'localdb';