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

bake user query params into authentication system #772

Merged
merged 3 commits into from Nov 24, 2015

Conversation

Projects
None yet
1 participant
@tpetr
Member

tpetr commented Nov 23, 2015

the ?user=email authentication scheme is good for when people are trying Singularity out (i.e. they want to record that user X did an action, but dont want to set up LDAP yet), but required littering all our resource methods with @QueryParam("user"), which began to get nasty.

At the same time, many of our resource methods just record the action taker based on the ?user= field, and ignore the injected Optional<SingularityUser> completely, which can be completely wrong!

This PR:

  • Adds SingularityQueryParamAuthenticator, which keys off of the user query param
  • Adds SingularityDummyDatastore, which always yields a user based off a username with no groups defined for it
  • Removed all usage of @QueryParam("user") in favor of using the injected Optional<SingularityUser>

Once this is merged, #759 will function properly.

@tpetr tpetr added the hs_staging label Nov 23, 2015

@tpetr tpetr added this to the 0.4.6 milestone Nov 23, 2015

tpetr added a commit that referenced this pull request Nov 24, 2015

Merge pull request #772 from HubSpot/auth-email
bake user query params into authentication system

@tpetr tpetr merged commit 2f58f99 into master Nov 24, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the auth-email branch Apr 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment