Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit c7e5a70

Browse files
committed
update schemas
1 parent 7eabd1c commit c7e5a70

3 files changed

Lines changed: 228 additions & 0 deletions

File tree

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"$defs": {
3+
"BaseModel": {
4+
"properties": {},
5+
"title": "BaseModel",
6+
"type": "object"
7+
},
8+
"KarapaceProviderData": {
9+
"description": "The databag for the provider side of this interface.",
10+
"properties": {
11+
"subject": {
12+
"description": "The subject that has been made available to the relation user. Name defined in the Requirer's subject field",
13+
"examples": [
14+
"subject-1"
15+
],
16+
"title": "Subject name",
17+
"type": "string"
18+
},
19+
"username": {
20+
"description": "Username for connecting to the Karapace service",
21+
"examples": [
22+
"relation-14"
23+
],
24+
"title": "Karapace username",
25+
"type": "string"
26+
},
27+
"password": {
28+
"description": "Password for connecting to the Karapace service",
29+
"examples": [
30+
"alphanum-32byte-random"
31+
],
32+
"title": "Karapace password",
33+
"type": "string"
34+
},
35+
"endpoints": {
36+
"description": "A list of endpoints used to connect to the subject",
37+
"examples": [
38+
"10.141.78.155:8082,10.141.78.62:8082,10.141.78.186:8082"
39+
],
40+
"title": "Karapace server endpoints",
41+
"type": "string"
42+
},
43+
"entity-name": {
44+
"anyOf": [
45+
{
46+
"type": "string"
47+
},
48+
{
49+
"type": "null"
50+
}
51+
],
52+
"default": null,
53+
"description": "Name for the requested custom entity",
54+
"examples": [
55+
"custom-role"
56+
],
57+
"title": "Entity name"
58+
},
59+
"entity-password": {
60+
"anyOf": [
61+
{
62+
"type": "string"
63+
},
64+
{
65+
"type": "null"
66+
}
67+
],
68+
"default": null,
69+
"description": "Password for the requested custom entity",
70+
"examples": [
71+
"alphanum-32byte-random"
72+
],
73+
"title": "Entity password"
74+
}
75+
},
76+
"required": [
77+
"subject",
78+
"username",
79+
"password",
80+
"endpoints"
81+
],
82+
"title": "KarapaceProviderData",
83+
"type": "object"
84+
}
85+
},
86+
"description": "The schema for the provider side of this interface.",
87+
"properties": {
88+
"unit": {
89+
"anyOf": [
90+
{
91+
"$ref": "#/$defs/BaseModel"
92+
},
93+
{
94+
"type": "null"
95+
}
96+
],
97+
"default": null
98+
},
99+
"app": {
100+
"$ref": "#/$defs/KarapaceProviderData"
101+
}
102+
},
103+
"required": [
104+
"app"
105+
],
106+
"title": "ProviderSchema",
107+
"type": "object"
108+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$defs": {
3+
"BaseModel": {
4+
"properties": {},
5+
"title": "BaseModel",
6+
"type": "object"
7+
},
8+
"KarapaceRequirerData": {
9+
"description": "The databag for the requirer side of this interface.",
10+
"properties": {
11+
"subject": {
12+
"description": "The subject name access requested by the requirer",
13+
"examples": [
14+
"subject-1"
15+
],
16+
"title": "Subject name",
17+
"type": "string"
18+
},
19+
"extra-user-roles": {
20+
"anyOf": [
21+
{
22+
"type": "string"
23+
},
24+
{
25+
"type": "null"
26+
}
27+
],
28+
"default": null,
29+
"description": "Any extra user roles requested by the requirer",
30+
"examples": [
31+
"admin",
32+
"user"
33+
],
34+
"title": "Extra user roles"
35+
},
36+
"extra-group-roles": {
37+
"anyOf": [
38+
{
39+
"type": "string"
40+
},
41+
{
42+
"type": "null"
43+
}
44+
],
45+
"default": null,
46+
"description": "Any extra group roles requested by the requirer",
47+
"examples": [
48+
"charmed_read"
49+
],
50+
"title": "Extra group roles"
51+
},
52+
"entity-type": {
53+
"anyOf": [
54+
{
55+
"type": "string"
56+
},
57+
{
58+
"type": "null"
59+
}
60+
],
61+
"default": null,
62+
"description": "Type of the requested entity (user / group)",
63+
"examples": [
64+
"USER",
65+
"GROUP"
66+
],
67+
"title": "Entity type"
68+
},
69+
"entity-permissions": {
70+
"anyOf": [
71+
{
72+
"type": "string"
73+
},
74+
{
75+
"type": "null"
76+
}
77+
],
78+
"default": null,
79+
"description": "List of permissions to assign to the custom entity, in JSON format",
80+
"examples": [
81+
"[{\"resource_name\": \"schemas\", \"resource_type\": \"SUBJECT\", \"privileges\": [\"READ\"]}]"
82+
],
83+
"title": "Entity permissions"
84+
}
85+
},
86+
"required": [
87+
"subject"
88+
],
89+
"title": "KarapaceRequirerData",
90+
"type": "object"
91+
}
92+
},
93+
"description": "The schema for the requirer side of this interface.",
94+
"properties": {
95+
"unit": {
96+
"anyOf": [
97+
{
98+
"$ref": "#/$defs/BaseModel"
99+
},
100+
{
101+
"type": "null"
102+
}
103+
],
104+
"default": null
105+
},
106+
"app": {
107+
"$ref": "#/$defs/KarapaceRequirerData"
108+
}
109+
},
110+
"required": [
111+
"app"
112+
],
113+
"title": "RequirerSchema",
114+
"type": "object"
115+
}

index.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@
149149
"version": 0,
150150
"status": "draft"
151151
},
152+
{
153+
"name": "karapace_client",
154+
"version": 0,
155+
"status": "draft"
156+
},
152157
{
153158
"name": "kratos_external_idp",
154159
"version": 0,

0 commit comments

Comments
 (0)