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

feat: add scopes validator for logical evalulation #1143

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

JarekKa
Copy link

@JarekKa JarekKa commented Dec 11, 2023

This feature introduces logical "OR" in the scope validation. Any match would suffice here. Example below. Details in issue.

Example of a match:
"required_scope": ["scope1", "scope2"]
token scopes: "scope1"

Related issue(s)

#1129

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

Corresponding docs PR: ory/docs#1608

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2023

CLA assistant check
All committers have signed the CLA.

@JarekKa JarekKa changed the title feat: add scopes validator for logical evalulation DRAFT: feat: add scopes validator for logical evalulation Dec 11, 2023
@JarekKa JarekKa marked this pull request as draft December 11, 2023 14:08
@JarekKa JarekKa changed the title DRAFT: feat: add scopes validator for logical evalulation feat: add scopes validator for logical evalulation Dec 11, 2023
@JarekKa JarekKa force-pushed the feat/scopes-logical-validator branch from 092d073 to 9fd1709 Compare December 11, 2023 14:15
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b5d4d88) 78.16% compared to head (de27dca) 77.72%.
Report is 1 commits behind head on master.

❗ Current head de27dca differs from pull request most recent head c096e04. Consider uploading reports for the commit c096e04 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1143      +/-   ##
==========================================
- Coverage   78.16%   77.72%   -0.45%     
==========================================
  Files          80       80              
  Lines        3898     4036     +138     
==========================================
+ Hits         3047     3137      +90     
- Misses        576      618      +42     
- Partials      275      281       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JarekKa
Copy link
Author

JarekKa commented Dec 15, 2023

I couldn't reproduce linter check issues locally. Dockers issues seem to pop up in other PR too. https://github.com/ory/oathkeeper/pull/1138/checks
For now I don't want to bloat PR with dependency bumps.

@JarekKa JarekKa marked this pull request as ready for review December 15, 2023 11:38
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.

2 participants