Skip to content

Commit

Permalink
Update experimental external principals API with auth service (#7566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Isan-Rivkin authored Mar 18, 2024
1 parent d3d299b commit 54d2f77
Show file tree
Hide file tree
Showing 52 changed files with 1,524 additions and 1,561 deletions.
25 changes: 18 additions & 7 deletions api/authorization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ paths:
$ref: "#/components/responses/Unauthorized"
default:
$ref: "#/components/responses/ServerError"
/auth/users/{userId}/external/principals:
/auth/users/{userId}/external/principals/ls:
parameters:
- in: path
name: userId
Expand Down Expand Up @@ -1133,14 +1133,14 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/auth/users/{userId}/external/principals/{principalId}:
/auth/users/{userId}/external/principals:
parameters:
- in: path
name: userId
required: true
schema:
type: string
- in: path
- in: query
name: principalId
required: true
schema:
Expand Down Expand Up @@ -1177,12 +1177,21 @@ paths:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"

/auth/external/principals:
parameters:
- in: query
name: principalId
required: true
schema:
type: string
get:
tags:
- auth
- external
- experimental
operationId: getUserExternalPrincipal
summary: get external principal
operationId: getExternalPrincipal
summary: describe external principal by id
responses:
200:
description: external principal
Expand All @@ -1194,9 +1203,11 @@ paths:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
420:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
$ref: "#/components/responses/ServerError"

/healthcheck:
get:
operationId: healthCheck
Expand Down
46 changes: 28 additions & 18 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2434,14 +2434,15 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/auth/users/{userId}/external/principal/{principalId}:

/auth/users/{userId}/external/principals:
parameters:
- in: path
name: userId
required: true
schema:
type: string
- in: path
- in: query
name: principalId
required: true
schema:
Expand All @@ -2454,7 +2455,7 @@ paths:
operationId: createUserExternalPrincipal
summary: attach external principal to user
requestBody:
required: true
required: false
content:
application/json:
schema:
Expand Down Expand Up @@ -2490,20 +2491,32 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/auth/users/{userId}/external/principals/ls:
parameters:
- in: path
name: userId
required: true
schema:
type: string
get:
tags:
- auth
- external
- experimental
operationId: getUserExternalPrincipal
summary: get external principal of a user
parameters:
- $ref: "#/components/parameters/PaginationPrefix"
- $ref: "#/components/parameters/PaginationAfter"
- $ref: "#/components/parameters/PaginationAmount"
operationId: listUserExternalPrincipals
summary: list user external policies attached to a user
responses:
200:
description: external principal
description: external principals list
content:
application/json:
schema:
$ref: "#/components/schemas/ExternalPrincipal"
$ref: "#/components/schemas/ExternalPrincipalList"
401:
$ref: "#/components/responses/Unauthorized"
404:
Expand All @@ -2513,10 +2526,10 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/auth/users/{userId}/external/principals:
/auth/external/principals:
parameters:
- in: path
name: userId
- in: query
name: principalId
required: true
schema:
type: string
Expand All @@ -2525,19 +2538,15 @@ paths:
- auth
- external
- experimental
parameters:
- $ref: "#/components/parameters/PaginationPrefix"
- $ref: "#/components/parameters/PaginationAfter"
- $ref: "#/components/parameters/PaginationAmount"
operationId: listUserExternalPrincipals
summary: list user external policies attached to a user
operationId: getExternalPrincipal
summary: describe external principal by id
responses:
200:
description: external principals list
description: external principal
content:
application/json:
schema:
$ref: "#/components/schemas/ExternalPrincipalList"
$ref: "#/components/schemas/ExternalPrincipal"
401:
$ref: "#/components/responses/Unauthorized"
404:
Expand All @@ -2546,6 +2555,7 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/auth/groups/{groupId}/policies:
parameters:
- in: path
Expand Down
24 changes: 12 additions & 12 deletions clients/java-legacy/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 53 additions & 59 deletions clients/java-legacy/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 54d2f77

Please sign in to comment.