Skip to content

[#785] add support for new irods authentication scheme - #844

Open
PierreV23 wants to merge 1 commit into
irods:mainfrom
PierreV23:irods-auth-scheme
Open

PierreV23 wants to merge 1 commit into
irods:mainfrom
PierreV23:irods-auth-scheme

Conversation

@PierreV23

Copy link
Copy Markdown

iRODS 5.1.0 added a new scheme called irods, which is like native but supports token based auth

Here is a simplified example of how this new scheme would be used:

import irods.auth
from irods.session import iRODSSession

# first auth with password
token = []
with iRODSSession(..., password="<password>", authentication_scheme="irods") as ses:
    ses.set_auth_option_for_scheme("irods", irods.auth.CLIENT_GET_REQUEST_RESULT, token)
    ses.collections.get("/tempZone/home/<user>")

# second auth with just token
with iRODSSession(..., authentication_scheme="irods") as ses:
    ses.set_auth_option_for_scheme("irods", "session_token", token[0])
    ses.collections.get("/tempZone/home/<user>")

password_storage_mode needs to be set properly on the irods server, this can't be done via the server_config but it can be done via the CLI:iadmin set_grid_configuration authentication password_storage_mode both. both means both native and irods auth schemes can be used.

After setting this setting to both, the passwords of existing users need to be reset: iadmin moduser <user> password <password>

The other password_storage_mode options are legacy (for just the native scheme) and hashed (for just the irods scheme), again changing storage mode only affects passwords set afterwards. By default it's legacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant