-
Notifications
You must be signed in to change notification settings - Fork 0
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
allows SymphonyClient to operate without the guests UserID and PIN #362
Conversation
Instead of taking the guests userID from symphony, we get it from the REMOTE_USER variable. This will get set by Apache in qa/stage/prod. locally we can put this in with something like https://addons.mozilla.org/en-US/firefox/addon/modheader-firefox/ SymphonyClient was modified to use it's own credentials instead of ones supplied by the symphony callback. Instead of logging in and returning the current user, we login as "staff" and then lookup remote_user, and return that. This PR introduces two new configuration parameters TODO
|
I return I made the request header configurable, and while I was at it allowed some settings to be configurable from the environment (this allows a much easier kubernetes config, etc) some of the other settings may want to be overridden in the same way.. This is still very much a WIP, but we've got a pretty good working config now. |
This code is running at https://myaccount-qa.dev.k8s.libraries.psu.edu (it's not being automatically deployed or anything, but i wanted an isolated place to test this) This deployment is using the MYACCOUNT user that was created for myaccount, there's still some work to be done, i'd like to bubble up more friendly error messages instead of redirecting to /500, for one. I will get those credentials over to @banukutlu and @cdmo safely by next week. |
Based off of our conversation in Teams yesterday, I coded up a crude "masquerade" feature. I Introduced a new Previously, when calling logout, it would redirect to the home page, now that the web-server is enforcing authentication, it would just log you right back in. I coded up a crude logout view, so that the session doesn't get reinstated. |
@ruthtillman Have you been able to test with different accounts? |
Yes, I have been able to test all of these! |
@@ -9,7 +9,8 @@ | |||
# Offense count: 2 | |||
# Configuration parameters: CountComments. | |||
Metrics/ClassLength: | |||
Max: 258 | |||
# TODO change only for SymphonyClient, or refactor SymphonyClient | |||
Max: 280 |
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.
I think we can add an exclude for SymphonyClient to https://github.com/psu-libraries/myaccount/blob/main/.rubocop.yml
else | ||
# if the symphony client returns no user we might want to redirect to a page that | ||
# says that they don't have a record? | ||
redirect_to '/500' |
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.
yes, we can redirect to a custom error page for this case as you mentioned @whereismyjetpack, we can add that in a later PR 👍 I will add an issue for that. I think it is good for now, we all would love to see this PR deployed.
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.
LGTM 👌 🎉 thanks @whereismyjetpack 🍻
No description provided.