-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add cookie session authenticator #211
Conversation
Awesome, thank you! I didn't have time to review it yet but it's on my list for this week. |
e4cca9e
to
fb27924
Compare
@aeneasr comments addressed, let me know what you think! |
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 great! Only a few nitpicks :)
Oh and could you please add a section about this authenticator to the docs? :)
fb27924
to
64cfe1c
Compare
64cfe1c
to
4bbd164
Compare
Awesome, thank you! |
Related issue
@aeneasr as discussed this is an initial implementation of what the cookie session authenticator could look like. If you like the API I can go in and add some documentation around it, otherwise please let me know if you have a better idea of how you would like this to work.
Proposed changes
The authenticator assumes there's a RESTful session service that responds to
GET /sesions/{sessionId}
with the json structure{ subject: string, extra: map[string]interface{} }
. This authenticator reads a session cookie from the incoming request. Then if the passed sessionId returns a 200, it populates the subject/extra fields for the pipeline. If the cookie does not exist it returnsErrAuthenticatorNotResponsible
, otherwise authentication fails.Checklist
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
[email protected]) from the maintainers to push
the changes.
developer guide (if appropriate)