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

Validate identity schema on load #701

Closed
zepatrik opened this issue Sep 22, 2020 · 3 comments · Fixed by #1779
Closed

Validate identity schema on load #701

zepatrik opened this issue Sep 22, 2020 · 3 comments · Fixed by #1779
Assignees
Labels
feat New feature or request. good first issue A good issue to tackle when being a novice to the project.

Comments

@zepatrik
Copy link
Member

Is your feature request related to a problem? Please describe.

It would be nice to not only validate the config but also the identity schema to catch errors early on.

Describe the solution you'd like

Validate the identity schema against either the JSON schema meta schema, or define our own meta schema.

Additional context

Whether our meta schema would add any benefit is to be determined. It could validate our extensions though.

@zepatrik zepatrik added feat New feature or request. good first issue A good issue to tackle when being a novice to the project. labels Sep 22, 2020
@zepatrik zepatrik self-assigned this Sep 22, 2020
@zepatrik zepatrik added this to To do in Maintainer's Board via automation Sep 22, 2020
@zepatrik
Copy link
Member Author

Validating the identity schema against the jsonschema meta schema would be enough for the moment, but if you are very motivated go ahead and validate our extension as well
It's schema is located here: https://github.com/ory/kratos/blob/master/schema/.schema/extension/identity.schema.json
The initial config validation is done here: https://github.com/ory/kratos/blob/master/x/config.go

@zepatrik zepatrik removed their assignment Nov 12, 2020
@aeneasr aeneasr added this to the v0.7.0-alpha.1 milestone Dec 9, 2020
@nanikjava
Copy link
Contributor

Validating the identity schema against the jsonschema meta schema would be enough for the moment, but if you are very motivated go ahead and validate our extension as well
It's schema is located here: https://github.com/ory/kratos/blob/master/schema/.schema/extension/identity.schema.json
The initial config validation is done here: https://github.com/ory/kratos/blob/master/x/config.go

@zepatrik the link to config.go does not exist anymore is this file github.com/ory/kratos/driver/config/config.go you referring to ?

@zepatrik
Copy link
Member Author

zepatrik commented Jul 15, 2021

Sorry for not using permalinks back then 🙈
Actually, @Benehiko started to work on this already this week 😉
We have a meta schema prepared that we will use to validate identity schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request. good first issue A good issue to tackle when being a novice to the project.
Projects
Development

Successfully merging a pull request may close this issue.

4 participants