mozilla / fxa-oauth-server

OAuth server for Firefox Accounts
49 stars 40 forks source link

fix(scopes): Formalize and document scope-handling rules. #551

Closed rfk closed 6 years ago

rfk commented 6 years ago

Connects to https://github.com/mozilla/fxa-oauth-server/issues/575

While working on adding OAuth support for sync, I figured we should have a canonical reference for what sorts of scope we support and how we check for matches. So I started something, and here's the rendered view:

https://github.com/mozilla/fxa-oauth-server/blob/scopes-documentation/docs/scopes.md

I want to add some explicit testcases for this in the code here, but am putting the doc up for early feedback. @vladikoff does this seem sane? I think it differs slightly from the proposal in the original scoped-keys doc, in that it uses the URL fragment for qualifications like "readonly". But I quite like the ability to check scopes by parsing them as URL resource references.

rfk commented 6 years ago

Thanks @vladikoff; I think I'll leave this open until I have a corresponding PR to use it in some of our other codebases, in case that reveals some opportunities for API cleanup.

shane-tomlinson commented 6 years ago

@rfk - is there anything else you want to add to this?

GitCop commented 6 years ago

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Guidelines are available at https://github.com/mozilla/fxa-oauth-server


This message was auto-generated by https://gitcop.com

GitCop commented 6 years ago

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Guidelines are available at https://github.com/mozilla/fxa-oauth-server


This message was auto-generated by https://gitcop.com

GitCop commented 6 years ago

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Guidelines are available at https://github.com/mozilla/fxa-oauth-server


This message was auto-generated by https://gitcop.com

GitCop commented 6 years ago

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Guidelines are available at https://github.com/mozilla/fxa-oauth-server


This message was auto-generated by https://gitcop.com

GitCop commented 6 years ago

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Guidelines are available at https://github.com/mozilla/fxa-oauth-server


This message was auto-generated by https://gitcop.com

shane-tomlinson commented 6 years ago

@rfk - what's left to do here?

rfk commented 6 years ago

I made a combined tracking issue to summarize status: https://github.com/mozilla/fxa-oauth-server/issues/575

rfk commented 6 years ago

This has been updated to use a tag of fxa-shared rather than a github ref; @mozilla/fxa-devs r?

rfk commented 6 years ago

Thanks @vbudhram @shane-tomlinson, nits fixed.