-
-
Notifications
You must be signed in to change notification settings - Fork 360
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: json schema for access rules #1074
base: master
Are you sure you want to change the base?
Conversation
This adds schema validation for access rules. Closes ory#828
Codecov Report
@@ Coverage Diff @@
## master #1074 +/- ##
==========================================
+ Coverage 77.65% 78.22% +0.57%
==========================================
Files 79 80 +1
Lines 3979 3863 -116
==========================================
- Hits 3090 3022 -68
+ Misses 608 566 -42
+ Partials 281 275 -6 |
-object to array of object as per docs
any update on this? |
There's a lack of support for # yaml-language-server: $schema=https://raw.githubusercontent.com/ory/oathkeeper/551dee219fa12c86b26cc59f2dc840f68915f67d/.schema/rules.schema.json
- id: some-id
version: v0.36.0-beta.4
match:
authority: example.com # Property authority is not allowed. [0]
full_method: my.grpc.package/MyService/MyMethod # Property full_method is not allowed. [0]
authenticators:
- handler: noop
authorizer:
handler: allow
mutators:
- handler: noop
errors:
- handler: json |
So far this only adds the JSON file, but does not actually validate the rules! I also think we can probably use some of the config schema? However so far I think this needs more work |
This adds schema validation for access rules. It will be useful for users and developers to take action prior to deploying the configuration to the Oathkeeper in order to verify the schema's rules and some of the validation in their IDE. It follows the Access Rule format.
Related issue(s)
Related to issue: #828
Checklist
introduces a new feature.
contributing code guidelines.
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.
works.
Further Comments
I'm not sure if I should add this schema to
version.schema.json
.