You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[#785] add support for new irods authentication scheme - #844
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:
importirods.authfromirods.sessionimportiRODSSession# first auth with passwordtoken= []
withiRODSSession(..., password="<password>", authentication_scheme="irods") asses:
ses.set_auth_option_for_scheme("irods", irods.auth.CLIENT_GET_REQUEST_RESULT, token)
ses.collections.get("/tempZone/home/<user>")
# second auth with just tokenwithiRODSSession(..., authentication_scheme="irods") asses:
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iRODS 5.1.0 added a new scheme called
irods, which is likenativebut supports token based authHere is a simplified example of how this new scheme would be used:
password_storage_modeneeds 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.bothmeans bothnativeandirodsauth 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_modeoptions arelegacy(for just thenativescheme) andhashed(for just theirodsscheme), again changing storage mode only affects passwords set afterwards. By default it'slegacy.