Open
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 |
Member
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments
I'm not sure if I should add this schema to
version.schema.json.