|
23 | 23 | ], |
24 | 24 | "type": "object" |
25 | 25 | }, |
| 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 | + |
| 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 | + }, |
26 | 46 | "ErrorResponse": { |
27 | 47 | "example": { |
28 | 48 | "error": "Bad Request", |
|
80 | 100 | ], |
81 | 101 | "type": "object" |
82 | 102 | }, |
| 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 | + }, |
83 | 132 | "ListMembersResponse": { |
84 | 133 | "properties": { |
85 | 134 | "members": { |
|
164 | 213 | |
165 | 214 | "maxLength": 255, |
166 | 215 | "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.", |
168 | 217 | "type": "string" |
169 | 218 | } |
170 | 219 | }, |
|
398 | 447 | }, |
399 | 448 | "openapi": "3.0.3", |
400 | 449 | "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 | + }, |
401 | 530 | "/v2/permissions": { |
402 | 531 | "get": { |
403 | 532 | "description": "Get available permissions", |
|
0 commit comments