Skip to content

Commit

Permalink
fix: validate that namespace ID is int32 (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Mar 16, 2023
1 parent a4b41bd commit d093b37
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 189 deletions.
3 changes: 2 additions & 1 deletion .schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"id": {
"type": "integer",
"title": "The unique ID of the namespace. Can not be changed once set.",
"minimum": 0
"minimum": 0,
"maximum": 2147483647
},
"config": {
"type": "object",
Expand Down
350 changes: 163 additions & 187 deletions .schema/version.schema.json
Original file line number Diff line number Diff line change
@@ -1,210 +1,186 @@
{
"$id": "https://github.com/ory/keto/.schema/versions.config.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.11.1-alpha.0"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.1-alpha.0/.schema/config.schema.json"
}
]
"$id": "https://github.com/ory/keto/.schema/versions.config.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.11.1-alpha.0"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.11.0-alpha.0"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.0-alpha.0/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.1-alpha.0/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.11.0-alpha.0"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.10.0-alpha.0"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.10.0-alpha.0/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.0-alpha.0/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.10.0-alpha.0"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.9.0-alpha.0"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.9.0-alpha.0/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.10.0-alpha.0/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.9.0-alpha.0"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.2"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.9.0-alpha.0/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.2"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.6.0-alpha.1"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.1/internal/driver/config/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.6.0-alpha.1"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.6.0-alpha.3"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.3/internal/driver/config/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.1/internal/driver/config/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.6.0-alpha.3"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.7.0-alpha.0"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.0/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.3/internal/driver/config/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.7.0-alpha.0"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.7.0-alpha.1"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.1/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.0/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.7.0-alpha.1"
}
},
"required": ["version"]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.1"
}
},
"required": [
"version"
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.1/.schema/config.schema.json"
}
]
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.1/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.1"
}
},
"required": ["version"]
},
{
"allOf": [
{
"oneOf": [
{
"properties": {
"version": {
"type": "string",
"maxLength": 0
}
},
"required": [
"version"
]
},
{
"not": {
"properties": {
"version": {}
},
"required": [
"version"
]
}
}
]
},
{
"$ref": "#/oneOf/0/allOf/1"
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.1/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"oneOf": [
{
"properties": {
"version": {
"type": "string",
"maxLength": 0
}
]
},
"required": ["version"]
},
{
"not": {
"properties": {
"version": {}
},
"required": ["version"]
}
}
]
},
{
"$ref": "#/oneOf/0/allOf/1"
}
],
"title": "All Versions of the ORY Keto Configuration",
"type": "object"
}
]
}
],
"title": "All Versions of the ORY Keto Configuration",
"type": "object"
}
3 changes: 2 additions & 1 deletion embedx/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"id": {
"type": "integer",
"title": "The unique ID of the namespace. Can not be changed once set.",
"minimum": 0
"minimum": 0,
"maximum": 2147483647
},
"config": {
"type": "object",
Expand Down

0 comments on commit d093b37

Please sign in to comment.