-
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
Shibboleth authentication in production - DO NOT MERGE #274
base: master
Are you sure you want to change the base?
Conversation
Add uid field and index it: uid will now be the primary identifier Add provider field to record which authentication method created a given user Add uid field to User factory
…pment environment Always use database auth in test environment
If a user we haven't seen before logs in via shibboleth create an account for them.
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.
This looks fabulous. Thank you!
Do you have thoughts about how best to handle creator
for importer, in a Shibboleth authenticated world? I'm unsure whether changes will be necessary to that work (merged as #273) when rebasing this.
@@ -16,6 +16,7 @@ Rails/TimeZone: | |||
RSpec/MultipleExpectations: | |||
Exclude: | |||
- 'spec/features/**/*' | |||
- 'spec/models/user_spec.rb' |
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.
Is it team opinion that multiple expectations are good (or at least acceptable) across the board? If so, I want to flag this rule for removal in bixby
.
Either way, I'm fine with the relevant specs here for now.
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 multiple expectations are fine and even desirable, especially in our context where test setup can be expensive and we want things to run faster. I'd be very happy to see this removed from bixby.
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.
# methods aren't available. | ||
def self.use_database_auth? | ||
return true if Rails.env.test? | ||
Rails.env.development? && ENV['DATABASE_AUTH'] == 'true' |
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.
👍 really nice.
This removes the need for a hard coded user with a password, using Hyrax's system user functionality instead. This prefigures Shibboleth support in #274.
This removes the need for a hard coded user with a password, using Hyrax's system user functionality instead. This prefigures Shibboleth support in #274.
This removes the need for a hard coded user with a password, using Hyrax's system user functionality instead. This prefigures Shibboleth support in #274.
This removes the need for a hard coded user with a password, using Hyrax's system user functionality instead. This prefigures Shibboleth support in #274.
With local database authentication in dev environment
I did not squash these PRs because they track the steps I documented here: https://github.com/curationexperts/playbook/blob/shibboleth/authentication/shibboleth_and_hyrax.md
I think it might be handy for future reference to have one PR per documented step. What do you think?
Closes #18
Do not merge this until @mark-dce can weigh in on whether we want to proceed with this before we have access to OHSU Shibboleth systems.