-
Notifications
You must be signed in to change notification settings - Fork 4
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
DEV-385: Fix unwrap when provider response fails #13
Merged
Conversation
This file contains 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
As intermediate testing step, will try pam_unix following https://docs.percona.com/percona-server/8.0/pam-plugin.html#installation
As of fe8b560, I am able to replicate the error observed in production (see DEV-385). Using a
Where the token is from the Jupyter logs that Drew sent. Console Logs$ cat config/libpam_oidc.yaml
client.id: works
client.secret: <client_secret>
url.auth: https://accounts.datajoint.com/realms/datajoint/protocol/openid-connect/auth
url.token: https://accounts.datajoint.com/realms/datajoint/protocol/openid-connect/token
url.userinfo: https://accounts.datajoint.com/realms/datajoint/protocol/openid-connect/userinfo
username.key: preferred_username
scopes: "openid"
token.min_size: 128 # maximum password length
log.path: /tmp/libpam_oidc.log
log.level: Info # Error || Warn || Info || Debug
$ alias dkc="docker compose"
$ dkc run -it --build percona python3 /opt/test.py
# ...
Authenticated (pam_unix)? True
Reason (pam_unix): Success
Authenticating with DJ_AUTH_USER='milagros'
[2024-01-15 21:30:10.899][pam-oidc][0.1.4][INFO][4020109068]: Auth detected. Proceeding...
[2024-01-15 21:30:10.899][pam-oidc][0.1.4][INFO][4020109068]: Inputs read.
[2024-01-15 21:30:10.900][pam-oidc][0.1.4][INFO][4020109068]: Check as password.
[2024-01-15 21:30:11.195][pam-oidc][0.1.4][ERROR][4020109068]: Wrong password provided. Details: ServerResponse(StandardErrorResponse { error: invalid_grant, error_description: Some("Invalid user credentials"), error_uri: None })
Authenticated (oidc user:pass)? False
Reason (oidc user:pass): Permission denied
Authenticating with DJ_AUTH_USER='milagros'
[2024-01-15 21:30:11.198][pam-oidc][0.1.4][INFO][4020109068]: Auth detected. Proceeding...
[2024-01-15 21:30:11.198][pam-oidc][0.1.4][INFO][4020109068]: Inputs read.
[2024-01-15 21:30:11.198][pam-oidc][0.1.4][INFO][4020109068]: Check as token.
[2024-01-15 21:30:11.198][pam-oidc][0.1.4][INFO][4020109068]: Verifying token.
[2024-01-15 21:30:11.507][pam-oidc][0.1.4][ERROR][4020109068]: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)': src/lib.rs:195
fatal runtime error: failed to initiate panic, error 5 |
Improves error handling overall, replacing unwrap calls with explicit error handling.
Deprecate app and tester services.
See documentation in the updated README. |
yambottle
approved these changes
Jan 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
From DEV-385:
Commits