Skip to content
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

Seamless auth flow #92

Merged
merged 12 commits into from
Feb 12, 2025
Merged

Seamless auth flow #92

merged 12 commits into from
Feb 12, 2025

Conversation

dkj
Copy link
Member

@dkj dkj commented Jan 20, 2025

On top of #91
Try login, if OIDC enabled and user not logged in, on being asked to access data requiring auth. Return attempted data automatically following login (if authz ok).

Expect rebasing/ force pushes of this branch

dkj added 7 commits January 14, 2025 19:08
Use the go-irodsclient ListGroupUsers function to do user's zone aware checking of group membership by using and simplifying (and possibly) correcting Sqyrrl's UserInGroup function.
Zone is not relevant to the logic here. Now check the ACL "UserType" is a group.
@dkj dkj force-pushed the seamless_auth_flow branch from bf0c225 to 59b4fd4 Compare January 20, 2025 12:29
dkj and others added 5 commits February 11, 2025 21:12
Reduce log statement verbosity with subloggers.

Remove capitalisation and parens from log keys and keep them standard
so that log analysis doesn't have to account for special cases.

Prefer early returns over else-branches to reduce levels of indent.

Don't log error and return error (leave the caller to handle logging
when they handle the error).

Co-authored-by: Keith James <[email protected]>
for unauthenticated user trying to access auth-requiring location
@dkj dkj force-pushed the seamless_auth_flow branch from c46ab4d to 764f95c Compare February 11, 2025 21:37
@dkj dkj marked this pull request as ready for review February 12, 2025 10:11
@dkj
Copy link
Member Author

dkj commented Feb 12, 2025

Undrafting with plan to add better testing (n.b. mockoidc might have some utility).

@kjsanger kjsanger merged commit 6b93ecd into wtsi-npg:devel Feb 12, 2025
5 checks passed
@dkj dkj deleted the seamless_auth_flow branch February 12, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants