Shibboleth authentication in production - DO NOT MERGE#274
Shibboleth authentication in production - DO NOT MERGE#274
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.
no-reply
left a comment
There was a problem hiding this comment.
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.
| RSpec/MultipleExpectations: | ||
| Exclude: | ||
| - 'spec/features/**/*' | ||
| - 'spec/models/user_spec.rb' |
There was a problem hiding this comment.
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.
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.
| # methods aren't available. | ||
| def self.use_database_auth? | ||
| return true if Rails.env.test? | ||
| Rails.env.development? && ENV['DATABASE_AUTH'] == 'true' |
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.