-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New OIDC ESCAPE auth driver. #2217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed I posted a couple of technical comments, and I put here what I mentioned by email:
What was assumed for the integration with ESCAPE for now was higher-level mapping from ESCAPE "groups" to Reva users, rather than a 1-on-1 mapping from ESCAPE "sub" ids to Reva users. The group mapping would allow for a more flexible authorization scheme IMHO, whereas obviously the 1-on-1 mapping allows for a fully fine-grained mapping.
If anything, both could be supported in the code, and then it's up to sites to manage the mapping. The experience with WLCG so far has shown the value of group mapping, following this kind of scheme:
And even this is to be further developed/thought through because a user may belong to multiple groups, and it is not clear which one of many - potentially conflicting, as in the above example - mappings the system should pick. We could perhaps introduce a priority
flag in the above to sort the entries.
Concerning merger of oidc & oidcmappingI want have something clear: if mapping is unsuccessful, either because no mapping is found or a mapping file is not configured, should we then default to 'bare' oidc ? |
This to me is a "user" condition and we should default to bare OIDC.
This instead is a "service" error, i.e. caused by misconfiguration by the service manager. In that case I would actually fail the init phase so that revad cannot even start. Makes sense? |
Yes |
Refactor names towards general oidc mapping
Fix return error
Error message edited
Prevent service startup when multiple mappings for a single group exist in mappings file. Return permission denied in case of mapping failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all right to me. As discussed, let's merge (will re-check with Hugo) so we go ahead with tests - this is not touching any production deployment so it's totally safe to merge.
Following developments in Reva (cs3org/reva#2217), the same token can and shall be used regardless if Reva is a source or a destination or both. Yet, it depends on the user and for now we still get it from the system environment via getenv.
This allows for authentication via the ESCAPE IAM service.
The IAM account group must be mapped to a reva user in a json file where the IAM group name is linked to the reva user through the username.
Example of this file:
For authentication you must have a valid IAM access token. As an example we can do a login using an access token obtained from the IAM service (use a token tool) and use that as the secret. Leave username empty and use the token as password:
Here the IAM 'Test-100 User' test user is mapped by one of its groups to the reva 'einstein' test user. From hereon you can start sharing etc. as usual.
Regarding mapping:
The IAM user may be a member of multiple groups. If more than one groups are mapped each to a different reva user authentication can not take place because we currently have no mechanism to decide in that case which reva user to use.