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.

@trel
trel requested a review from d-w-moore November 3, 2026 14:29
@trel

trel commented Nov 3, 2026

Copy link
Copy Markdown
Member

Thanks for the work. We'll review.

We'll need some passing tests to exist before merging. You don't have to provide those, but it could move the process along faster if you wanted to take a swing at it.

Are you already using this code somewhere?

@PierreV23

Copy link
Copy Markdown
Author

Thanks for the work. We'll review.

We'll need some passing tests to exist before merging. You don't have to provide those, but it could move the process along faster if you wanted to take a swing at it.

Are you already using this code somewhere?

Yes I'm using it within a codebase of mine, but that code isn't public yet. I do have the following script I used to test my PRC (python-irodsclient) branch:
RPC_5-1-0_test.py

I run it with uv run RPC_5-1-0_test.py, uv automatically downloads PRC with the state of this current PR. The host, certfile, logins and possibly other settings do need to be changed to reflect local dev setup

I am not familiar with the PRC test suite, but hopefully the above can be of help.

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.

2 participants