Skip to content

Commit 2245c1e

Browse files
OAS Update
1 parent dd3fe5b commit 2245c1e

File tree

1 file changed

+130
-1
lines changed

1 file changed

+130
-1
lines changed

services/authorization/v2/authorization.json

Lines changed: 130 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@
2323
],
2424
"type": "object"
2525
},
26+
"AssignableSubject": {
27+
"properties": {
28+
"displayName": {
29+
"example": "Test Group",
30+
"title": "Human readable display name. Used for user groups",
31+
"type": "string"
32+
},
33+
"subject": {
34+
"example": "[email protected]",
35+
"maxLength": 255,
36+
"minLength": 1,
37+
"title": "Identifier of user, service account, client or user group. Usually email address or name in case of clients.",
38+
"type": "string"
39+
}
40+
},
41+
"required": [
42+
"subject"
43+
],
44+
"type": "object"
45+
},
2646
"ErrorResponse": {
2747
"example": {
2848
"error": "Bad Request",
@@ -80,6 +100,35 @@
80100
],
81101
"type": "object"
82102
},
103+
"ListAssignableSubjectsResponse": {
104+
"properties": {
105+
"resourceId": {
106+
"example": "schwarz-it-kg-WJACUK1",
107+
"pattern": "^([a-zA-Z0-9/_|\\-=+@.]{1,})$",
108+
"title": "The ID of the resource, where the members should be updated",
109+
"type": "string"
110+
},
111+
"resourceType": {
112+
"example": "organization",
113+
"pattern": "^[a-z](?:-?[a-z]){1,63}$",
114+
"title": "Resource type",
115+
"type": "string"
116+
},
117+
"subjects": {
118+
"items": {
119+
"$ref": "#/components/schemas/AssignableSubject"
120+
},
121+
"title": "The list of members who can be added to this resource",
122+
"type": "array"
123+
}
124+
},
125+
"required": [
126+
"resourceId",
127+
"resourceType",
128+
"subjects"
129+
],
130+
"type": "object"
131+
},
83132
"ListMembersResponse": {
84133
"properties": {
85134
"members": {
@@ -164,7 +213,7 @@
164213
"example": "[email protected]",
165214
"maxLength": 255,
166215
"minLength": 1,
167-
"title": "Identifier of user, service account or client. Usually email address or name in case of clients.",
216+
"title": "Identifier of user, service account, client or user group. Usually email address or name in case of clients.",
168217
"type": "string"
169218
}
170219
},
@@ -398,6 +447,86 @@
398447
},
399448
"openapi": "3.0.3",
400449
"paths": {
450+
"/v2/bff/{resourceType}/{resourceId}/assignableSubjects": {
451+
"get": {
452+
"description": "BFF endpoint for portal. List subjects assignable to a given resource.",
453+
"operationId": "GetAssignableSubjects",
454+
"parameters": [
455+
{
456+
"in": "path",
457+
"name": "resourceType",
458+
"required": true,
459+
"schema": {
460+
"type": "string"
461+
}
462+
},
463+
{
464+
"in": "path",
465+
"name": "resourceId",
466+
"required": true,
467+
"schema": {
468+
"type": "string"
469+
}
470+
},
471+
{
472+
"in": "query",
473+
"name": "subject",
474+
"schema": {
475+
"type": "string"
476+
}
477+
}
478+
],
479+
"responses": {
480+
"200": {
481+
"content": {
482+
"application/json": {
483+
"schema": {
484+
"$ref": "#/components/schemas/ListAssignableSubjectsResponse"
485+
}
486+
}
487+
},
488+
"description": "OK"
489+
},
490+
"400": {
491+
"content": {
492+
"application/json": {
493+
"schema": {
494+
"$ref": "#/components/schemas/ErrorResponse"
495+
}
496+
}
497+
},
498+
"description": "Malformed input"
499+
},
500+
"401": {
501+
"content": {
502+
"application/json": {
503+
"schema": {
504+
"$ref": "#/components/schemas/ErrorResponse"
505+
}
506+
}
507+
},
508+
"description": "Unauthorized"
509+
},
510+
"403": {
511+
"content": {
512+
"application/json": {
513+
"schema": {
514+
"$ref": "#/components/schemas/ErrorResponse"
515+
}
516+
}
517+
},
518+
"description": "Forbidden"
519+
}
520+
},
521+
"summary": "Get subjects assignable to a resource",
522+
"x-stackit-authorization": {
523+
"disabled": true,
524+
"implicit-actions": [
525+
"iam.member.get"
526+
]
527+
}
528+
}
529+
},
401530
"/v2/permissions": {
402531
"get": {
403532
"description": "Get available permissions",

0 commit comments

Comments
 (0)