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

[FEATURE] Claims can access resource function #85

Closed
roberlander2 opened this issue Feb 14, 2023 · 0 comments · Fixed by #86
Closed

[FEATURE] Claims can access resource function #85

roberlander2 opened this issue Feb 14, 2023 · 0 comments · Fixed by #86
Assignees
Labels
enhancement New feature or request

Comments

@roberlander2
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, there is no consistent method which determines whether a user's token claims are sufficient to access resources with an appID, orgID, and system status flag.

Describe the solution you'd like
Add a function to tokenauth.Claims which determines whether the set of claims grants access to a resource having the three parameters mentioned above.

Describe alternatives you've considered
Each service using the auth library could implement their own functions to do this, but this will likely result in inconsistencies across the system and unnecessary code duplication.

@roberlander2 roberlander2 added the enhancement New feature or request label Feb 14, 2023
@roberlander2 roberlander2 self-assigned this Feb 14, 2023
@roberlander2 roberlander2 linked a pull request Feb 14, 2023 that will close this issue
18 tasks
roberlander2 added a commit that referenced this issue Feb 14, 2023
shurwit added a commit that referenced this issue Mar 9, 2023
* add tokenauth.Claims.CanAccess [#85]

* update changelog

* update detect-secrets workflow

* add Claims.CanAccess tests [#85]

* fix admin access all_all bug, handle service tokens [#85]

* merged changes from develop

* upgrade go version, upgrade dependencies

* fix non-system admin access to all orgs resource bug

* simplify access logic

* fix lint issue

* fix formatting, upgrade dependencies

* add go patch version to build workflow

---------

Co-authored-by: Stephen Hurwit <10472810+shurwit@users.noreply.github.com>
Co-authored-by: Stephen Hurwit <sjhurwit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant