Skip to content
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

Merged
merged 9 commits into from Jan 11, 2019
Merged

Conversation

bbockelm
Copy link
Contributor

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.

src/XrdMacaroons/XrdMacaroonsHandler.cc Outdated Show resolved Hide resolved
src/XrdMacaroons/XrdMacaroonsHandler.cc Outdated Show resolved Hide resolved
return req.SendSimpleResp(400, NULL, NULL, "Invalid grant type specified.", 0);
}
}
else if (key == "expire_in")

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.

Copy link
Contributor Author

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?

src/XrdMacaroons/XrdMacaroonsHandler.cc Outdated Show resolved Hide resolved
@abh3 abh3 merged commit 16e3181 into xrootd:master Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants