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
OAuth2-based Macaroon acquisition #883
Conversation
Goal is to allow someone to request a macaroon via a standard OAuth2 client credential workflow.
return req.SendSimpleResp(400, NULL, NULL, "Invalid grant type specified.", 0); | ||
} | ||
} | ||
else if (key == "expire_in") |
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 "expire_in" grant parameter (which I guess is used to limit the access token lifetime) is something where we want to be aligned, or FTS will have to juggle. StoRM uses the 'lifetime' parameter. No problem to change on our side, but I suggest to have a profile document that defines these details somewhere and align implementations to such profile.
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 - this was a bit arbitrary on my part. I didn't know of an "obvious" candidate here.
Any reason that expires_in
versus expire_in
versus lifetime
might be preferred? Shall we start flipping coins?
This PR implements the OAuth 2.0 client credentials workflow for acquiring a macaroon. This provides a more standards-based approach to token acquisition compared to the existing method developed by @paulmillar, which has served us well but is admittedly a bit more ad-hoc. With this PR, both the old method and new method ought to work.
This approach was originally implemented in StoRM by @andreaceccanti. I wanted to have a second server implementation prior to doing the client side changes for FTS.
This is NOT meant for 4.9.0.