Skip to content

Commit 2ada963

Browse files
committed
feat(cerbos): Add principal schema definition
1 parent 4257049 commit 2ada963

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ settings.json
4343
playwright-report
4444
.env.local
4545
/conf.yaml
46+
fixtures/

cerbos/_schemas/principal.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"id": {
6+
"type": "string"
7+
},
8+
"roles": {
9+
"type": "array",
10+
"items": {
11+
"type": "string"
12+
}
13+
},
14+
"attributes": {
15+
"type": "object",
16+
"properties": {
17+
"namespaces": {
18+
"type": "object",
19+
"patternProperties": {
20+
".*": {
21+
"type": "string"
22+
}
23+
},
24+
"additionalProperties": false
25+
},
26+
"sites": {
27+
"type": "object",
28+
"patternProperties": {
29+
".*": {
30+
"type": "string"
31+
}
32+
},
33+
"additionalProperties": false
34+
},
35+
"languages": {
36+
"type": "array",
37+
"items": {
38+
"type": "string"
39+
}
40+
},
41+
"github_username": {
42+
"type": "string"
43+
},
44+
"email": {
45+
"type": "string"
46+
}
47+
},
48+
"additionalProperties": true
49+
}
50+
},
51+
"required": ["id", "roles"],
52+
"additionalProperties": true
53+
}

0 commit comments

Comments
 (0)