diff --git a/api/authorization.yml b/api/authorization.yml
index 849bd4f4a9e..46d80a9215c 100644
--- a/api/authorization.yml
+++ b/api/authorization.yml
@@ -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
@@ -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:
@@ -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
@@ -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
diff --git a/api/swagger.yml b/api/swagger.yml
index bb14777143d..81f8a2db461 100644
--- a/api/swagger.yml
+++ b/api/swagger.yml
@@ -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:
@@ -2454,7 +2455,7 @@ paths:
operationId: createUserExternalPrincipal
summary: attach external principal to user
requestBody:
- required: true
+ required: false
content:
application/json:
schema:
@@ -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:
@@ -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
@@ -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:
@@ -2546,6 +2555,7 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
+
/auth/groups/{groupId}/policies:
parameters:
- in: path
diff --git a/clients/java-legacy/README.md b/clients/java-legacy/README.md
index 283c01eedb0..6db84d0389b 100644
--- a/clients/java-legacy/README.md
+++ b/clients/java-legacy/README.md
@@ -146,28 +146,28 @@ Class | Method | HTTP request | Description
*AuthApi* | [**createGroup**](docs/AuthApi.md#createGroup) | **POST** /auth/groups | create group
*AuthApi* | [**createPolicy**](docs/AuthApi.md#createPolicy) | **POST** /auth/policies | create policy
*AuthApi* | [**createUser**](docs/AuthApi.md#createUser) | **POST** /auth/users | create user
-*AuthApi* | [**createUserExternalPrincipal**](docs/AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+*AuthApi* | [**createUserExternalPrincipal**](docs/AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
*AuthApi* | [**deleteCredentials**](docs/AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
*AuthApi* | [**deleteGroup**](docs/AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group
*AuthApi* | [**deleteGroupMembership**](docs/AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
*AuthApi* | [**deletePolicy**](docs/AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy
*AuthApi* | [**deleteUser**](docs/AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user
-*AuthApi* | [**deleteUserExternalPrincipal**](docs/AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+*AuthApi* | [**deleteUserExternalPrincipal**](docs/AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*AuthApi* | [**detachPolicyFromGroup**](docs/AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
*AuthApi* | [**detachPolicyFromUser**](docs/AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
*AuthApi* | [**getCredentials**](docs/AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
*AuthApi* | [**getCurrentUser**](docs/AuthApi.md#getCurrentUser) | **GET** /user | get current user
+*AuthApi* | [**getExternalPrincipal**](docs/AuthApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
*AuthApi* | [**getGroup**](docs/AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group
*AuthApi* | [**getGroupACL**](docs/AuthApi.md#getGroupACL) | **GET** /auth/groups/{groupId}/acl | get ACL of group
*AuthApi* | [**getPolicy**](docs/AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy
*AuthApi* | [**getUser**](docs/AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user
-*AuthApi* | [**getUserExternalPrincipal**](docs/AuthApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
*AuthApi* | [**listGroupMembers**](docs/AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members
*AuthApi* | [**listGroupPolicies**](docs/AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies
*AuthApi* | [**listGroups**](docs/AuthApi.md#listGroups) | **GET** /auth/groups | list groups
*AuthApi* | [**listPolicies**](docs/AuthApi.md#listPolicies) | **GET** /auth/policies | list policies
*AuthApi* | [**listUserCredentials**](docs/AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-*AuthApi* | [**listUserExternalPrincipals**](docs/AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*AuthApi* | [**listUserExternalPrincipals**](docs/AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*AuthApi* | [**listUserGroups**](docs/AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups
*AuthApi* | [**listUserPolicies**](docs/AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies
*AuthApi* | [**listUsers**](docs/AuthApi.md#listUsers) | **GET** /auth/users | list users
@@ -188,15 +188,15 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**abortPresignMultipartUpload**](docs/ExperimentalApi.md#abortPresignMultipartUpload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
*ExperimentalApi* | [**completePresignMultipartUpload**](docs/ExperimentalApi.md#completePresignMultipartUpload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
*ExperimentalApi* | [**createPresignMultipartUpload**](docs/ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExperimentalApi* | [**getUserExternalPrincipal**](docs/ExperimentalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExperimentalApi* | [**getExternalPrincipal**](docs/ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
*ExperimentalApi* | [**hardResetBranch**](docs/ExperimentalApi.md#hardResetBranch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-*ExperimentalApi* | [**listUserExternalPrincipals**](docs/ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
-*ExternalApi* | [**createUserExternalPrincipal**](docs/ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExternalApi* | [**deleteUserExternalPrincipal**](docs/ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExternalApi* | [**getUserExternalPrincipal**](docs/ExternalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-*ExternalApi* | [**listUserExternalPrincipals**](docs/ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*ExperimentalApi* | [**listUserExternalPrincipals**](docs/ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
+*ExternalApi* | [**createUserExternalPrincipal**](docs/ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExternalApi* | [**deleteUserExternalPrincipal**](docs/ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExternalApi* | [**getExternalPrincipal**](docs/ExternalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
+*ExternalApi* | [**listUserExternalPrincipals**](docs/ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*HealthCheckApi* | [**healthCheck**](docs/HealthCheckApi.md#healthCheck) | **GET** /healthcheck |
*ImportApi* | [**importCancel**](docs/ImportApi.md#importCancel) | **DELETE** /repositories/{repository}/branches/{branch}/import | cancel ongoing import
*ImportApi* | [**importStart**](docs/ImportApi.md#importStart) | **POST** /repositories/{repository}/branches/{branch}/import | import data from object store
diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml
index 4a5a6a1d592..712a89d3d9c 100644
--- a/clients/java-legacy/api/openapi.yaml
+++ b/clients/java-legacy/api/openapi.yaml
@@ -1378,7 +1378,7 @@ paths:
tags:
- auth
x-accepts: application/json
- /auth/users/{userId}/external/principal/{principalId}:
+ /auth/users/{userId}/external/principals:
delete:
operationId: deleteUserExternalPrincipal
parameters:
@@ -1389,13 +1389,13 @@ paths:
schema:
type: string
style: simple
- - explode: false
- in: path
+ - explode: true
+ in: query
name: principalId
required: true
schema:
type: string
- style: simple
+ style: form
responses:
"204":
description: external principal detached successfully
@@ -1425,56 +1425,6 @@ paths:
- external
- experimental
x-accepts: application/json
- get:
- operationId: getUserExternalPrincipal
- parameters:
- - explode: false
- in: path
- name: userId
- required: true
- schema:
- type: string
- style: simple
- - explode: false
- in: path
- name: principalId
- required: true
- schema:
- type: string
- style: simple
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExternalPrincipal'
- description: external principal
- "401":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Unauthorized
- "404":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Resource Not Found
- "420":
- description: too many requests
- default:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Internal Server Error
- summary: get external principal of a user
- tags:
- - auth
- - external
- - experimental
- x-accepts: application/json
post:
operationId: createUserExternalPrincipal
parameters:
@@ -1485,19 +1435,19 @@ paths:
schema:
type: string
style: simple
- - explode: false
- in: path
+ - explode: true
+ in: query
name: principalId
required: true
schema:
type: string
- style: simple
+ style: form
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalPrincipalCreation'
- required: true
+ required: false
responses:
"201":
description: external principal attached successfully
@@ -1534,7 +1484,7 @@ paths:
- experimental
x-contentType: application/json
x-accepts: application/json
- /auth/users/{userId}/external/principals:
+ /auth/users/{userId}/external/principals/ls:
get:
operationId: listUserExternalPrincipals
parameters:
@@ -1605,6 +1555,50 @@ paths:
- external
- experimental
x-accepts: application/json
+ /auth/external/principals:
+ get:
+ operationId: getExternalPrincipal
+ parameters:
+ - explode: true
+ in: query
+ name: principalId
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExternalPrincipal'
+ description: external principal
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: describe external principal by id
+ tags:
+ - auth
+ - external
+ - experimental
+ x-accepts: application/json
/auth/groups/{groupId}/policies:
get:
operationId: listGroupPolicies
diff --git a/clients/java-legacy/docs/AuthApi.md b/clients/java-legacy/docs/AuthApi.md
index fff5b7ebc57..b6308ae3dd4 100644
--- a/clients/java-legacy/docs/AuthApi.md
+++ b/clients/java-legacy/docs/AuthApi.md
@@ -11,28 +11,28 @@ Method | HTTP request | Description
[**createGroup**](AuthApi.md#createGroup) | **POST** /auth/groups | create group
[**createPolicy**](AuthApi.md#createPolicy) | **POST** /auth/policies | create policy
[**createUser**](AuthApi.md#createUser) | **POST** /auth/users | create user
-[**createUserExternalPrincipal**](AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+[**createUserExternalPrincipal**](AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
[**deleteCredentials**](AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
[**deleteGroup**](AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group
[**deleteGroupMembership**](AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
[**deletePolicy**](AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy
[**deleteUser**](AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user
-[**deleteUserExternalPrincipal**](AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+[**deleteUserExternalPrincipal**](AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**detachPolicyFromGroup**](AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
[**detachPolicyFromUser**](AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
[**getCredentials**](AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
[**getCurrentUser**](AuthApi.md#getCurrentUser) | **GET** /user | get current user
+[**getExternalPrincipal**](AuthApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
[**getGroup**](AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group
[**getGroupACL**](AuthApi.md#getGroupACL) | **GET** /auth/groups/{groupId}/acl | get ACL of group
[**getPolicy**](AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy
[**getUser**](AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user
-[**getUserExternalPrincipal**](AuthApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
[**listGroupMembers**](AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members
[**listGroupPolicies**](AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies
[**listGroups**](AuthApi.md#listGroups) | **GET** /auth/groups | list groups
[**listPolicies**](AuthApi.md#listPolicies) | **GET** /auth/policies | list policies
[**listUserCredentials**](AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-[**listUserExternalPrincipals**](AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**listUserExternalPrincipals**](AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
[**listUserGroups**](AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups
[**listUserPolicies**](AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies
[**listUsers**](AuthApi.md#listUsers) | **GET** /auth/users | list users
@@ -761,7 +761,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| |
**principalId** | **String**| |
- **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -1702,11 +1702,11 @@ This endpoint does not need any parameter.
|-------------|-------------|------------------|
**200** | user | - |
-
-# **getGroup**
-> Group getGroup(groupId)
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId)
-get group
+describe external principal by id
### Example
```java
@@ -1751,12 +1751,12 @@ public class Example {
//saml_auth.setApiKeyPrefix("Token");
AuthApi apiInstance = new AuthApi(defaultClient);
- String groupId = "groupId_example"; // String |
+ String principalId = "principalId_example"; // String |
try {
- Group result = apiInstance.getGroup(groupId);
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getGroup");
+ System.err.println("Exception when calling AuthApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1770,11 +1770,11 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **groupId** | **String**| |
+ **principalId** | **String**| |
### Return type
-[**Group**](Group.md)
+[**ExternalPrincipal**](ExternalPrincipal.md)
### Authorization
@@ -1788,17 +1788,17 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | group | - |
+**200** | external principal | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getGroupACL**
-> ACL getGroupACL(groupId)
+
+# **getGroup**
+> Group getGroup(groupId)
-get ACL of group
+get group
### Example
```java
@@ -1845,10 +1845,10 @@ public class Example {
AuthApi apiInstance = new AuthApi(defaultClient);
String groupId = "groupId_example"; // String |
try {
- ACL result = apiInstance.getGroupACL(groupId);
+ Group result = apiInstance.getGroup(groupId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getGroupACL");
+ System.err.println("Exception when calling AuthApi#getGroup");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1866,7 +1866,7 @@ Name | Type | Description | Notes
### Return type
-[**ACL**](ACL.md)
+[**Group**](Group.md)
### Authorization
@@ -1880,17 +1880,17 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | ACL of group | - |
+**200** | group | - |
**401** | Unauthorized | - |
-**404** | Group not found, or group found but has no ACL | - |
+**404** | Resource Not Found | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getPolicy**
-> Policy getPolicy(policyId)
+
+# **getGroupACL**
+> ACL getGroupACL(groupId)
-get policy
+get ACL of group
### Example
```java
@@ -1935,12 +1935,12 @@ public class Example {
//saml_auth.setApiKeyPrefix("Token");
AuthApi apiInstance = new AuthApi(defaultClient);
- String policyId = "policyId_example"; // String |
+ String groupId = "groupId_example"; // String |
try {
- Policy result = apiInstance.getPolicy(policyId);
+ ACL result = apiInstance.getGroupACL(groupId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getPolicy");
+ System.err.println("Exception when calling AuthApi#getGroupACL");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1954,11 +1954,11 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **policyId** | **String**| |
+ **groupId** | **String**| |
### Return type
-[**Policy**](Policy.md)
+[**ACL**](ACL.md)
### Authorization
@@ -1972,17 +1972,17 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | policy | - |
+**200** | ACL of group | - |
**401** | Unauthorized | - |
-**404** | Resource Not Found | - |
+**404** | Group not found, or group found but has no ACL | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getUser**
-> User getUser(userId)
+
+# **getPolicy**
+> Policy getPolicy(policyId)
-get user
+get policy
### Example
```java
@@ -2027,12 +2027,12 @@ public class Example {
//saml_auth.setApiKeyPrefix("Token");
AuthApi apiInstance = new AuthApi(defaultClient);
- String userId = "userId_example"; // String |
+ String policyId = "policyId_example"; // String |
try {
- User result = apiInstance.getUser(userId);
+ Policy result = apiInstance.getPolicy(policyId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getUser");
+ System.err.println("Exception when calling AuthApi#getPolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -2046,11 +2046,11 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **userId** | **String**| |
+ **policyId** | **String**| |
### Return type
-[**User**](User.md)
+[**Policy**](Policy.md)
### Authorization
@@ -2064,17 +2064,17 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | user | - |
+**200** | policy | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+# **getUser**
+> User getUser(userId)
-get external principal of a user
+get user
### Example
```java
@@ -2120,12 +2120,11 @@ public class Example {
AuthApi apiInstance = new AuthApi(defaultClient);
String userId = "userId_example"; // String |
- String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId);
+ User result = apiInstance.getUser(userId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling AuthApi#getUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -2140,11 +2139,10 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| |
- **principalId** | **String**| |
### Return type
-[**ExternalPrincipal**](ExternalPrincipal.md)
+[**User**](User.md)
### Authorization
@@ -2158,7 +2156,7 @@ Name | Type | Description | Notes
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | external principal | - |
+**200** | user | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
diff --git a/clients/java-legacy/docs/ExperimentalApi.md b/clients/java-legacy/docs/ExperimentalApi.md
index a4d891638f7..827ebcf07c1 100644
--- a/clients/java-legacy/docs/ExperimentalApi.md
+++ b/clients/java-legacy/docs/ExperimentalApi.md
@@ -7,11 +7,11 @@ Method | HTTP request | Description
[**abortPresignMultipartUpload**](ExperimentalApi.md#abortPresignMultipartUpload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
[**completePresignMultipartUpload**](ExperimentalApi.md#completePresignMultipartUpload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
[**createPresignMultipartUpload**](ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-[**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**getUserExternalPrincipal**](ExperimentalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+[**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**getExternalPrincipal**](ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
[**hardResetBranch**](ExperimentalApi.md#hardResetBranch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-[**listUserExternalPrincipals**](ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**listUserExternalPrincipals**](ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
@@ -392,7 +392,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| |
**principalId** | **String**| |
- **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -510,11 +510,11 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId)
-get external principal of a user
+describe external principal by id
### Example
```java
@@ -559,13 +559,12 @@ public class Example {
//saml_auth.setApiKeyPrefix("Token");
ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
- String userId = "userId_example"; // String |
String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId);
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling ExperimentalApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling ExperimentalApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -579,7 +578,6 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **userId** | **String**| |
**principalId** | **String**| |
### Return type
diff --git a/clients/java-legacy/docs/ExternalApi.md b/clients/java-legacy/docs/ExternalApi.md
index 11a267baf24..889c53a83f4 100644
--- a/clients/java-legacy/docs/ExternalApi.md
+++ b/clients/java-legacy/docs/ExternalApi.md
@@ -4,10 +4,10 @@ All URIs are relative to *http://localhost/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**createUserExternalPrincipal**](ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**deleteUserExternalPrincipal**](ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**getUserExternalPrincipal**](ExternalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-[**listUserExternalPrincipals**](ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**createUserExternalPrincipal**](ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**deleteUserExternalPrincipal**](ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**getExternalPrincipal**](ExternalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
+[**listUserExternalPrincipals**](ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
@@ -81,7 +81,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| |
**principalId** | **String**| |
- **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -199,11 +199,11 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId)
-get external principal of a user
+describe external principal by id
### Example
```java
@@ -248,13 +248,12 @@ public class Example {
//saml_auth.setApiKeyPrefix("Token");
ExternalApi apiInstance = new ExternalApi(defaultClient);
- String userId = "userId_example"; // String |
String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId);
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling ExternalApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling ExternalApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -268,7 +267,6 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **userId** | **String**| |
**principalId** | **String**| |
### Return type
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/AuthApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/AuthApi.java
index 0462a6231a3..f17d4f8483c 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/AuthApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/AuthApi.java
@@ -986,7 +986,7 @@ public okhttp3.Call createUserAsync(UserCreation userCreation, final ApiCallback
* Build call for createUserExternalPrincipal
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -1005,9 +1005,8 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1015,6 +1014,10 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -1046,11 +1049,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
okhttp3.Call localVarCall = createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
return localVarCall;
@@ -1062,7 +1060,7 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -1084,7 +1082,7 @@ public void createUserExternalPrincipal(String userId, String principalId, Exter
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -1108,7 +1106,7 @@ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId,
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -1790,9 +1788,8 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1800,6 +1797,10 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -2411,6 +2412,137 @@ public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for getExternalPrincipal
+ * @param principalId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/auth/external/principals";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = getExternalPrincipalCall(principalId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * describe external principal by id
+ *
+ * @param principalId (required)
+ * @return ExternalPrincipal
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ExternalPrincipal getExternalPrincipal(String principalId) throws ApiException {
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * describe external principal by id
+ *
+ * @param principalId (required)
+ * @return ApiResponse<ExternalPrincipal>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * describe external principal by id (asynchronously)
+ *
+ * @param principalId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for getGroup
* @param groupId (required)
@@ -2923,144 +3055,6 @@ public okhttp3.Call getUserAsync(String userId, final ApiCallback _callbac
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- /**
- * Build call for getUserExternalPrincipal
- * @param userId (required)
- * @param principalId (required)
- * @param _callback Callback for upload/download progress
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
-
- // verify the required parameter 'principalId' is set
- if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
- }
-
-
- okhttp3.Call localVarCall = getUserExternalPrincipalCall(userId, principalId, _callback);
- return localVarCall;
-
- }
-
- /**
- * get external principal of a user
- *
- * @param userId (required)
- * @param principalId (required)
- * @return ExternalPrincipal
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ExternalPrincipal getUserExternalPrincipal(String userId, String principalId) throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
- return localVarResp.getData();
- }
-
- /**
- * get external principal of a user
- *
- * @param userId (required)
- * @param principalId (required)
- * @return ApiResponse<ExternalPrincipal>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
- }
-
- /**
- * get external principal of a user (asynchronously)
- *
- * @param userId (required)
- * @param principalId (required)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
- localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
- return localVarCall;
- }
/**
* Build call for listGroupMembers
* @param groupId (required)
@@ -3812,7 +3806,7 @@ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix,
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
index fecc4802c95..7296a72cd64 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
@@ -567,7 +567,7 @@ public okhttp3.Call createPresignMultipartUploadAsync(String repository, String
* Build call for createUserExternalPrincipal
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -586,9 +586,8 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -596,6 +595,10 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -627,11 +630,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
okhttp3.Call localVarCall = createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
return localVarCall;
@@ -643,7 +641,7 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -665,7 +663,7 @@ public void createUserExternalPrincipal(String userId, String principalId, Exter
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -689,7 +687,7 @@ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId,
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -731,9 +729,8 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -741,6 +738,10 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -845,8 +846,7 @@ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String princ
return localVarCall;
}
/**
- * Build call for getUserExternalPrincipal
- * @param userId (required)
+ * Build call for getExternalPrincipal
* @param principalId (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
@@ -861,13 +861,11 @@ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String princ
0 | Internal Server Error | - |
*/
- public okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/external/principals";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -875,6 +873,10 @@ public okhttp3.Call getUserExternalPrincipalCall(String userId, String principal
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -894,28 +896,22 @@ public okhttp3.Call getUserExternalPrincipalCall(String userId, String principal
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'principalId' is set
if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
}
- okhttp3.Call localVarCall = getUserExternalPrincipalCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalCall(principalId, _callback);
return localVarCall;
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
* @return ExternalPrincipal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -929,15 +925,14 @@ private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, S
0 | Internal Server Error | - |
*/
- public ExternalPrincipal getUserExternalPrincipal(String userId, String principalId) throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ public ExternalPrincipal getExternalPrincipal(String principalId) throws ApiException {
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
return localVarResp.getData();
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
* @return ApiResponse<ExternalPrincipal>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -951,16 +946,15 @@ public ExternalPrincipal getUserExternalPrincipal(String userId, String principa
0 | Internal Server Error | - |
*/
- public ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ public ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * get external principal of a user (asynchronously)
+ * describe external principal by id (asynchronously)
*
- * @param userId (required)
* @param principalId (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
@@ -975,9 +969,9 @@ public ApiResponse getUserExternalPrincipalWithHttpInfo(Strin
0 | Internal Server Error | - |
*/
- public okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
@@ -1168,7 +1162,7 @@ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix,
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExternalApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExternalApi.java
index e31aeb9d8ad..d55305caf94 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExternalApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExternalApi.java
@@ -61,7 +61,7 @@ public void setApiClient(ApiClient apiClient) {
* Build call for createUserExternalPrincipal
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -80,9 +80,8 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -90,6 +89,10 @@ public okhttp3.Call createUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -121,11 +124,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
okhttp3.Call localVarCall = createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
return localVarCall;
@@ -137,7 +135,7 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -159,7 +157,7 @@ public void createUserExternalPrincipal(String userId, String principalId, Exter
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -183,7 +181,7 @@ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId,
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
+ * @param externalPrincipalCreation (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -225,9 +223,8 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -235,6 +232,10 @@ public okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princi
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -339,8 +340,7 @@ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String princ
return localVarCall;
}
/**
- * Build call for getUserExternalPrincipal
- * @param userId (required)
+ * Build call for getExternalPrincipal
* @param principalId (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
@@ -355,13 +355,11 @@ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String princ
0 | Internal Server Error | - |
*/
- public okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()))
- .replaceAll("\\{" + "principalId" + "\\}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/external/principals";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -369,6 +367,10 @@ public okhttp3.Call getUserExternalPrincipalCall(String userId, String principal
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -388,28 +390,22 @@ public okhttp3.Call getUserExternalPrincipalCall(String userId, String principal
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'principalId' is set
if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
}
- okhttp3.Call localVarCall = getUserExternalPrincipalCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalCall(principalId, _callback);
return localVarCall;
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
* @return ExternalPrincipal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -423,15 +419,14 @@ private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, S
0 | Internal Server Error | - |
*/
- public ExternalPrincipal getUserExternalPrincipal(String userId, String principalId) throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ public ExternalPrincipal getExternalPrincipal(String principalId) throws ApiException {
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
return localVarResp.getData();
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
* @return ApiResponse<ExternalPrincipal>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -445,16 +440,15 @@ public ExternalPrincipal getUserExternalPrincipal(String userId, String principa
0 | Internal Server Error | - |
*/
- public ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ public ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * get external principal of a user (asynchronously)
+ * describe external principal by id (asynchronously)
*
- * @param userId (required)
* @param principalId (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
@@ -469,9 +463,9 @@ public ApiResponse getUserExternalPrincipalWithHttpInfo(Strin
0 | Internal Server Error | - |
*/
- public okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
@@ -499,7 +493,7 @@ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix,
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/AuthApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/AuthApiTest.java
index eab521fc4e3..aff3996512e 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/AuthApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/AuthApiTest.java
@@ -331,6 +331,21 @@ public void getCurrentUserTest() throws ApiException {
// TODO: test validations
}
+ /**
+ * describe external principal by id
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getExternalPrincipalTest() throws ApiException {
+ String principalId = null;
+ ExternalPrincipal response = api.getExternalPrincipal(principalId);
+ // TODO: test validations
+ }
+
/**
* get group
*
@@ -391,22 +406,6 @@ public void getUserTest() throws ApiException {
// TODO: test validations
}
- /**
- * get external principal of a user
- *
- *
- *
- * @throws ApiException
- * if the Api call fails
- */
- @Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
- String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId);
- // TODO: test validations
- }
-
/**
* list group members
*
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
index 217096ab0e6..d2ac81470cd 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
@@ -130,7 +130,7 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
}
/**
- * get external principal of a user
+ * describe external principal by id
*
*
*
@@ -138,10 +138,9 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
* if the Api call fails
*/
@Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
+ public void getExternalPrincipalTest() throws ApiException {
String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId);
+ ExternalPrincipal response = api.getExternalPrincipal(principalId);
// TODO: test validations
}
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExternalApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExternalApiTest.java
index 54c39eea4ee..09ec5293332 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExternalApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExternalApiTest.java
@@ -69,7 +69,7 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
}
/**
- * get external principal of a user
+ * describe external principal by id
*
*
*
@@ -77,10 +77,9 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
* if the Api call fails
*/
@Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
+ public void getExternalPrincipalTest() throws ApiException {
String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId);
+ ExternalPrincipal response = api.getExternalPrincipal(principalId);
// TODO: test validations
}
diff --git a/clients/java/README.md b/clients/java/README.md
index fa6f8dfe512..3baab33a987 100644
--- a/clients/java/README.md
+++ b/clients/java/README.md
@@ -154,28 +154,28 @@ Class | Method | HTTP request | Description
*AuthApi* | [**createGroup**](docs/AuthApi.md#createGroup) | **POST** /auth/groups | create group
*AuthApi* | [**createPolicy**](docs/AuthApi.md#createPolicy) | **POST** /auth/policies | create policy
*AuthApi* | [**createUser**](docs/AuthApi.md#createUser) | **POST** /auth/users | create user
-*AuthApi* | [**createUserExternalPrincipal**](docs/AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+*AuthApi* | [**createUserExternalPrincipal**](docs/AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
*AuthApi* | [**deleteCredentials**](docs/AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
*AuthApi* | [**deleteGroup**](docs/AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group
*AuthApi* | [**deleteGroupMembership**](docs/AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
*AuthApi* | [**deletePolicy**](docs/AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy
*AuthApi* | [**deleteUser**](docs/AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user
-*AuthApi* | [**deleteUserExternalPrincipal**](docs/AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+*AuthApi* | [**deleteUserExternalPrincipal**](docs/AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*AuthApi* | [**detachPolicyFromGroup**](docs/AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
*AuthApi* | [**detachPolicyFromUser**](docs/AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
*AuthApi* | [**getCredentials**](docs/AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
*AuthApi* | [**getCurrentUser**](docs/AuthApi.md#getCurrentUser) | **GET** /user | get current user
+*AuthApi* | [**getExternalPrincipal**](docs/AuthApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
*AuthApi* | [**getGroup**](docs/AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group
*AuthApi* | [**getGroupACL**](docs/AuthApi.md#getGroupACL) | **GET** /auth/groups/{groupId}/acl | get ACL of group
*AuthApi* | [**getPolicy**](docs/AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy
*AuthApi* | [**getUser**](docs/AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user
-*AuthApi* | [**getUserExternalPrincipal**](docs/AuthApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
*AuthApi* | [**listGroupMembers**](docs/AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members
*AuthApi* | [**listGroupPolicies**](docs/AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies
*AuthApi* | [**listGroups**](docs/AuthApi.md#listGroups) | **GET** /auth/groups | list groups
*AuthApi* | [**listPolicies**](docs/AuthApi.md#listPolicies) | **GET** /auth/policies | list policies
*AuthApi* | [**listUserCredentials**](docs/AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-*AuthApi* | [**listUserExternalPrincipals**](docs/AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*AuthApi* | [**listUserExternalPrincipals**](docs/AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*AuthApi* | [**listUserGroups**](docs/AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups
*AuthApi* | [**listUserPolicies**](docs/AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies
*AuthApi* | [**listUsers**](docs/AuthApi.md#listUsers) | **GET** /auth/users | list users
@@ -196,15 +196,15 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**abortPresignMultipartUpload**](docs/ExperimentalApi.md#abortPresignMultipartUpload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
*ExperimentalApi* | [**completePresignMultipartUpload**](docs/ExperimentalApi.md#completePresignMultipartUpload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
*ExperimentalApi* | [**createPresignMultipartUpload**](docs/ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExperimentalApi* | [**getUserExternalPrincipal**](docs/ExperimentalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExperimentalApi* | [**getExternalPrincipal**](docs/ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
*ExperimentalApi* | [**hardResetBranch**](docs/ExperimentalApi.md#hardResetBranch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-*ExperimentalApi* | [**listUserExternalPrincipals**](docs/ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
-*ExternalApi* | [**createUserExternalPrincipal**](docs/ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExternalApi* | [**deleteUserExternalPrincipal**](docs/ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExternalApi* | [**getUserExternalPrincipal**](docs/ExternalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-*ExternalApi* | [**listUserExternalPrincipals**](docs/ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*ExperimentalApi* | [**listUserExternalPrincipals**](docs/ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
+*ExternalApi* | [**createUserExternalPrincipal**](docs/ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExternalApi* | [**deleteUserExternalPrincipal**](docs/ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExternalApi* | [**getExternalPrincipal**](docs/ExternalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
+*ExternalApi* | [**listUserExternalPrincipals**](docs/ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*HealthCheckApi* | [**healthCheck**](docs/HealthCheckApi.md#healthCheck) | **GET** /healthcheck |
*ImportApi* | [**importCancel**](docs/ImportApi.md#importCancel) | **DELETE** /repositories/{repository}/branches/{branch}/import | cancel ongoing import
*ImportApi* | [**importStart**](docs/ImportApi.md#importStart) | **POST** /repositories/{repository}/branches/{branch}/import | import data from object store
diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml
index 60f5ef46651..3de387aa77b 100644
--- a/clients/java/api/openapi.yaml
+++ b/clients/java/api/openapi.yaml
@@ -1378,7 +1378,7 @@ paths:
tags:
- auth
x-accepts: application/json
- /auth/users/{userId}/external/principal/{principalId}:
+ /auth/users/{userId}/external/principals:
delete:
operationId: deleteUserExternalPrincipal
parameters:
@@ -1389,13 +1389,13 @@ paths:
schema:
type: string
style: simple
- - explode: false
- in: path
+ - explode: true
+ in: query
name: principalId
required: true
schema:
type: string
- style: simple
+ style: form
responses:
"204":
description: external principal detached successfully
@@ -1425,56 +1425,6 @@ paths:
- external
- experimental
x-accepts: application/json
- get:
- operationId: getUserExternalPrincipal
- parameters:
- - explode: false
- in: path
- name: userId
- required: true
- schema:
- type: string
- style: simple
- - explode: false
- in: path
- name: principalId
- required: true
- schema:
- type: string
- style: simple
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExternalPrincipal'
- description: external principal
- "401":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Unauthorized
- "404":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Resource Not Found
- "420":
- description: too many requests
- default:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Internal Server Error
- summary: get external principal of a user
- tags:
- - auth
- - external
- - experimental
- x-accepts: application/json
post:
operationId: createUserExternalPrincipal
parameters:
@@ -1485,19 +1435,19 @@ paths:
schema:
type: string
style: simple
- - explode: false
- in: path
+ - explode: true
+ in: query
name: principalId
required: true
schema:
type: string
- style: simple
+ style: form
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalPrincipalCreation'
- required: true
+ required: false
responses:
"201":
description: external principal attached successfully
@@ -1534,7 +1484,7 @@ paths:
- experimental
x-content-type: application/json
x-accepts: application/json
- /auth/users/{userId}/external/principals:
+ /auth/users/{userId}/external/principals/ls:
get:
operationId: listUserExternalPrincipals
parameters:
@@ -1605,6 +1555,50 @@ paths:
- external
- experimental
x-accepts: application/json
+ /auth/external/principals:
+ get:
+ operationId: getExternalPrincipal
+ parameters:
+ - explode: true
+ in: query
+ name: principalId
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExternalPrincipal'
+ description: external principal
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: describe external principal by id
+ tags:
+ - auth
+ - external
+ - experimental
+ x-accepts: application/json
/auth/groups/{groupId}/policies:
get:
operationId: listGroupPolicies
diff --git a/clients/java/docs/AuthApi.md b/clients/java/docs/AuthApi.md
index e9297294e94..febab38cd46 100644
--- a/clients/java/docs/AuthApi.md
+++ b/clients/java/docs/AuthApi.md
@@ -11,28 +11,28 @@ All URIs are relative to */api/v1*
| [**createGroup**](AuthApi.md#createGroup) | **POST** /auth/groups | create group |
| [**createPolicy**](AuthApi.md#createPolicy) | **POST** /auth/policies | create policy |
| [**createUser**](AuthApi.md#createUser) | **POST** /auth/users | create user |
-| [**createUserExternalPrincipal**](AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user |
+| [**createUserExternalPrincipal**](AuthApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user |
| [**deleteCredentials**](AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials |
| [**deleteGroup**](AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group |
| [**deleteGroupMembership**](AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership |
| [**deletePolicy**](AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy |
| [**deleteUser**](AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user |
-| [**deleteUserExternalPrincipal**](AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user |
+| [**deleteUserExternalPrincipal**](AuthApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user |
| [**detachPolicyFromGroup**](AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group |
| [**detachPolicyFromUser**](AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user |
| [**getCredentials**](AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials |
| [**getCurrentUser**](AuthApi.md#getCurrentUser) | **GET** /user | get current user |
+| [**getExternalPrincipal**](AuthApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id |
| [**getGroup**](AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group |
| [**getGroupACL**](AuthApi.md#getGroupACL) | **GET** /auth/groups/{groupId}/acl | get ACL of group |
| [**getPolicy**](AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy |
| [**getUser**](AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user |
-| [**getUserExternalPrincipal**](AuthApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user |
| [**listGroupMembers**](AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members |
| [**listGroupPolicies**](AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies |
| [**listGroups**](AuthApi.md#listGroups) | **GET** /auth/groups | list groups |
| [**listPolicies**](AuthApi.md#listPolicies) | **GET** /auth/policies | list policies |
| [**listUserCredentials**](AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials |
-| [**listUserExternalPrincipals**](AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user |
+| [**listUserExternalPrincipals**](AuthApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user |
| [**listUserGroups**](AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups |
| [**listUserPolicies**](AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies |
| [**listUsers**](AuthApi.md#listUsers) | **GET** /auth/users | list users |
@@ -701,7 +701,7 @@ public class Example {
# **createUserExternalPrincipal**
-> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation).execute();
+> createUserExternalPrincipal(userId, principalId).externalPrincipalCreation(externalPrincipalCreation).execute();
attach external principal to user
@@ -752,7 +752,8 @@ public class Example {
String principalId = "principalId_example"; // String |
ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
try {
- apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ apiInstance.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling AuthApi#createUserExternalPrincipal");
@@ -771,7 +772,7 @@ public class Example {
|------------- | ------------- | ------------- | -------------|
| **userId** | **String**| | |
| **principalId** | **String**| | |
-| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | |
+| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional] |
### Return type
@@ -1722,11 +1723,11 @@ This endpoint does not need any parameter.
|-------------|-------------|------------------|
| **200** | user | - |
-
-# **getGroup**
-> Group getGroup(groupId).execute();
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId).execute();
-get group
+describe external principal by id
### Example
```java
@@ -1771,13 +1772,13 @@ public class Example {
jwt_token.setBearerToken("BEARER TOKEN");
AuthApi apiInstance = new AuthApi(defaultClient);
- String groupId = "groupId_example"; // String |
+ String principalId = "principalId_example"; // String |
try {
- Group result = apiInstance.getGroup(groupId)
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getGroup");
+ System.err.println("Exception when calling AuthApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1791,11 +1792,11 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **groupId** | **String**| | |
+| **principalId** | **String**| | |
### Return type
-[**Group**](Group.md)
+[**ExternalPrincipal**](ExternalPrincipal.md)
### Authorization
@@ -1809,17 +1810,17 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | group | - |
+| **200** | external principal | - |
| **401** | Unauthorized | - |
| **404** | Resource Not Found | - |
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getGroupACL**
-> ACL getGroupACL(groupId).execute();
+
+# **getGroup**
+> Group getGroup(groupId).execute();
-get ACL of group
+get group
### Example
```java
@@ -1866,11 +1867,11 @@ public class Example {
AuthApi apiInstance = new AuthApi(defaultClient);
String groupId = "groupId_example"; // String |
try {
- ACL result = apiInstance.getGroupACL(groupId)
+ Group result = apiInstance.getGroup(groupId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getGroupACL");
+ System.err.println("Exception when calling AuthApi#getGroup");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1888,7 +1889,7 @@ public class Example {
### Return type
-[**ACL**](ACL.md)
+[**Group**](Group.md)
### Authorization
@@ -1902,17 +1903,17 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | ACL of group | - |
+| **200** | group | - |
| **401** | Unauthorized | - |
-| **404** | Group not found, or group found but has no ACL | - |
+| **404** | Resource Not Found | - |
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getPolicy**
-> Policy getPolicy(policyId).execute();
+
+# **getGroupACL**
+> ACL getGroupACL(groupId).execute();
-get policy
+get ACL of group
### Example
```java
@@ -1957,13 +1958,13 @@ public class Example {
jwt_token.setBearerToken("BEARER TOKEN");
AuthApi apiInstance = new AuthApi(defaultClient);
- String policyId = "policyId_example"; // String |
+ String groupId = "groupId_example"; // String |
try {
- Policy result = apiInstance.getPolicy(policyId)
+ ACL result = apiInstance.getGroupACL(groupId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getPolicy");
+ System.err.println("Exception when calling AuthApi#getGroupACL");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -1977,11 +1978,11 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **policyId** | **String**| | |
+| **groupId** | **String**| | |
### Return type
-[**Policy**](Policy.md)
+[**ACL**](ACL.md)
### Authorization
@@ -1995,17 +1996,17 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | policy | - |
+| **200** | ACL of group | - |
| **401** | Unauthorized | - |
-| **404** | Resource Not Found | - |
+| **404** | Group not found, or group found but has no ACL | - |
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getUser**
-> User getUser(userId).execute();
+
+# **getPolicy**
+> Policy getPolicy(policyId).execute();
-get user
+get policy
### Example
```java
@@ -2050,13 +2051,13 @@ public class Example {
jwt_token.setBearerToken("BEARER TOKEN");
AuthApi apiInstance = new AuthApi(defaultClient);
- String userId = "userId_example"; // String |
+ String policyId = "policyId_example"; // String |
try {
- User result = apiInstance.getUser(userId)
+ Policy result = apiInstance.getPolicy(policyId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getUser");
+ System.err.println("Exception when calling AuthApi#getPolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -2070,11 +2071,11 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **userId** | **String**| | |
+| **policyId** | **String**| | |
### Return type
-[**User**](User.md)
+[**Policy**](Policy.md)
### Authorization
@@ -2088,17 +2089,17 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | user | - |
+| **200** | policy | - |
| **401** | Unauthorized | - |
| **404** | Resource Not Found | - |
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId).execute();
+
+# **getUser**
+> User getUser(userId).execute();
-get external principal of a user
+get user
### Example
```java
@@ -2144,13 +2145,12 @@ public class Example {
AuthApi apiInstance = new AuthApi(defaultClient);
String userId = "userId_example"; // String |
- String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId)
+ User result = apiInstance.getUser(userId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling AuthApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling AuthApi#getUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -2165,11 +2165,10 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **userId** | **String**| | |
-| **principalId** | **String**| | |
### Return type
-[**ExternalPrincipal**](ExternalPrincipal.md)
+[**User**](User.md)
### Authorization
@@ -2183,7 +2182,7 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | external principal | - |
+| **200** | user | - |
| **401** | Unauthorized | - |
| **404** | Resource Not Found | - |
| **420** | too many requests | - |
diff --git a/clients/java/docs/ExperimentalApi.md b/clients/java/docs/ExperimentalApi.md
index 93066520d31..16607db1ad9 100644
--- a/clients/java/docs/ExperimentalApi.md
+++ b/clients/java/docs/ExperimentalApi.md
@@ -7,11 +7,11 @@ All URIs are relative to */api/v1*
| [**abortPresignMultipartUpload**](ExperimentalApi.md#abortPresignMultipartUpload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload |
| [**completePresignMultipartUpload**](ExperimentalApi.md#completePresignMultipartUpload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request |
| [**createPresignMultipartUpload**](ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload |
-| [**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user |
-| [**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user |
-| [**getUserExternalPrincipal**](ExperimentalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user |
+| [**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user |
+| [**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user |
+| [**getExternalPrincipal**](ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id |
| [**hardResetBranch**](ExperimentalApi.md#hardResetBranch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch |
-| [**listUserExternalPrincipals**](ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user |
+| [**listUserExternalPrincipals**](ExperimentalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user |
@@ -329,7 +329,7 @@ public class Example {
# **createUserExternalPrincipal**
-> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation).execute();
+> createUserExternalPrincipal(userId, principalId).externalPrincipalCreation(externalPrincipalCreation).execute();
attach external principal to user
@@ -380,7 +380,8 @@ public class Example {
String principalId = "principalId_example"; // String |
ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
try {
- apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ apiInstance.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling ExperimentalApi#createUserExternalPrincipal");
@@ -399,7 +400,7 @@ public class Example {
|------------- | ------------- | ------------- | -------------|
| **userId** | **String**| | |
| **principalId** | **String**| | |
-| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | |
+| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional] |
### Return type
@@ -518,11 +519,11 @@ null (empty response body)
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId).execute();
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId).execute();
-get external principal of a user
+describe external principal by id
### Example
```java
@@ -567,14 +568,13 @@ public class Example {
jwt_token.setBearerToken("BEARER TOKEN");
ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
- String userId = "userId_example"; // String |
String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId)
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling ExperimentalApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling ExperimentalApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -588,7 +588,6 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **userId** | **String**| | |
| **principalId** | **String**| | |
### Return type
diff --git a/clients/java/docs/ExternalApi.md b/clients/java/docs/ExternalApi.md
index 9d68b4d29d3..7c18c871b5d 100644
--- a/clients/java/docs/ExternalApi.md
+++ b/clients/java/docs/ExternalApi.md
@@ -4,15 +4,15 @@ All URIs are relative to */api/v1*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
-| [**createUserExternalPrincipal**](ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user |
-| [**deleteUserExternalPrincipal**](ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user |
-| [**getUserExternalPrincipal**](ExternalApi.md#getUserExternalPrincipal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user |
-| [**listUserExternalPrincipals**](ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user |
+| [**createUserExternalPrincipal**](ExternalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user |
+| [**deleteUserExternalPrincipal**](ExternalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user |
+| [**getExternalPrincipal**](ExternalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id |
+| [**listUserExternalPrincipals**](ExternalApi.md#listUserExternalPrincipals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user |
# **createUserExternalPrincipal**
-> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation).execute();
+> createUserExternalPrincipal(userId, principalId).externalPrincipalCreation(externalPrincipalCreation).execute();
attach external principal to user
@@ -63,7 +63,8 @@ public class Example {
String principalId = "principalId_example"; // String |
ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
try {
- apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ apiInstance.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling ExternalApi#createUserExternalPrincipal");
@@ -82,7 +83,7 @@ public class Example {
|------------- | ------------- | ------------- | -------------|
| **userId** | **String**| | |
| **principalId** | **String**| | |
-| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | |
+| **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional] |
### Return type
@@ -201,11 +202,11 @@ null (empty response body)
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **getUserExternalPrincipal**
-> ExternalPrincipal getUserExternalPrincipal(userId, principalId).execute();
+
+# **getExternalPrincipal**
+> ExternalPrincipal getExternalPrincipal(principalId).execute();
-get external principal of a user
+describe external principal by id
### Example
```java
@@ -250,14 +251,13 @@ public class Example {
jwt_token.setBearerToken("BEARER TOKEN");
ExternalApi apiInstance = new ExternalApi(defaultClient);
- String userId = "userId_example"; // String |
String principalId = "principalId_example"; // String |
try {
- ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId)
+ ExternalPrincipal result = apiInstance.getExternalPrincipal(principalId)
.execute();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling ExternalApi#getUserExternalPrincipal");
+ System.err.println("Exception when calling ExternalApi#getExternalPrincipal");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -271,7 +271,6 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **userId** | **String**| | |
| **principalId** | **String**| | |
### Return type
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/AuthApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/AuthApi.java
index 8ada5533a68..87deaed69fc 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/AuthApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/AuthApi.java
@@ -1343,9 +1343,8 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1353,6 +1352,10 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -1385,11 +1388,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
return createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
}
@@ -1410,12 +1408,21 @@ private okhttp3.Call createUserExternalPrincipalAsync(String userId, String prin
public class APIcreateUserExternalPrincipalRequest {
private final String userId;
private final String principalId;
- private final ExternalPrincipalCreation externalPrincipalCreation;
+ private ExternalPrincipalCreation externalPrincipalCreation;
- private APIcreateUserExternalPrincipalRequest(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
+ private APIcreateUserExternalPrincipalRequest(String userId, String principalId) {
this.userId = userId;
this.principalId = principalId;
+ }
+
+ /**
+ * Set externalPrincipalCreation
+ * @param externalPrincipalCreation (optional)
+ * @return APIcreateUserExternalPrincipalRequest
+ */
+ public APIcreateUserExternalPrincipalRequest externalPrincipalCreation(ExternalPrincipalCreation externalPrincipalCreation) {
this.externalPrincipalCreation = externalPrincipalCreation;
+ return this;
}
/**
@@ -1501,7 +1508,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
* @return APIcreateUserExternalPrincipalRequest
* @http.response.details
@@ -1514,8 +1520,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
0 | Internal Server Error | - |
*/
- public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
- return new APIcreateUserExternalPrincipalRequest(userId, principalId, externalPrincipalCreation);
+ public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId) {
+ return new APIcreateUserExternalPrincipalRequest(userId, principalId);
}
private okhttp3.Call deleteCredentialsCall(String userId, String accessKeyId, final ApiCallback _callback) throws ApiException {
String basePath = null;
@@ -2392,9 +2398,8 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -2402,6 +2407,10 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -3230,6 +3239,181 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw
public APIgetCurrentUserRequest getCurrentUser() {
return new APIgetCurrentUserRequest();
}
+ private okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/auth/external/principals";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
+ }
+
+ return getExternalPrincipalCall(principalId, _callback);
+
+ }
+
+
+ private ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ private okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+
+ public class APIgetExternalPrincipalRequest {
+ private final String principalId;
+
+ private APIgetExternalPrincipalRequest(String principalId) {
+ this.principalId = principalId;
+ }
+
+ /**
+ * Build call for getExternalPrincipal
+ * @param _callback ApiCallback API callback
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
+ return getExternalPrincipalCall(principalId, _callback);
+ }
+
+ /**
+ * Execute getExternalPrincipal request
+ * @return ExternalPrincipal
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ExternalPrincipal execute() throws ApiException {
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Execute getExternalPrincipal request with HTTP info returned
+ * @return ApiResponse<ExternalPrincipal>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse executeWithHttpInfo() throws ApiException {
+ return getExternalPrincipalWithHttpInfo(principalId);
+ }
+
+ /**
+ * Execute getExternalPrincipal request (asynchronously)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
+ return getExternalPrincipalAsync(principalId, _callback);
+ }
+ }
+
+ /**
+ * describe external principal by id
+ *
+ * @param principalId (required)
+ * @return APIgetExternalPrincipalRequest
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | external principal | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public APIgetExternalPrincipalRequest getExternalPrincipal(String principalId) {
+ return new APIgetExternalPrincipalRequest(principalId);
+ }
private okhttp3.Call getGroupCall(String groupId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
@@ -3918,187 +4102,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
public APIgetUserRequest getUser(String userId) {
return new APIgetUserRequest(userId);
}
- private okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
- String basePath = null;
- // Operation Servers
- String[] localBasePaths = new String[] { };
-
- // Determine Base Path to Use
- if (localCustomBaseUrl != null){
- basePath = localCustomBaseUrl;
- } else if ( localBasePaths.length > 0 ) {
- basePath = localBasePaths[localHostIndex];
- } else {
- basePath = null;
- }
-
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- if (localVarContentType != null) {
- localVarHeaderParams.put("Content-Type", localVarContentType);
- }
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
- return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
-
- // verify the required parameter 'principalId' is set
- if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
- }
-
- return getUserExternalPrincipalCall(userId, principalId, _callback);
-
- }
-
-
- private ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
- }
-
- private okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
- localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
- return localVarCall;
- }
-
- public class APIgetUserExternalPrincipalRequest {
- private final String userId;
- private final String principalId;
-
- private APIgetUserExternalPrincipalRequest(String userId, String principalId) {
- this.userId = userId;
- this.principalId = principalId;
- }
-
- /**
- * Build call for getUserExternalPrincipal
- * @param _callback ApiCallback API callback
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalCall(userId, principalId, _callback);
- }
-
- /**
- * Execute getUserExternalPrincipal request
- * @return ExternalPrincipal
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ExternalPrincipal execute() throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
- return localVarResp.getData();
- }
-
- /**
- * Execute getUserExternalPrincipal request with HTTP info returned
- * @return ApiResponse<ExternalPrincipal>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse executeWithHttpInfo() throws ApiException {
- return getUserExternalPrincipalWithHttpInfo(userId, principalId);
- }
-
- /**
- * Execute getUserExternalPrincipal request (asynchronously)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalAsync(userId, principalId, _callback);
- }
- }
-
- /**
- * get external principal of a user
- *
- * @param userId (required)
- * @param principalId (required)
- * @return APIgetUserExternalPrincipalRequest
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 200 | external principal | - |
- 401 | Unauthorized | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public APIgetUserExternalPrincipalRequest getUserExternalPrincipal(String userId, String principalId) {
- return new APIgetUserExternalPrincipalRequest(userId, principalId);
- }
private okhttp3.Call listGroupMembersCall(String groupId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
@@ -5168,7 +5171,7 @@ private okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
index 2152ccf849b..33e31fcf763 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
@@ -749,9 +749,8 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -759,6 +758,10 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -791,11 +794,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
return createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
}
@@ -816,12 +814,21 @@ private okhttp3.Call createUserExternalPrincipalAsync(String userId, String prin
public class APIcreateUserExternalPrincipalRequest {
private final String userId;
private final String principalId;
- private final ExternalPrincipalCreation externalPrincipalCreation;
+ private ExternalPrincipalCreation externalPrincipalCreation;
- private APIcreateUserExternalPrincipalRequest(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
+ private APIcreateUserExternalPrincipalRequest(String userId, String principalId) {
this.userId = userId;
this.principalId = principalId;
+ }
+
+ /**
+ * Set externalPrincipalCreation
+ * @param externalPrincipalCreation (optional)
+ * @return APIcreateUserExternalPrincipalRequest
+ */
+ public APIcreateUserExternalPrincipalRequest externalPrincipalCreation(ExternalPrincipalCreation externalPrincipalCreation) {
this.externalPrincipalCreation = externalPrincipalCreation;
+ return this;
}
/**
@@ -907,7 +914,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
* @return APIcreateUserExternalPrincipalRequest
* @http.response.details
@@ -920,8 +926,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
0 | Internal Server Error | - |
*/
- public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
- return new APIcreateUserExternalPrincipalRequest(userId, principalId, externalPrincipalCreation);
+ public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId) {
+ return new APIcreateUserExternalPrincipalRequest(userId, principalId);
}
private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
String basePath = null;
@@ -940,9 +946,8 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -950,6 +955,10 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -1100,7 +1109,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
public APIdeleteUserExternalPrincipalRequest deleteUserExternalPrincipal(String userId, String principalId) {
return new APIdeleteUserExternalPrincipalRequest(userId, principalId);
}
- private okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -1117,9 +1126,7 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/external/principals";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1127,6 +1134,10 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -1147,47 +1158,40 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
-
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'principalId' is set
if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
}
- return getUserExternalPrincipalCall(userId, principalId, _callback);
+ return getExternalPrincipalCall(principalId, _callback);
}
- private ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ private ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
- private okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- public class APIgetUserExternalPrincipalRequest {
- private final String userId;
+ public class APIgetExternalPrincipalRequest {
private final String principalId;
- private APIgetUserExternalPrincipalRequest(String userId, String principalId) {
- this.userId = userId;
+ private APIgetExternalPrincipalRequest(String principalId) {
this.principalId = principalId;
}
/**
- * Build call for getUserExternalPrincipal
+ * Build call for getExternalPrincipal
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -1202,11 +1206,11 @@ private APIgetUserExternalPrincipalRequest(String userId, String principalId) {
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalCall(userId, principalId, _callback);
+ return getExternalPrincipalCall(principalId, _callback);
}
/**
- * Execute getUserExternalPrincipal request
+ * Execute getExternalPrincipal request
* @return ExternalPrincipal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -1220,12 +1224,12 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
*/
public ExternalPrincipal execute() throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
return localVarResp.getData();
}
/**
- * Execute getUserExternalPrincipal request with HTTP info returned
+ * Execute getExternalPrincipal request with HTTP info returned
* @return ApiResponse<ExternalPrincipal>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -1239,11 +1243,11 @@ public ExternalPrincipal execute() throws ApiException {
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
- return getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ return getExternalPrincipalWithHttpInfo(principalId);
}
/**
- * Execute getUserExternalPrincipal request (asynchronously)
+ * Execute getExternalPrincipal request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -1258,16 +1262,15 @@ public ApiResponse executeWithHttpInfo() throws ApiException
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalAsync(userId, principalId, _callback);
+ return getExternalPrincipalAsync(principalId, _callback);
}
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
- * @return APIgetUserExternalPrincipalRequest
+ * @return APIgetExternalPrincipalRequest
* @http.response.details
Status Code | Description | Response Headers |
@@ -1278,8 +1281,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
0 | Internal Server Error | - |
*/
- public APIgetUserExternalPrincipalRequest getUserExternalPrincipal(String userId, String principalId) {
- return new APIgetUserExternalPrincipalRequest(userId, principalId);
+ public APIgetExternalPrincipalRequest getExternalPrincipal(String principalId) {
+ return new APIgetExternalPrincipalRequest(principalId);
}
private okhttp3.Call hardResetBranchCall(String repository, String branch, String ref, Boolean force, final ApiCallback _callback) throws ApiException {
String basePath = null;
@@ -1512,7 +1515,7 @@ private okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/ExternalApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/ExternalApi.java
index 2ff74393886..9ca35228673 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/ExternalApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/ExternalApi.java
@@ -92,9 +92,8 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = externalPrincipalCreation;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -102,6 +101,10 @@ private okhttp3.Call createUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -134,11 +137,6 @@ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId
throw new ApiException("Missing the required parameter 'principalId' when calling createUserExternalPrincipal(Async)");
}
- // verify the required parameter 'externalPrincipalCreation' is set
- if (externalPrincipalCreation == null) {
- throw new ApiException("Missing the required parameter 'externalPrincipalCreation' when calling createUserExternalPrincipal(Async)");
- }
-
return createUserExternalPrincipalCall(userId, principalId, externalPrincipalCreation, _callback);
}
@@ -159,12 +157,21 @@ private okhttp3.Call createUserExternalPrincipalAsync(String userId, String prin
public class APIcreateUserExternalPrincipalRequest {
private final String userId;
private final String principalId;
- private final ExternalPrincipalCreation externalPrincipalCreation;
+ private ExternalPrincipalCreation externalPrincipalCreation;
- private APIcreateUserExternalPrincipalRequest(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
+ private APIcreateUserExternalPrincipalRequest(String userId, String principalId) {
this.userId = userId;
this.principalId = principalId;
+ }
+
+ /**
+ * Set externalPrincipalCreation
+ * @param externalPrincipalCreation (optional)
+ * @return APIcreateUserExternalPrincipalRequest
+ */
+ public APIcreateUserExternalPrincipalRequest externalPrincipalCreation(ExternalPrincipalCreation externalPrincipalCreation) {
this.externalPrincipalCreation = externalPrincipalCreation;
+ return this;
}
/**
@@ -250,7 +257,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
*
* @param userId (required)
* @param principalId (required)
- * @param externalPrincipalCreation (required)
* @return APIcreateUserExternalPrincipalRequest
* @http.response.details
@@ -263,8 +269,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
0 | Internal Server Error | - |
*/
- public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) {
- return new APIcreateUserExternalPrincipalRequest(userId, principalId, externalPrincipalCreation);
+ public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId) {
+ return new APIcreateUserExternalPrincipalRequest(userId, principalId);
}
private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
String basePath = null;
@@ -283,9 +289,8 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -293,6 +298,10 @@ private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String princ
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -443,7 +452,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
public APIdeleteUserExternalPrincipalRequest deleteUserExternalPrincipal(String userId, String principalId) {
return new APIdeleteUserExternalPrincipalRequest(userId, principalId);
}
- private okhttp3.Call getUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getExternalPrincipalCall(String principalId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -460,9 +469,7 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principal/{principalId}"
- .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()))
- .replace("{" + "principalId" + "}", localVarApiClient.escapeString(principalId.toString()));
+ String localVarPath = "/auth/external/principals";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -470,6 +477,10 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (principalId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("principalId", principalId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -490,47 +501,40 @@ private okhttp3.Call getUserExternalPrincipalCall(String userId, String principa
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getUserExternalPrincipalValidateBeforeCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling getUserExternalPrincipal(Async)");
- }
-
+ private okhttp3.Call getExternalPrincipalValidateBeforeCall(String principalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'principalId' is set
if (principalId == null) {
- throw new ApiException("Missing the required parameter 'principalId' when calling getUserExternalPrincipal(Async)");
+ throw new ApiException("Missing the required parameter 'principalId' when calling getExternalPrincipal(Async)");
}
- return getUserExternalPrincipalCall(userId, principalId, _callback);
+ return getExternalPrincipalCall(principalId, _callback);
}
- private ApiResponse getUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ private ApiResponse getExternalPrincipalWithHttpInfo(String principalId) throws ApiException {
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
- private okhttp3.Call getUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ okhttp3.Call localVarCall = getExternalPrincipalValidateBeforeCall(principalId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- public class APIgetUserExternalPrincipalRequest {
- private final String userId;
+ public class APIgetExternalPrincipalRequest {
private final String principalId;
- private APIgetUserExternalPrincipalRequest(String userId, String principalId) {
- this.userId = userId;
+ private APIgetExternalPrincipalRequest(String principalId) {
this.principalId = principalId;
}
/**
- * Build call for getUserExternalPrincipal
+ * Build call for getExternalPrincipal
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -545,11 +549,11 @@ private APIgetUserExternalPrincipalRequest(String userId, String principalId) {
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalCall(userId, principalId, _callback);
+ return getExternalPrincipalCall(principalId, _callback);
}
/**
- * Execute getUserExternalPrincipal request
+ * Execute getExternalPrincipal request
* @return ExternalPrincipal
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -563,12 +567,12 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
*/
public ExternalPrincipal execute() throws ApiException {
- ApiResponse localVarResp = getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ ApiResponse localVarResp = getExternalPrincipalWithHttpInfo(principalId);
return localVarResp.getData();
}
/**
- * Execute getUserExternalPrincipal request with HTTP info returned
+ * Execute getExternalPrincipal request with HTTP info returned
* @return ApiResponse<ExternalPrincipal>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -582,11 +586,11 @@ public ExternalPrincipal execute() throws ApiException {
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
- return getUserExternalPrincipalWithHttpInfo(userId, principalId);
+ return getExternalPrincipalWithHttpInfo(principalId);
}
/**
- * Execute getUserExternalPrincipal request (asynchronously)
+ * Execute getExternalPrincipal request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -601,16 +605,15 @@ public ApiResponse executeWithHttpInfo() throws ApiException
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return getUserExternalPrincipalAsync(userId, principalId, _callback);
+ return getExternalPrincipalAsync(principalId, _callback);
}
}
/**
- * get external principal of a user
+ * describe external principal by id
*
- * @param userId (required)
* @param principalId (required)
- * @return APIgetUserExternalPrincipalRequest
+ * @return APIgetExternalPrincipalRequest
* @http.response.details
Status Code | Description | Response Headers |
@@ -621,8 +624,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback)
0 | Internal Server Error | - |
*/
- public APIgetUserExternalPrincipalRequest getUserExternalPrincipal(String userId, String principalId) {
- return new APIgetUserExternalPrincipalRequest(userId, principalId);
+ public APIgetExternalPrincipalRequest getExternalPrincipal(String principalId) {
+ return new APIgetExternalPrincipalRequest(principalId);
}
private okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
String basePath = null;
@@ -641,7 +644,7 @@ private okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/auth/users/{userId}/external/principals"
+ String localVarPath = "/auth/users/{userId}/external/principals/ls"
.replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));
List localVarQueryParams = new ArrayList();
diff --git a/clients/java/src/test/java/io/lakefs/clients/sdk/AuthApiTest.java b/clients/java/src/test/java/io/lakefs/clients/sdk/AuthApiTest.java
index 52f679e23aa..f9d84601df9 100644
--- a/clients/java/src/test/java/io/lakefs/clients/sdk/AuthApiTest.java
+++ b/clients/java/src/test/java/io/lakefs/clients/sdk/AuthApiTest.java
@@ -156,7 +156,8 @@ public void createUserExternalPrincipalTest() throws ApiException {
String userId = null;
String principalId = null;
ExternalPrincipalCreation externalPrincipalCreation = null;
- api.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ api.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
// TODO: test validations
}
@@ -296,6 +297,19 @@ public void getCurrentUserTest() throws ApiException {
// TODO: test validations
}
+ /**
+ * describe external principal by id
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void getExternalPrincipalTest() throws ApiException {
+ String principalId = null;
+ ExternalPrincipal response = api.getExternalPrincipal(principalId)
+ .execute();
+ // TODO: test validations
+ }
+
/**
* get group
*
@@ -348,20 +362,6 @@ public void getUserTest() throws ApiException {
// TODO: test validations
}
- /**
- * get external principal of a user
- *
- * @throws ApiException if the Api call fails
- */
- @Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
- String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId)
- .execute();
- // TODO: test validations
- }
-
/**
* list group members
*
diff --git a/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java b/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
index 0a309a9169b..eec86204479 100644
--- a/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
+++ b/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
@@ -108,7 +108,8 @@ public void createUserExternalPrincipalTest() throws ApiException {
String userId = null;
String principalId = null;
ExternalPrincipalCreation externalPrincipalCreation = null;
- api.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ api.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
// TODO: test validations
}
@@ -128,15 +129,14 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
}
/**
- * get external principal of a user
+ * describe external principal by id
*
* @throws ApiException if the Api call fails
*/
@Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
+ public void getExternalPrincipalTest() throws ApiException {
String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId)
+ ExternalPrincipal response = api.getExternalPrincipal(principalId)
.execute();
// TODO: test validations
}
diff --git a/clients/java/src/test/java/io/lakefs/clients/sdk/ExternalApiTest.java b/clients/java/src/test/java/io/lakefs/clients/sdk/ExternalApiTest.java
index 8fa702c7cae..602fc8a898b 100644
--- a/clients/java/src/test/java/io/lakefs/clients/sdk/ExternalApiTest.java
+++ b/clients/java/src/test/java/io/lakefs/clients/sdk/ExternalApiTest.java
@@ -44,7 +44,8 @@ public void createUserExternalPrincipalTest() throws ApiException {
String userId = null;
String principalId = null;
ExternalPrincipalCreation externalPrincipalCreation = null;
- api.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+ api.createUserExternalPrincipal(userId, principalId)
+ .externalPrincipalCreation(externalPrincipalCreation)
.execute();
// TODO: test validations
}
@@ -64,15 +65,14 @@ public void deleteUserExternalPrincipalTest() throws ApiException {
}
/**
- * get external principal of a user
+ * describe external principal by id
*
* @throws ApiException if the Api call fails
*/
@Test
- public void getUserExternalPrincipalTest() throws ApiException {
- String userId = null;
+ public void getExternalPrincipalTest() throws ApiException {
String principalId = null;
- ExternalPrincipal response = api.getUserExternalPrincipal(userId, principalId)
+ ExternalPrincipal response = api.getExternalPrincipal(principalId)
.execute();
// TODO: test validations
}
diff --git a/clients/python-legacy/README.md b/clients/python-legacy/README.md
index 929b3f54440..ae4e3c3cab1 100644
--- a/clients/python-legacy/README.md
+++ b/clients/python-legacy/README.md
@@ -127,28 +127,28 @@ Class | Method | HTTP request | Description
*AuthApi* | [**create_group**](docs/AuthApi.md#create_group) | **POST** /auth/groups | create group
*AuthApi* | [**create_policy**](docs/AuthApi.md#create_policy) | **POST** /auth/policies | create policy
*AuthApi* | [**create_user**](docs/AuthApi.md#create_user) | **POST** /auth/users | create user
-*AuthApi* | [**create_user_external_principal**](docs/AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+*AuthApi* | [**create_user_external_principal**](docs/AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
*AuthApi* | [**delete_credentials**](docs/AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
*AuthApi* | [**delete_group**](docs/AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group
*AuthApi* | [**delete_group_membership**](docs/AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
*AuthApi* | [**delete_policy**](docs/AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy
*AuthApi* | [**delete_user**](docs/AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user
-*AuthApi* | [**delete_user_external_principal**](docs/AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+*AuthApi* | [**delete_user_external_principal**](docs/AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*AuthApi* | [**detach_policy_from_group**](docs/AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
*AuthApi* | [**detach_policy_from_user**](docs/AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
*AuthApi* | [**get_credentials**](docs/AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
*AuthApi* | [**get_current_user**](docs/AuthApi.md#get_current_user) | **GET** /user | get current user
+*AuthApi* | [**get_external_principal**](docs/AuthApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
*AuthApi* | [**get_group**](docs/AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group
*AuthApi* | [**get_group_acl**](docs/AuthApi.md#get_group_acl) | **GET** /auth/groups/{groupId}/acl | get ACL of group
*AuthApi* | [**get_policy**](docs/AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy
*AuthApi* | [**get_user**](docs/AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user
-*AuthApi* | [**get_user_external_principal**](docs/AuthApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
*AuthApi* | [**list_group_members**](docs/AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members
*AuthApi* | [**list_group_policies**](docs/AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies
*AuthApi* | [**list_groups**](docs/AuthApi.md#list_groups) | **GET** /auth/groups | list groups
*AuthApi* | [**list_policies**](docs/AuthApi.md#list_policies) | **GET** /auth/policies | list policies
*AuthApi* | [**list_user_credentials**](docs/AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-*AuthApi* | [**list_user_external_principals**](docs/AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*AuthApi* | [**list_user_external_principals**](docs/AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*AuthApi* | [**list_user_groups**](docs/AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups
*AuthApi* | [**list_user_policies**](docs/AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies
*AuthApi* | [**list_users**](docs/AuthApi.md#list_users) | **GET** /auth/users | list users
@@ -169,15 +169,15 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**abort_presign_multipart_upload**](docs/ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
*ExperimentalApi* | [**complete_presign_multipart_upload**](docs/ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
*ExperimentalApi* | [**create_presign_multipart_upload**](docs/ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExperimentalApi* | [**get_user_external_principal**](docs/ExperimentalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExperimentalApi* | [**get_external_principal**](docs/ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
*ExperimentalApi* | [**hard_reset_branch**](docs/ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-*ExperimentalApi* | [**list_user_external_principals**](docs/ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
-*ExternalApi* | [**create_user_external_principal**](docs/ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExternalApi* | [**delete_user_external_principal**](docs/ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExternalApi* | [**get_user_external_principal**](docs/ExternalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-*ExternalApi* | [**list_user_external_principals**](docs/ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*ExperimentalApi* | [**list_user_external_principals**](docs/ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
+*ExternalApi* | [**create_user_external_principal**](docs/ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExternalApi* | [**delete_user_external_principal**](docs/ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExternalApi* | [**get_external_principal**](docs/ExternalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
+*ExternalApi* | [**list_user_external_principals**](docs/ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*HealthCheckApi* | [**health_check**](docs/HealthCheckApi.md#health_check) | **GET** /healthcheck |
*ImportApi* | [**import_cancel**](docs/ImportApi.md#import_cancel) | **DELETE** /repositories/{repository}/branches/{branch}/import | cancel ongoing import
*ImportApi* | [**import_start**](docs/ImportApi.md#import_start) | **POST** /repositories/{repository}/branches/{branch}/import | import data from object store
diff --git a/clients/python-legacy/docs/AuthApi.md b/clients/python-legacy/docs/AuthApi.md
index 13f315ed897..d80931429c1 100644
--- a/clients/python-legacy/docs/AuthApi.md
+++ b/clients/python-legacy/docs/AuthApi.md
@@ -11,28 +11,28 @@ Method | HTTP request | Description
[**create_group**](AuthApi.md#create_group) | **POST** /auth/groups | create group
[**create_policy**](AuthApi.md#create_policy) | **POST** /auth/policies | create policy
[**create_user**](AuthApi.md#create_user) | **POST** /auth/users | create user
-[**create_user_external_principal**](AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+[**create_user_external_principal**](AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
[**delete_credentials**](AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
[**delete_group**](AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group
[**delete_group_membership**](AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
[**delete_policy**](AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy
[**delete_user**](AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user
-[**delete_user_external_principal**](AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+[**delete_user_external_principal**](AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**detach_policy_from_group**](AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
[**detach_policy_from_user**](AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
[**get_credentials**](AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
[**get_current_user**](AuthApi.md#get_current_user) | **GET** /user | get current user
+[**get_external_principal**](AuthApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
[**get_group**](AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group
[**get_group_acl**](AuthApi.md#get_group_acl) | **GET** /auth/groups/{groupId}/acl | get ACL of group
[**get_policy**](AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy
[**get_user**](AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user
-[**get_user_external_principal**](AuthApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
[**list_group_members**](AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members
[**list_group_policies**](AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies
[**list_groups**](AuthApi.md#list_groups) | **GET** /auth/groups | list groups
[**list_policies**](AuthApi.md#list_policies) | **GET** /auth/policies | list policies
[**list_user_credentials**](AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-[**list_user_external_principals**](AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**list_user_external_principals**](AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
[**list_user_groups**](AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups
[**list_user_policies**](AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies
[**list_users**](AuthApi.md#list_users) | **GET** /auth/users | list users
@@ -821,7 +821,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id)
attach external principal to user
@@ -892,12 +892,20 @@ with lakefs_client.ApiClient(configuration) as api_client:
key="key_example",
),
],
- ) # ExternalPrincipalCreation |
+ ) # ExternalPrincipalCreation | (optional)
# example passing only required values which don't have defaults set
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id)
+ except lakefs_client.ApiException as e:
+ print("Exception when calling AuthApi->create_user_external_principal: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # attach external principal to user
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except lakefs_client.ApiException as e:
print("Exception when calling AuthApi->create_user_external_principal: %s\n" % e)
```
@@ -909,7 +917,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -2005,10 +2013,10 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_group**
-> Group get_group(group_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get group
+describe external principal by id
### Example
@@ -2022,8 +2030,8 @@ get group
import time
import lakefs_client
from lakefs_client.api import auth_api
+from lakefs_client.model.external_principal import ExternalPrincipal
from lakefs_client.model.error import Error
-from lakefs_client.model.group import Group
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
@@ -2069,15 +2077,15 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = auth_api.AuthApi(api_client)
- group_id = "groupId_example" # str |
+ principal_id = "principalId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get group
- api_response = api_instance.get_group(group_id)
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling AuthApi->get_group: %s\n" % e)
+ print("Exception when calling AuthApi->get_external_principal: %s\n" % e)
```
@@ -2085,11 +2093,11 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| |
+ **principal_id** | **str**| |
### Return type
-[**Group**](Group.md)
+[**ExternalPrincipal**](ExternalPrincipal.md)
### Authorization
@@ -2105,7 +2113,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | group | - |
+**200** | external principal | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -2113,10 +2121,10 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_group_acl**
-> ACL get_group_acl(group_id)
+# **get_group**
+> Group get_group(group_id)
-get ACL of group
+get group
### Example
@@ -2130,9 +2138,8 @@ get ACL of group
import time
import lakefs_client
from lakefs_client.api import auth_api
-from lakefs_client.model.acl import ACL
-from lakefs_client.model.error_no_acl import ErrorNoACL
from lakefs_client.model.error import Error
+from lakefs_client.model.group import Group
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
@@ -2182,11 +2189,11 @@ with lakefs_client.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set
try:
- # get ACL of group
- api_response = api_instance.get_group_acl(group_id)
+ # get group
+ api_response = api_instance.get_group(group_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling AuthApi->get_group_acl: %s\n" % e)
+ print("Exception when calling AuthApi->get_group: %s\n" % e)
```
@@ -2198,7 +2205,7 @@ Name | Type | Description | Notes
### Return type
-[**ACL**](ACL.md)
+[**Group**](Group.md)
### Authorization
@@ -2214,18 +2221,18 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | ACL of group | - |
+**200** | group | - |
**401** | Unauthorized | - |
-**404** | Group not found, or group found but has no ACL | - |
+**404** | Resource Not Found | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_policy**
-> Policy get_policy(policy_id)
+# **get_group_acl**
+> ACL get_group_acl(group_id)
-get policy
+get ACL of group
### Example
@@ -2239,7 +2246,8 @@ get policy
import time
import lakefs_client
from lakefs_client.api import auth_api
-from lakefs_client.model.policy import Policy
+from lakefs_client.model.acl import ACL
+from lakefs_client.model.error_no_acl import ErrorNoACL
from lakefs_client.model.error import Error
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
@@ -2286,15 +2294,15 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = auth_api.AuthApi(api_client)
- policy_id = "policyId_example" # str |
+ group_id = "groupId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get policy
- api_response = api_instance.get_policy(policy_id)
+ # get ACL of group
+ api_response = api_instance.get_group_acl(group_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling AuthApi->get_policy: %s\n" % e)
+ print("Exception when calling AuthApi->get_group_acl: %s\n" % e)
```
@@ -2302,11 +2310,11 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **policy_id** | **str**| |
+ **group_id** | **str**| |
### Return type
-[**Policy**](Policy.md)
+[**ACL**](ACL.md)
### Authorization
@@ -2322,18 +2330,18 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | policy | - |
+**200** | ACL of group | - |
**401** | Unauthorized | - |
-**404** | Resource Not Found | - |
+**404** | Group not found, or group found but has no ACL | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user**
-> User get_user(user_id)
+# **get_policy**
+> Policy get_policy(policy_id)
-get user
+get policy
### Example
@@ -2347,8 +2355,8 @@ get user
import time
import lakefs_client
from lakefs_client.api import auth_api
+from lakefs_client.model.policy import Policy
from lakefs_client.model.error import Error
-from lakefs_client.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
@@ -2394,15 +2402,15 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = auth_api.AuthApi(api_client)
- user_id = "userId_example" # str |
+ policy_id = "policyId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get user
- api_response = api_instance.get_user(user_id)
+ # get policy
+ api_response = api_instance.get_policy(policy_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling AuthApi->get_user: %s\n" % e)
+ print("Exception when calling AuthApi->get_policy: %s\n" % e)
```
@@ -2410,11 +2418,11 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
+ **policy_id** | **str**| |
### Return type
-[**User**](User.md)
+[**Policy**](Policy.md)
### Authorization
@@ -2430,7 +2438,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | user | - |
+**200** | policy | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -2438,10 +2446,10 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_user**
+> User get_user(user_id)
-get external principal of a user
+get user
### Example
@@ -2455,8 +2463,8 @@ get external principal of a user
import time
import lakefs_client
from lakefs_client.api import auth_api
-from lakefs_client.model.external_principal import ExternalPrincipal
from lakefs_client.model.error import Error
+from lakefs_client.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
@@ -2503,15 +2511,14 @@ with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = auth_api.AuthApi(api_client)
user_id = "userId_example" # str |
- principal_id = "principalId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
+ # get user
+ api_response = api_instance.get_user(user_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling AuthApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling AuthApi->get_user: %s\n" % e)
```
@@ -2520,11 +2527,10 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
- **principal_id** | **str**| |
### Return type
-[**ExternalPrincipal**](ExternalPrincipal.md)
+[**User**](User.md)
### Authorization
@@ -2540,7 +2546,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | external principal | - |
+**200** | user | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
diff --git a/clients/python-legacy/docs/ExperimentalApi.md b/clients/python-legacy/docs/ExperimentalApi.md
index f3d3ff682af..a9b48f81543 100644
--- a/clients/python-legacy/docs/ExperimentalApi.md
+++ b/clients/python-legacy/docs/ExperimentalApi.md
@@ -7,11 +7,11 @@ Method | HTTP request | Description
[**abort_presign_multipart_upload**](ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
[**complete_presign_multipart_upload**](ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
[**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**get_user_external_principal**](ExperimentalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
[**hard_reset_branch**](ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-[**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
# **abort_presign_multipart_upload**
@@ -412,7 +412,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id)
attach external principal to user
@@ -483,12 +483,20 @@ with lakefs_client.ApiClient(configuration) as api_client:
key="key_example",
),
],
- ) # ExternalPrincipalCreation |
+ ) # ExternalPrincipalCreation | (optional)
# example passing only required values which don't have defaults set
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id)
+ except lakefs_client.ApiException as e:
+ print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # attach external principal to user
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except lakefs_client.ApiException as e:
print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e)
```
@@ -500,7 +508,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -637,10 +645,10 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get external principal of a user
+describe external principal by id
### Example
@@ -701,16 +709,15 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = experimental_api.ExperimentalApi(api_client)
- user_id = "userId_example" # str |
principal_id = "principalId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling ExperimentalApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling ExperimentalApi->get_external_principal: %s\n" % e)
```
@@ -718,7 +725,6 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
**principal_id** | **str**| |
### Return type
diff --git a/clients/python-legacy/docs/ExternalApi.md b/clients/python-legacy/docs/ExternalApi.md
index 5f3684047c5..2f213f74f0e 100644
--- a/clients/python-legacy/docs/ExternalApi.md
+++ b/clients/python-legacy/docs/ExternalApi.md
@@ -4,14 +4,14 @@ All URIs are relative to *http://localhost/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**create_user_external_principal**](ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**delete_user_external_principal**](ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**get_user_external_principal**](ExternalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-[**list_user_external_principals**](ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**create_user_external_principal**](ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**delete_user_external_principal**](ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**get_external_principal**](ExternalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
+[**list_user_external_principals**](ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id)
attach external principal to user
@@ -82,12 +82,20 @@ with lakefs_client.ApiClient(configuration) as api_client:
key="key_example",
),
],
- ) # ExternalPrincipalCreation |
+ ) # ExternalPrincipalCreation | (optional)
# example passing only required values which don't have defaults set
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id)
+ except lakefs_client.ApiException as e:
+ print("Exception when calling ExternalApi->create_user_external_principal: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # attach external principal to user
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except lakefs_client.ApiException as e:
print("Exception when calling ExternalApi->create_user_external_principal: %s\n" % e)
```
@@ -99,7 +107,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -236,10 +244,10 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get external principal of a user
+describe external principal by id
### Example
@@ -300,16 +308,15 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = external_api.ExternalApi(api_client)
- user_id = "userId_example" # str |
principal_id = "principalId_example" # str |
# example passing only required values which don't have defaults set
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
pprint(api_response)
except lakefs_client.ApiException as e:
- print("Exception when calling ExternalApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling ExternalApi->get_external_principal: %s\n" % e)
```
@@ -317,7 +324,6 @@ with lakefs_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
**principal_id** | **str**| |
### Return type
diff --git a/clients/python-legacy/lakefs_client/api/auth_api.py b/clients/python-legacy/lakefs_client/api/auth_api.py
index 0dd09d2d8ca..62d7e032a2f 100644
--- a/clients/python-legacy/lakefs_client/api/auth_api.py
+++ b/clients/python-legacy/lakefs_client/api/auth_api.py
@@ -467,7 +467,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'create_user_external_principal',
'http_method': 'POST',
'servers': None,
@@ -481,7 +481,6 @@ def __init__(self, api_client=None):
'required': [
'user_id',
'principal_id',
- 'external_principal_creation',
],
'nullable': [
],
@@ -509,7 +508,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
'external_principal_creation': 'body',
},
'collection_format_map': {
@@ -822,7 +821,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'delete_user_external_principal',
'http_method': 'DELETE',
'servers': None,
@@ -860,7 +859,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -1104,9 +1103,9 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_group_endpoint = _Endpoint(
+ self.get_external_principal_endpoint = _Endpoint(
settings={
- 'response_type': (Group,),
+ 'response_type': (ExternalPrincipal,),
'auth': [
'basic_auth',
'cookie_auth',
@@ -1114,17 +1113,17 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/groups/{groupId}',
- 'operation_id': 'get_group',
+ 'endpoint_path': '/auth/external/principals',
+ 'operation_id': 'get_external_principal',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
- 'group_id',
+ 'principal_id',
],
'required': [
- 'group_id',
+ 'principal_id',
],
'nullable': [
],
@@ -1139,14 +1138,14 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
- 'group_id':
+ 'principal_id':
(str,),
},
'attribute_map': {
- 'group_id': 'groupId',
+ 'principal_id': 'principalId',
},
'location_map': {
- 'group_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -1159,9 +1158,9 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_group_acl_endpoint = _Endpoint(
+ self.get_group_endpoint = _Endpoint(
settings={
- 'response_type': (ACL,),
+ 'response_type': (Group,),
'auth': [
'basic_auth',
'cookie_auth',
@@ -1169,8 +1168,8 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/groups/{groupId}/acl',
- 'operation_id': 'get_group_acl',
+ 'endpoint_path': '/auth/groups/{groupId}',
+ 'operation_id': 'get_group',
'http_method': 'GET',
'servers': None,
},
@@ -1214,9 +1213,9 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_policy_endpoint = _Endpoint(
+ self.get_group_acl_endpoint = _Endpoint(
settings={
- 'response_type': (Policy,),
+ 'response_type': (ACL,),
'auth': [
'basic_auth',
'cookie_auth',
@@ -1224,17 +1223,17 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/policies/{policyId}',
- 'operation_id': 'get_policy',
+ 'endpoint_path': '/auth/groups/{groupId}/acl',
+ 'operation_id': 'get_group_acl',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
- 'policy_id',
+ 'group_id',
],
'required': [
- 'policy_id',
+ 'group_id',
],
'nullable': [
],
@@ -1249,14 +1248,14 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
- 'policy_id':
+ 'group_id':
(str,),
},
'attribute_map': {
- 'policy_id': 'policyId',
+ 'group_id': 'groupId',
},
'location_map': {
- 'policy_id': 'path',
+ 'group_id': 'path',
},
'collection_format_map': {
}
@@ -1269,9 +1268,9 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_user_endpoint = _Endpoint(
+ self.get_policy_endpoint = _Endpoint(
settings={
- 'response_type': (User,),
+ 'response_type': (Policy,),
'auth': [
'basic_auth',
'cookie_auth',
@@ -1279,17 +1278,17 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}',
- 'operation_id': 'get_user',
+ 'endpoint_path': '/auth/policies/{policyId}',
+ 'operation_id': 'get_policy',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
- 'user_id',
+ 'policy_id',
],
'required': [
- 'user_id',
+ 'policy_id',
],
'nullable': [
],
@@ -1304,14 +1303,14 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
- 'user_id':
+ 'policy_id':
(str,),
},
'attribute_map': {
- 'user_id': 'userId',
+ 'policy_id': 'policyId',
},
'location_map': {
- 'user_id': 'path',
+ 'policy_id': 'path',
},
'collection_format_map': {
}
@@ -1324,9 +1323,9 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_user_external_principal_endpoint = _Endpoint(
+ self.get_user_endpoint = _Endpoint(
settings={
- 'response_type': (ExternalPrincipal,),
+ 'response_type': (User,),
'auth': [
'basic_auth',
'cookie_auth',
@@ -1334,19 +1333,17 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
- 'operation_id': 'get_user_external_principal',
+ 'endpoint_path': '/auth/users/{userId}',
+ 'operation_id': 'get_user',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'user_id',
- 'principal_id',
],
'required': [
'user_id',
- 'principal_id',
],
'nullable': [
],
@@ -1363,16 +1360,12 @@ def __init__(self, api_client=None):
'openapi_types': {
'user_id':
(str,),
- 'principal_id':
- (str,),
},
'attribute_map': {
'user_id': 'userId',
- 'principal_id': 'principalId',
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
},
'collection_format_map': {
}
@@ -1761,7 +1754,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principals',
+ 'endpoint_path': '/auth/users/{userId}/external/principals/ls',
'operation_id': 'list_user_external_principals',
'http_method': 'GET',
'servers': None,
@@ -2689,7 +2682,6 @@ def create_user_external_principal(
self,
user_id,
principal_id,
- external_principal_creation,
**kwargs
):
"""attach external principal to user # noqa: E501
@@ -2697,15 +2689,15 @@ def create_user_external_principal(
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_user_external_principal(user_id, principal_id, external_principal_creation, async_req=True)
+ >>> thread = api.create_user_external_principal(user_id, principal_id, async_req=True)
>>> result = thread.get()
Args:
user_id (str):
principal_id (str):
- external_principal_creation (ExternalPrincipalCreation):
Keyword Args:
+ external_principal_creation (ExternalPrincipalCreation): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -2754,8 +2746,6 @@ def create_user_external_principal(
user_id
kwargs['principal_id'] = \
principal_id
- kwargs['external_principal_creation'] = \
- external_principal_creation
return self.create_user_external_principal_endpoint.call_with_http_info(**kwargs)
def delete_credentials(
@@ -3427,21 +3417,21 @@ def get_current_user(
kwargs['_host_index'] = kwargs.get('_host_index')
return self.get_current_user_endpoint.call_with_http_info(**kwargs)
- def get_group(
+ def get_external_principal(
self,
- group_id,
+ principal_id,
**kwargs
):
- """get group # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group(group_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
Args:
- group_id (str):
+ principal_id (str):
Keyword Args:
_return_http_data_only (bool): response data without head status
@@ -3465,7 +3455,7 @@ def get_group(
async_req (bool): execute request asynchronously
Returns:
- Group
+ ExternalPrincipal
If the method is called asynchronously, returns the request
thread.
"""
@@ -3488,21 +3478,21 @@ def get_group(
'_check_return_type', True
)
kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- return self.get_group_endpoint.call_with_http_info(**kwargs)
+ kwargs['principal_id'] = \
+ principal_id
+ return self.get_external_principal_endpoint.call_with_http_info(**kwargs)
- def get_group_acl(
+ def get_group(
self,
group_id,
**kwargs
):
- """get ACL of group # noqa: E501
+ """get group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group_acl(group_id, async_req=True)
+ >>> thread = api.get_group(group_id, async_req=True)
>>> result = thread.get()
Args:
@@ -3530,7 +3520,7 @@ def get_group_acl(
async_req (bool): execute request asynchronously
Returns:
- ACL
+ Group
If the method is called asynchronously, returns the request
thread.
"""
@@ -3555,23 +3545,23 @@ def get_group_acl(
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['group_id'] = \
group_id
- return self.get_group_acl_endpoint.call_with_http_info(**kwargs)
+ return self.get_group_endpoint.call_with_http_info(**kwargs)
- def get_policy(
+ def get_group_acl(
self,
- policy_id,
+ group_id,
**kwargs
):
- """get policy # noqa: E501
+ """get ACL of group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_policy(policy_id, async_req=True)
+ >>> thread = api.get_group_acl(group_id, async_req=True)
>>> result = thread.get()
Args:
- policy_id (str):
+ group_id (str):
Keyword Args:
_return_http_data_only (bool): response data without head status
@@ -3595,7 +3585,7 @@ def get_policy(
async_req (bool): execute request asynchronously
Returns:
- Policy
+ ACL
If the method is called asynchronously, returns the request
thread.
"""
@@ -3618,25 +3608,25 @@ def get_policy(
'_check_return_type', True
)
kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['policy_id'] = \
- policy_id
- return self.get_policy_endpoint.call_with_http_info(**kwargs)
+ kwargs['group_id'] = \
+ group_id
+ return self.get_group_acl_endpoint.call_with_http_info(**kwargs)
- def get_user(
+ def get_policy(
self,
- user_id,
+ policy_id,
**kwargs
):
- """get user # noqa: E501
+ """get policy # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user(user_id, async_req=True)
+ >>> thread = api.get_policy(policy_id, async_req=True)
>>> result = thread.get()
Args:
- user_id (str):
+ policy_id (str):
Keyword Args:
_return_http_data_only (bool): response data without head status
@@ -3660,7 +3650,7 @@ def get_user(
async_req (bool): execute request asynchronously
Returns:
- User
+ Policy
If the method is called asynchronously, returns the request
thread.
"""
@@ -3683,27 +3673,25 @@ def get_user(
'_check_return_type', True
)
kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['user_id'] = \
- user_id
- return self.get_user_endpoint.call_with_http_info(**kwargs)
+ kwargs['policy_id'] = \
+ policy_id
+ return self.get_policy_endpoint.call_with_http_info(**kwargs)
- def get_user_external_principal(
+ def get_user(
self,
user_id,
- principal_id,
**kwargs
):
- """get external principal of a user # noqa: E501
+ """get user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_user(user_id, async_req=True)
>>> result = thread.get()
Args:
user_id (str):
- principal_id (str):
Keyword Args:
_return_http_data_only (bool): response data without head status
@@ -3727,7 +3715,7 @@ def get_user_external_principal(
async_req (bool): execute request asynchronously
Returns:
- ExternalPrincipal
+ User
If the method is called asynchronously, returns the request
thread.
"""
@@ -3752,9 +3740,7 @@ def get_user_external_principal(
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['user_id'] = \
user_id
- kwargs['principal_id'] = \
- principal_id
- return self.get_user_external_principal_endpoint.call_with_http_info(**kwargs)
+ return self.get_user_endpoint.call_with_http_info(**kwargs)
def list_group_members(
self,
diff --git a/clients/python-legacy/lakefs_client/api/experimental_api.py b/clients/python-legacy/lakefs_client/api/experimental_api.py
index 300244f02ba..1323e6b37fa 100644
--- a/clients/python-legacy/lakefs_client/api/experimental_api.py
+++ b/clients/python-legacy/lakefs_client/api/experimental_api.py
@@ -284,7 +284,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'create_user_external_principal',
'http_method': 'POST',
'servers': None,
@@ -298,7 +298,6 @@ def __init__(self, api_client=None):
'required': [
'user_id',
'principal_id',
- 'external_principal_creation',
],
'nullable': [
],
@@ -326,7 +325,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
'external_principal_creation': 'body',
},
'collection_format_map': {
@@ -352,7 +351,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'delete_user_external_principal',
'http_method': 'DELETE',
'servers': None,
@@ -390,7 +389,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -403,7 +402,7 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_user_external_principal_endpoint = _Endpoint(
+ self.get_external_principal_endpoint = _Endpoint(
settings={
'response_type': (ExternalPrincipal,),
'auth': [
@@ -413,18 +412,16 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
- 'operation_id': 'get_user_external_principal',
+ 'endpoint_path': '/auth/external/principals',
+ 'operation_id': 'get_external_principal',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
- 'user_id',
'principal_id',
],
'required': [
- 'user_id',
'principal_id',
],
'nullable': [
@@ -440,18 +437,14 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
- 'user_id':
- (str,),
'principal_id':
(str,),
},
'attribute_map': {
- 'user_id': 'userId',
'principal_id': 'principalId',
},
'location_map': {
- 'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -546,7 +539,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principals',
+ 'endpoint_path': '/auth/users/{userId}/external/principals/ls',
'operation_id': 'list_user_external_principals',
'http_method': 'GET',
'servers': None,
@@ -850,7 +843,6 @@ def create_user_external_principal(
self,
user_id,
principal_id,
- external_principal_creation,
**kwargs
):
"""attach external principal to user # noqa: E501
@@ -858,15 +850,15 @@ def create_user_external_principal(
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_user_external_principal(user_id, principal_id, external_principal_creation, async_req=True)
+ >>> thread = api.create_user_external_principal(user_id, principal_id, async_req=True)
>>> result = thread.get()
Args:
user_id (str):
principal_id (str):
- external_principal_creation (ExternalPrincipalCreation):
Keyword Args:
+ external_principal_creation (ExternalPrincipalCreation): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -915,8 +907,6 @@ def create_user_external_principal(
user_id
kwargs['principal_id'] = \
principal_id
- kwargs['external_principal_creation'] = \
- external_principal_creation
return self.create_user_external_principal_endpoint.call_with_http_info(**kwargs)
def delete_user_external_principal(
@@ -988,22 +978,20 @@ def delete_user_external_principal(
principal_id
return self.delete_user_external_principal_endpoint.call_with_http_info(**kwargs)
- def get_user_external_principal(
+ def get_external_principal(
self,
- user_id,
principal_id,
**kwargs
):
- """get external principal of a user # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
Args:
- user_id (str):
principal_id (str):
Keyword Args:
@@ -1051,11 +1039,9 @@ def get_user_external_principal(
'_check_return_type', True
)
kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['user_id'] = \
- user_id
kwargs['principal_id'] = \
principal_id
- return self.get_user_external_principal_endpoint.call_with_http_info(**kwargs)
+ return self.get_external_principal_endpoint.call_with_http_info(**kwargs)
def hard_reset_branch(
self,
diff --git a/clients/python-legacy/lakefs_client/api/external_api.py b/clients/python-legacy/lakefs_client/api/external_api.py
index 37d38c4cf76..692f2b0fc30 100644
--- a/clients/python-legacy/lakefs_client/api/external_api.py
+++ b/clients/python-legacy/lakefs_client/api/external_api.py
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'create_user_external_principal',
'http_method': 'POST',
'servers': None,
@@ -63,7 +63,6 @@ def __init__(self, api_client=None):
'required': [
'user_id',
'principal_id',
- 'external_principal_creation',
],
'nullable': [
],
@@ -91,7 +90,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
'external_principal_creation': 'body',
},
'collection_format_map': {
@@ -117,7 +116,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
+ 'endpoint_path': '/auth/users/{userId}/external/principals',
'operation_id': 'delete_user_external_principal',
'http_method': 'DELETE',
'servers': None,
@@ -155,7 +154,7 @@ def __init__(self, api_client=None):
},
'location_map': {
'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -168,7 +167,7 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.get_user_external_principal_endpoint = _Endpoint(
+ self.get_external_principal_endpoint = _Endpoint(
settings={
'response_type': (ExternalPrincipal,),
'auth': [
@@ -178,18 +177,16 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principal/{principalId}',
- 'operation_id': 'get_user_external_principal',
+ 'endpoint_path': '/auth/external/principals',
+ 'operation_id': 'get_external_principal',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
- 'user_id',
'principal_id',
],
'required': [
- 'user_id',
'principal_id',
],
'nullable': [
@@ -205,18 +202,14 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
- 'user_id':
- (str,),
'principal_id':
(str,),
},
'attribute_map': {
- 'user_id': 'userId',
'principal_id': 'principalId',
},
'location_map': {
- 'user_id': 'path',
- 'principal_id': 'path',
+ 'principal_id': 'query',
},
'collection_format_map': {
}
@@ -239,7 +232,7 @@ def __init__(self, api_client=None):
'oidc_auth',
'saml_auth'
],
- 'endpoint_path': '/auth/users/{userId}/external/principals',
+ 'endpoint_path': '/auth/users/{userId}/external/principals/ls',
'operation_id': 'list_user_external_principals',
'http_method': 'GET',
'servers': None,
@@ -310,7 +303,6 @@ def create_user_external_principal(
self,
user_id,
principal_id,
- external_principal_creation,
**kwargs
):
"""attach external principal to user # noqa: E501
@@ -318,15 +310,15 @@ def create_user_external_principal(
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_user_external_principal(user_id, principal_id, external_principal_creation, async_req=True)
+ >>> thread = api.create_user_external_principal(user_id, principal_id, async_req=True)
>>> result = thread.get()
Args:
user_id (str):
principal_id (str):
- external_principal_creation (ExternalPrincipalCreation):
Keyword Args:
+ external_principal_creation (ExternalPrincipalCreation): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -375,8 +367,6 @@ def create_user_external_principal(
user_id
kwargs['principal_id'] = \
principal_id
- kwargs['external_principal_creation'] = \
- external_principal_creation
return self.create_user_external_principal_endpoint.call_with_http_info(**kwargs)
def delete_user_external_principal(
@@ -448,22 +438,20 @@ def delete_user_external_principal(
principal_id
return self.delete_user_external_principal_endpoint.call_with_http_info(**kwargs)
- def get_user_external_principal(
+ def get_external_principal(
self,
- user_id,
principal_id,
**kwargs
):
- """get external principal of a user # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
Args:
- user_id (str):
principal_id (str):
Keyword Args:
@@ -511,11 +499,9 @@ def get_user_external_principal(
'_check_return_type', True
)
kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['user_id'] = \
- user_id
kwargs['principal_id'] = \
principal_id
- return self.get_user_external_principal_endpoint.call_with_http_info(**kwargs)
+ return self.get_external_principal_endpoint.call_with_http_info(**kwargs)
def list_user_external_principals(
self,
diff --git a/clients/python-legacy/test/test_auth_api.py b/clients/python-legacy/test/test_auth_api.py
index afed428bcf0..82ad0a11214 100644
--- a/clients/python-legacy/test/test_auth_api.py
+++ b/clients/python-legacy/test/test_auth_api.py
@@ -150,6 +150,13 @@ def test_get_current_user(self):
"""
pass
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
+
+ describe external principal by id # noqa: E501
+ """
+ pass
+
def test_get_group(self):
"""Test case for get_group
@@ -178,13 +185,6 @@ def test_get_user(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
-
- get external principal of a user # noqa: E501
- """
- pass
-
def test_list_group_members(self):
"""Test case for list_group_members
diff --git a/clients/python-legacy/test/test_experimental_api.py b/clients/python-legacy/test/test_experimental_api.py
index 57b18569350..dd2991bf1d7 100644
--- a/clients/python-legacy/test/test_experimental_api.py
+++ b/clients/python-legacy/test/test_experimental_api.py
@@ -59,10 +59,10 @@ def test_delete_user_external_principal(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
- get external principal of a user # noqa: E501
+ describe external principal by id # noqa: E501
"""
pass
diff --git a/clients/python-legacy/test/test_external_api.py b/clients/python-legacy/test/test_external_api.py
index 5f173952c45..d07e73be645 100644
--- a/clients/python-legacy/test/test_external_api.py
+++ b/clients/python-legacy/test/test_external_api.py
@@ -38,10 +38,10 @@ def test_delete_user_external_principal(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
- get external principal of a user # noqa: E501
+ describe external principal by id # noqa: E501
"""
pass
diff --git a/clients/python/README.md b/clients/python/README.md
index fca065250b4..0719e4c1a7f 100644
--- a/clients/python/README.md
+++ b/clients/python/README.md
@@ -130,28 +130,28 @@ Class | Method | HTTP request | Description
*AuthApi* | [**create_group**](docs/AuthApi.md#create_group) | **POST** /auth/groups | create group
*AuthApi* | [**create_policy**](docs/AuthApi.md#create_policy) | **POST** /auth/policies | create policy
*AuthApi* | [**create_user**](docs/AuthApi.md#create_user) | **POST** /auth/users | create user
-*AuthApi* | [**create_user_external_principal**](docs/AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+*AuthApi* | [**create_user_external_principal**](docs/AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
*AuthApi* | [**delete_credentials**](docs/AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
*AuthApi* | [**delete_group**](docs/AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group
*AuthApi* | [**delete_group_membership**](docs/AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
*AuthApi* | [**delete_policy**](docs/AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy
*AuthApi* | [**delete_user**](docs/AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user
-*AuthApi* | [**delete_user_external_principal**](docs/AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+*AuthApi* | [**delete_user_external_principal**](docs/AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*AuthApi* | [**detach_policy_from_group**](docs/AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
*AuthApi* | [**detach_policy_from_user**](docs/AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
*AuthApi* | [**get_credentials**](docs/AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
*AuthApi* | [**get_current_user**](docs/AuthApi.md#get_current_user) | **GET** /user | get current user
+*AuthApi* | [**get_external_principal**](docs/AuthApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
*AuthApi* | [**get_group**](docs/AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group
*AuthApi* | [**get_group_acl**](docs/AuthApi.md#get_group_acl) | **GET** /auth/groups/{groupId}/acl | get ACL of group
*AuthApi* | [**get_policy**](docs/AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy
*AuthApi* | [**get_user**](docs/AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user
-*AuthApi* | [**get_user_external_principal**](docs/AuthApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
*AuthApi* | [**list_group_members**](docs/AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members
*AuthApi* | [**list_group_policies**](docs/AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies
*AuthApi* | [**list_groups**](docs/AuthApi.md#list_groups) | **GET** /auth/groups | list groups
*AuthApi* | [**list_policies**](docs/AuthApi.md#list_policies) | **GET** /auth/policies | list policies
*AuthApi* | [**list_user_credentials**](docs/AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-*AuthApi* | [**list_user_external_principals**](docs/AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*AuthApi* | [**list_user_external_principals**](docs/AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*AuthApi* | [**list_user_groups**](docs/AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups
*AuthApi* | [**list_user_policies**](docs/AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies
*AuthApi* | [**list_users**](docs/AuthApi.md#list_users) | **GET** /auth/users | list users
@@ -172,15 +172,15 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**abort_presign_multipart_upload**](docs/ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
*ExperimentalApi* | [**complete_presign_multipart_upload**](docs/ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
*ExperimentalApi* | [**create_presign_multipart_upload**](docs/ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExperimentalApi* | [**get_user_external_principal**](docs/ExperimentalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExperimentalApi* | [**get_external_principal**](docs/ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
*ExperimentalApi* | [**hard_reset_branch**](docs/ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-*ExperimentalApi* | [**list_user_external_principals**](docs/ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
-*ExternalApi* | [**create_user_external_principal**](docs/ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-*ExternalApi* | [**delete_user_external_principal**](docs/ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-*ExternalApi* | [**get_user_external_principal**](docs/ExternalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-*ExternalApi* | [**list_user_external_principals**](docs/ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+*ExperimentalApi* | [**list_user_external_principals**](docs/ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
+*ExternalApi* | [**create_user_external_principal**](docs/ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+*ExternalApi* | [**delete_user_external_principal**](docs/ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+*ExternalApi* | [**get_external_principal**](docs/ExternalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
+*ExternalApi* | [**list_user_external_principals**](docs/ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
*HealthCheckApi* | [**health_check**](docs/HealthCheckApi.md#health_check) | **GET** /healthcheck |
*ImportApi* | [**import_cancel**](docs/ImportApi.md#import_cancel) | **DELETE** /repositories/{repository}/branches/{branch}/import | cancel ongoing import
*ImportApi* | [**import_start**](docs/ImportApi.md#import_start) | **POST** /repositories/{repository}/branches/{branch}/import | import data from object store
diff --git a/clients/python/docs/AuthApi.md b/clients/python/docs/AuthApi.md
index 6b30d14f051..bd9416ecbfd 100644
--- a/clients/python/docs/AuthApi.md
+++ b/clients/python/docs/AuthApi.md
@@ -11,28 +11,28 @@ Method | HTTP request | Description
[**create_group**](AuthApi.md#create_group) | **POST** /auth/groups | create group
[**create_policy**](AuthApi.md#create_policy) | **POST** /auth/policies | create policy
[**create_user**](AuthApi.md#create_user) | **POST** /auth/users | create user
-[**create_user_external_principal**](AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
+[**create_user_external_principal**](AuthApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
[**delete_credentials**](AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials
[**delete_group**](AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group
[**delete_group_membership**](AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership
[**delete_policy**](AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy
[**delete_user**](AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user
-[**delete_user_external_principal**](AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
+[**delete_user_external_principal**](AuthApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**detach_policy_from_group**](AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group
[**detach_policy_from_user**](AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user
[**get_credentials**](AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials
[**get_current_user**](AuthApi.md#get_current_user) | **GET** /user | get current user
+[**get_external_principal**](AuthApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
[**get_group**](AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group
[**get_group_acl**](AuthApi.md#get_group_acl) | **GET** /auth/groups/{groupId}/acl | get ACL of group
[**get_policy**](AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy
[**get_user**](AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user
-[**get_user_external_principal**](AuthApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
[**list_group_members**](AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members
[**list_group_policies**](AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies
[**list_groups**](AuthApi.md#list_groups) | **GET** /auth/groups | list groups
[**list_policies**](AuthApi.md#list_policies) | **GET** /auth/policies | list policies
[**list_user_credentials**](AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials
-[**list_user_external_principals**](AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**list_user_external_principals**](AuthApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
[**list_user_groups**](AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups
[**list_user_policies**](AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies
[**list_users**](AuthApi.md#list_users) | **GET** /auth/users | list users
@@ -813,7 +813,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
attach external principal to user
@@ -879,11 +879,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
api_instance = lakefs_sdk.AuthApi(api_client)
user_id = 'user_id_example' # str |
principal_id = 'principal_id_example' # str |
- external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation |
+ external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation | (optional)
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except Exception as e:
print("Exception when calling AuthApi->create_user_external_principal: %s\n" % e)
```
@@ -897,7 +897,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -2005,10 +2005,10 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_group**
-> Group get_group(group_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get group
+describe external principal by id
### Example
@@ -2022,7 +2022,7 @@ get group
import time
import os
import lakefs_sdk
-from lakefs_sdk.models.group import Group
+from lakefs_sdk.models.external_principal import ExternalPrincipal
from lakefs_sdk.rest import ApiException
from pprint import pprint
@@ -2070,15 +2070,15 @@ configuration = lakefs_sdk.Configuration(
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.AuthApi(api_client)
- group_id = 'group_id_example' # str |
+ principal_id = 'principal_id_example' # str |
try:
- # get group
- api_response = api_instance.get_group(group_id)
- print("The response of AuthApi->get_group:\n")
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
+ print("The response of AuthApi->get_external_principal:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling AuthApi->get_group: %s\n" % e)
+ print("Exception when calling AuthApi->get_external_principal: %s\n" % e)
```
@@ -2088,11 +2088,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| |
+ **principal_id** | **str**| |
### Return type
-[**Group**](Group.md)
+[**ExternalPrincipal**](ExternalPrincipal.md)
### Authorization
@@ -2107,7 +2107,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | group | - |
+**200** | external principal | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -2115,10 +2115,10 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_group_acl**
-> ACL get_group_acl(group_id)
+# **get_group**
+> Group get_group(group_id)
-get ACL of group
+get group
### Example
@@ -2132,7 +2132,7 @@ get ACL of group
import time
import os
import lakefs_sdk
-from lakefs_sdk.models.acl import ACL
+from lakefs_sdk.models.group import Group
from lakefs_sdk.rest import ApiException
from pprint import pprint
@@ -2183,12 +2183,12 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
group_id = 'group_id_example' # str |
try:
- # get ACL of group
- api_response = api_instance.get_group_acl(group_id)
- print("The response of AuthApi->get_group_acl:\n")
+ # get group
+ api_response = api_instance.get_group(group_id)
+ print("The response of AuthApi->get_group:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling AuthApi->get_group_acl: %s\n" % e)
+ print("Exception when calling AuthApi->get_group: %s\n" % e)
```
@@ -2202,7 +2202,7 @@ Name | Type | Description | Notes
### Return type
-[**ACL**](ACL.md)
+[**Group**](Group.md)
### Authorization
@@ -2217,18 +2217,18 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | ACL of group | - |
+**200** | group | - |
**401** | Unauthorized | - |
-**404** | Group not found, or group found but has no ACL | - |
+**404** | Resource Not Found | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_policy**
-> Policy get_policy(policy_id)
+# **get_group_acl**
+> ACL get_group_acl(group_id)
-get policy
+get ACL of group
### Example
@@ -2242,7 +2242,7 @@ get policy
import time
import os
import lakefs_sdk
-from lakefs_sdk.models.policy import Policy
+from lakefs_sdk.models.acl import ACL
from lakefs_sdk.rest import ApiException
from pprint import pprint
@@ -2290,15 +2290,15 @@ configuration = lakefs_sdk.Configuration(
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.AuthApi(api_client)
- policy_id = 'policy_id_example' # str |
+ group_id = 'group_id_example' # str |
try:
- # get policy
- api_response = api_instance.get_policy(policy_id)
- print("The response of AuthApi->get_policy:\n")
+ # get ACL of group
+ api_response = api_instance.get_group_acl(group_id)
+ print("The response of AuthApi->get_group_acl:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling AuthApi->get_policy: %s\n" % e)
+ print("Exception when calling AuthApi->get_group_acl: %s\n" % e)
```
@@ -2308,11 +2308,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **policy_id** | **str**| |
+ **group_id** | **str**| |
### Return type
-[**Policy**](Policy.md)
+[**ACL**](ACL.md)
### Authorization
@@ -2327,18 +2327,18 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | policy | - |
+**200** | ACL of group | - |
**401** | Unauthorized | - |
-**404** | Resource Not Found | - |
+**404** | Group not found, or group found but has no ACL | - |
**420** | too many requests | - |
**0** | Internal Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user**
-> User get_user(user_id)
+# **get_policy**
+> Policy get_policy(policy_id)
-get user
+get policy
### Example
@@ -2352,7 +2352,7 @@ get user
import time
import os
import lakefs_sdk
-from lakefs_sdk.models.user import User
+from lakefs_sdk.models.policy import Policy
from lakefs_sdk.rest import ApiException
from pprint import pprint
@@ -2400,15 +2400,15 @@ configuration = lakefs_sdk.Configuration(
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.AuthApi(api_client)
- user_id = 'user_id_example' # str |
+ policy_id = 'policy_id_example' # str |
try:
- # get user
- api_response = api_instance.get_user(user_id)
- print("The response of AuthApi->get_user:\n")
+ # get policy
+ api_response = api_instance.get_policy(policy_id)
+ print("The response of AuthApi->get_policy:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling AuthApi->get_user: %s\n" % e)
+ print("Exception when calling AuthApi->get_policy: %s\n" % e)
```
@@ -2418,11 +2418,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
+ **policy_id** | **str**| |
### Return type
-[**User**](User.md)
+[**Policy**](Policy.md)
### Authorization
@@ -2437,7 +2437,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | user | - |
+**200** | policy | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -2445,10 +2445,10 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_user**
+> User get_user(user_id)
-get external principal of a user
+get user
### Example
@@ -2462,7 +2462,7 @@ get external principal of a user
import time
import os
import lakefs_sdk
-from lakefs_sdk.models.external_principal import ExternalPrincipal
+from lakefs_sdk.models.user import User
from lakefs_sdk.rest import ApiException
from pprint import pprint
@@ -2511,15 +2511,14 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.AuthApi(api_client)
user_id = 'user_id_example' # str |
- principal_id = 'principal_id_example' # str |
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
- print("The response of AuthApi->get_user_external_principal:\n")
+ # get user
+ api_response = api_instance.get_user(user_id)
+ print("The response of AuthApi->get_user:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling AuthApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling AuthApi->get_user: %s\n" % e)
```
@@ -2530,11 +2529,10 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
- **principal_id** | **str**| |
### Return type
-[**ExternalPrincipal**](ExternalPrincipal.md)
+[**User**](User.md)
### Authorization
@@ -2549,7 +2547,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | external principal | - |
+**200** | user | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
diff --git a/clients/python/docs/ExperimentalApi.md b/clients/python/docs/ExperimentalApi.md
index ac033313722..e0f22b2b264 100644
--- a/clients/python/docs/ExperimentalApi.md
+++ b/clients/python/docs/ExperimentalApi.md
@@ -7,11 +7,11 @@ Method | HTTP request | Description
[**abort_presign_multipart_upload**](ExperimentalApi.md#abort_presign_multipart_upload) | **DELETE** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Abort a presign multipart upload
[**complete_presign_multipart_upload**](ExperimentalApi.md#complete_presign_multipart_upload) | **PUT** /repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId} | Complete a presign multipart upload request
[**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
-[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**get_user_external_principal**](ExperimentalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
+[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
[**hard_reset_branch**](ExperimentalApi.md#hard_reset_branch) | **PUT** /repositories/{repository}/branches/{branch}/hard_reset | hard reset branch
-[**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**list_user_external_principals**](ExperimentalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
# **abort_presign_multipart_upload**
@@ -376,7 +376,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
attach external principal to user
@@ -442,11 +442,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
api_instance = lakefs_sdk.ExperimentalApi(api_client)
user_id = 'user_id_example' # str |
principal_id = 'principal_id_example' # str |
- external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation |
+ external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation | (optional)
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except Exception as e:
print("Exception when calling ExperimentalApi->create_user_external_principal: %s\n" % e)
```
@@ -460,7 +460,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -597,10 +597,10 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get external principal of a user
+describe external principal by id
### Example
@@ -662,16 +662,15 @@ configuration = lakefs_sdk.Configuration(
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.ExperimentalApi(api_client)
- user_id = 'user_id_example' # str |
principal_id = 'principal_id_example' # str |
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
- print("The response of ExperimentalApi->get_user_external_principal:\n")
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
+ print("The response of ExperimentalApi->get_external_principal:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling ExperimentalApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling ExperimentalApi->get_external_principal: %s\n" % e)
```
@@ -681,7 +680,6 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
**principal_id** | **str**| |
### Return type
diff --git a/clients/python/docs/ExternalApi.md b/clients/python/docs/ExternalApi.md
index 94ed204c8e2..29a7642080c 100644
--- a/clients/python/docs/ExternalApi.md
+++ b/clients/python/docs/ExternalApi.md
@@ -4,14 +4,14 @@ All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**create_user_external_principal**](ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principal/{principalId} | attach external principal to user
-[**delete_user_external_principal**](ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principal/{principalId} | delete external principal from user
-[**get_user_external_principal**](ExternalApi.md#get_user_external_principal) | **GET** /auth/users/{userId}/external/principal/{principalId} | get external principal of a user
-[**list_user_external_principals**](ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals | list user external policies attached to a user
+[**create_user_external_principal**](ExternalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
+[**delete_user_external_principal**](ExternalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
+[**get_external_principal**](ExternalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
+[**list_user_external_principals**](ExternalApi.md#list_user_external_principals) | **GET** /auth/users/{userId}/external/principals/ls | list user external policies attached to a user
# **create_user_external_principal**
-> create_user_external_principal(user_id, principal_id, external_principal_creation)
+> create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
attach external principal to user
@@ -77,11 +77,11 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
api_instance = lakefs_sdk.ExternalApi(api_client)
user_id = 'user_id_example' # str |
principal_id = 'principal_id_example' # str |
- external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation |
+ external_principal_creation = lakefs_sdk.ExternalPrincipalCreation() # ExternalPrincipalCreation | (optional)
try:
# attach external principal to user
- api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation)
+ api_instance.create_user_external_principal(user_id, principal_id, external_principal_creation=external_principal_creation)
except Exception as e:
print("Exception when calling ExternalApi->create_user_external_principal: %s\n" % e)
```
@@ -95,7 +95,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **str**| |
**principal_id** | **str**| |
- **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+ **external_principal_creation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| | [optional]
### Return type
@@ -232,10 +232,10 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_user_external_principal**
-> ExternalPrincipal get_user_external_principal(user_id, principal_id)
+# **get_external_principal**
+> ExternalPrincipal get_external_principal(principal_id)
-get external principal of a user
+describe external principal by id
### Example
@@ -297,16 +297,15 @@ configuration = lakefs_sdk.Configuration(
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.ExternalApi(api_client)
- user_id = 'user_id_example' # str |
principal_id = 'principal_id_example' # str |
try:
- # get external principal of a user
- api_response = api_instance.get_user_external_principal(user_id, principal_id)
- print("The response of ExternalApi->get_user_external_principal:\n")
+ # describe external principal by id
+ api_response = api_instance.get_external_principal(principal_id)
+ print("The response of ExternalApi->get_external_principal:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling ExternalApi->get_user_external_principal: %s\n" % e)
+ print("Exception when calling ExternalApi->get_external_principal: %s\n" % e)
```
@@ -316,7 +315,6 @@ with lakefs_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| |
**principal_id** | **str**| |
### Return type
diff --git a/clients/python/lakefs_sdk/api/auth_api.py b/clients/python/lakefs_sdk/api/auth_api.py
index 3449524b19f..d7a68967d37 100644
--- a/clients/python/lakefs_sdk/api/auth_api.py
+++ b/clients/python/lakefs_sdk/api/auth_api.py
@@ -1076,7 +1076,7 @@ def create_user_with_http_info(self, user_creation : Optional[UserCreation] = No
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> None: # noqa: E501
+ def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> None: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1089,7 +1089,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -1108,7 +1108,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
return self.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, **kwargs) # noqa: E501
@validate_arguments
- def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> ApiResponse: # noqa: E501
+ def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> ApiResponse: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1121,7 +1121,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -1184,12 +1184,12 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -1217,7 +1217,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'POST',
+ '/auth/users/{userId}/external/principals', 'POST',
_path_params,
_query_params,
_header_params,
@@ -2028,12 +2028,12 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -2051,7 +2051,7 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'DELETE',
+ '/auth/users/{userId}/external/principals', 'DELETE',
_path_params,
_query_params,
_header_params,
@@ -2631,17 +2631,17 @@ def get_current_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E50
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_group(self, group_id : StrictStr, **kwargs) -> Group: # noqa: E501
- """get group # noqa: E501
+ def get_external_principal(self, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group(group_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
- :param group_id: (required)
- :type group_id: str
+ :param principal_id: (required)
+ :type principal_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
@@ -2651,25 +2651,25 @@ def get_group(self, group_id : StrictStr, **kwargs) -> Group: # noqa: E501
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: Group
+ :rtype: ExternalPrincipal
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_group_with_http_info(group_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_external_principal_with_http_info(principal_id, **kwargs) # noqa: E501
@validate_arguments
- def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get group # noqa: E501
+ def get_external_principal_with_http_info(self, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group_with_http_info(group_id, async_req=True)
+ >>> thread = api.get_external_principal_with_http_info(principal_id, async_req=True)
>>> result = thread.get()
- :param group_id: (required)
- :type group_id: str
+ :param principal_id: (required)
+ :type principal_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -2692,13 +2692,13 @@ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRespons
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(ExternalPrincipal, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = [
- 'group_id'
+ 'principal_id'
]
_all_params.extend(
[
@@ -2717,7 +2717,7 @@ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRespons
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_group" % _key
+ " to method get_external_principal" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -2726,12 +2726,12 @@ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRespons
# process the path parameters
_path_params = {}
- if _params['group_id']:
- _path_params['groupId'] = _params['group_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -2747,14 +2747,14 @@ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRespons
_auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
_response_types_map = {
- '200': "Group",
+ '200': "ExternalPrincipal",
'401': "Error",
'404': "Error",
'420': None,
}
return self.api_client.call_api(
- '/auth/groups/{groupId}', 'GET',
+ '/auth/external/principals', 'GET',
_path_params,
_query_params,
_header_params,
@@ -2771,13 +2771,13 @@ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRespons
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_group_acl(self, group_id : StrictStr, **kwargs) -> ACL: # noqa: E501
- """get ACL of group # noqa: E501
+ def get_group(self, group_id : StrictStr, **kwargs) -> Group: # noqa: E501
+ """get group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group_acl(group_id, async_req=True)
+ >>> thread = api.get_group(group_id, async_req=True)
>>> result = thread.get()
:param group_id: (required)
@@ -2791,21 +2791,21 @@ def get_group_acl(self, group_id : StrictStr, **kwargs) -> ACL: # noqa: E501
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: ACL
+ :rtype: Group
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_group_acl_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_group_acl_with_http_info(group_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_group_with_http_info(group_id, **kwargs) # noqa: E501
@validate_arguments
- def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get ACL of group # noqa: E501
+ def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """get group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_group_acl_with_http_info(group_id, async_req=True)
+ >>> thread = api.get_group_with_http_info(group_id, async_req=True)
>>> result = thread.get()
:param group_id: (required)
@@ -2832,7 +2832,7 @@ def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRes
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: tuple(ACL, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
@@ -2857,7 +2857,7 @@ def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRes
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_group_acl" % _key
+ " to method get_group" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -2887,14 +2887,14 @@ def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRes
_auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
_response_types_map = {
- '200': "ACL",
+ '200': "Group",
'401': "Error",
- '404': "ErrorNoACL",
+ '404': "Error",
'420': None,
}
return self.api_client.call_api(
- '/auth/groups/{groupId}/acl', 'GET',
+ '/auth/groups/{groupId}', 'GET',
_path_params,
_query_params,
_header_params,
@@ -2911,17 +2911,17 @@ def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiRes
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_policy(self, policy_id : StrictStr, **kwargs) -> Policy: # noqa: E501
- """get policy # noqa: E501
+ def get_group_acl(self, group_id : StrictStr, **kwargs) -> ACL: # noqa: E501
+ """get ACL of group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_policy(policy_id, async_req=True)
+ >>> thread = api.get_group_acl(group_id, async_req=True)
>>> result = thread.get()
- :param policy_id: (required)
- :type policy_id: str
+ :param group_id: (required)
+ :type group_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
@@ -2931,25 +2931,25 @@ def get_policy(self, policy_id : StrictStr, **kwargs) -> Policy: # noqa: E501
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: Policy
+ :rtype: ACL
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_policy_with_http_info(policy_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_group_acl_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_group_acl_with_http_info(group_id, **kwargs) # noqa: E501
@validate_arguments
- def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get policy # noqa: E501
+ def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """get ACL of group # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_policy_with_http_info(policy_id, async_req=True)
+ >>> thread = api.get_group_acl_with_http_info(group_id, async_req=True)
>>> result = thread.get()
- :param policy_id: (required)
- :type policy_id: str
+ :param group_id: (required)
+ :type group_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -2972,13 +2972,13 @@ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiRespo
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: tuple(Policy, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(ACL, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = [
- 'policy_id'
+ 'group_id'
]
_all_params.extend(
[
@@ -2997,7 +2997,7 @@ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiRespo
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_policy" % _key
+ " to method get_group_acl" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -3006,8 +3006,8 @@ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiRespo
# process the path parameters
_path_params = {}
- if _params['policy_id']:
- _path_params['policyId'] = _params['policy_id']
+ if _params['group_id']:
+ _path_params['groupId'] = _params['group_id']
# process the query parameters
@@ -3027,14 +3027,14 @@ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiRespo
_auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
_response_types_map = {
- '200': "Policy",
+ '200': "ACL",
'401': "Error",
- '404': "Error",
+ '404': "ErrorNoACL",
'420': None,
}
return self.api_client.call_api(
- '/auth/policies/{policyId}', 'GET',
+ '/auth/groups/{groupId}/acl', 'GET',
_path_params,
_query_params,
_header_params,
@@ -3051,17 +3051,17 @@ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiRespo
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_user(self, user_id : StrictStr, **kwargs) -> User: # noqa: E501
- """get user # noqa: E501
+ def get_policy(self, policy_id : StrictStr, **kwargs) -> Policy: # noqa: E501
+ """get policy # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user(user_id, async_req=True)
+ >>> thread = api.get_policy(policy_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
+ :param policy_id: (required)
+ :type policy_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
@@ -3071,25 +3071,25 @@ def get_user(self, user_id : StrictStr, **kwargs) -> User: # noqa: E501
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: User
+ :rtype: Policy
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_user_with_http_info(user_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_policy_with_http_info(policy_id, **kwargs) # noqa: E501
@validate_arguments
- def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get user # noqa: E501
+ def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """get policy # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_with_http_info(user_id, async_req=True)
+ >>> thread = api.get_policy_with_http_info(policy_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
+ :param policy_id: (required)
+ :type policy_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -3112,13 +3112,13 @@ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse:
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(Policy, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = [
- 'user_id'
+ 'policy_id'
]
_all_params.extend(
[
@@ -3137,7 +3137,7 @@ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse:
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_user" % _key
+ " to method get_policy" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -3146,8 +3146,8 @@ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse:
# process the path parameters
_path_params = {}
- if _params['user_id']:
- _path_params['userId'] = _params['user_id']
+ if _params['policy_id']:
+ _path_params['policyId'] = _params['policy_id']
# process the query parameters
@@ -3167,14 +3167,14 @@ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse:
_auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
_response_types_map = {
- '200': "User",
+ '200': "Policy",
'401': "Error",
'404': "Error",
'420': None,
}
return self.api_client.call_api(
- '/auth/users/{userId}', 'GET',
+ '/auth/policies/{policyId}', 'GET',
_path_params,
_query_params,
_header_params,
@@ -3191,19 +3191,17 @@ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse:
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_user(self, user_id : StrictStr, **kwargs) -> User: # noqa: E501
+ """get user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_user(user_id, async_req=True)
>>> result = thread.get()
:param user_id: (required)
:type user_id: str
- :param principal_id: (required)
- :type principal_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
@@ -3213,27 +3211,25 @@ def get_user_external_principal(self, user_id : StrictStr, principal_id : Strict
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: ExternalPrincipal
+ :rtype: User
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_user_external_principal_with_http_info(user_id, principal_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_user_with_http_info(user_id, **kwargs) # noqa: E501
@validate_arguments
- def get_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """get user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal_with_http_info(user_id, principal_id, async_req=True)
+ >>> thread = api.get_user_with_http_info(user_id, async_req=True)
>>> result = thread.get()
:param user_id: (required)
:type user_id: str
- :param principal_id: (required)
- :type principal_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -3256,14 +3252,13 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: tuple(ExternalPrincipal, status_code(int), headers(HTTPHeaderDict))
+ :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = [
- 'user_id',
- 'principal_id'
+ 'user_id'
]
_all_params.extend(
[
@@ -3282,7 +3277,7 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_user_external_principal" % _key
+ " to method get_user" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -3294,9 +3289,6 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
@@ -3315,14 +3307,14 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
_auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
_response_types_map = {
- '200': "ExternalPrincipal",
+ '200': "User",
'401': "Error",
'404': "Error",
'420': None,
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'GET',
+ '/auth/users/{userId}', 'GET',
_path_params,
_query_params,
_header_params,
@@ -4287,7 +4279,7 @@ def list_user_external_principals_with_http_info(self, user_id : StrictStr, pref
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principals', 'GET',
+ '/auth/users/{userId}/external/principals/ls', 'GET',
_path_params,
_query_params,
_header_params,
diff --git a/clients/python/lakefs_sdk/api/experimental_api.py b/clients/python/lakefs_sdk/api/experimental_api.py
index 12ff0560d6b..83f9a395bc0 100644
--- a/clients/python/lakefs_sdk/api/experimental_api.py
+++ b/clients/python/lakefs_sdk/api/experimental_api.py
@@ -579,7 +579,7 @@ def create_presign_multipart_upload_with_http_info(self, repository : StrictStr,
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> None: # noqa: E501
+ def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> None: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -592,7 +592,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -611,7 +611,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
return self.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, **kwargs) # noqa: E501
@validate_arguments
- def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> ApiResponse: # noqa: E501
+ def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> ApiResponse: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -624,7 +624,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -687,12 +687,12 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -720,7 +720,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'POST',
+ '/auth/users/{userId}/external/principals', 'POST',
_path_params,
_query_params,
_header_params,
@@ -840,12 +840,12 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -863,7 +863,7 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'DELETE',
+ '/auth/users/{userId}/external/principals', 'DELETE',
_path_params,
_query_params,
_header_params,
@@ -880,17 +880,15 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_external_principal(self, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
:param principal_id: (required)
:type principal_id: str
:param async_req: Whether to execute the request asynchronously.
@@ -906,21 +904,19 @@ def get_user_external_principal(self, user_id : StrictStr, principal_id : Strict
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_user_external_principal_with_http_info(user_id, principal_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_external_principal_with_http_info(principal_id, **kwargs) # noqa: E501
@validate_arguments
- def get_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_external_principal_with_http_info(self, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal_with_http_info(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal_with_http_info(principal_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
:param principal_id: (required)
:type principal_id: str
:param async_req: Whether to execute the request asynchronously.
@@ -951,7 +947,6 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
_params = locals()
_all_params = [
- 'user_id',
'principal_id'
]
_all_params.extend(
@@ -971,7 +966,7 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_user_external_principal" % _key
+ " to method get_external_principal" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -980,15 +975,12 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
# process the path parameters
_path_params = {}
- if _params['user_id']:
- _path_params['userId'] = _params['user_id']
-
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -1011,7 +1003,7 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'GET',
+ '/auth/external/principals', 'GET',
_path_params,
_query_params,
_header_params,
@@ -1336,7 +1328,7 @@ def list_user_external_principals_with_http_info(self, user_id : StrictStr, pref
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principals', 'GET',
+ '/auth/users/{userId}/external/principals/ls', 'GET',
_path_params,
_query_params,
_header_params,
diff --git a/clients/python/lakefs_sdk/api/external_api.py b/clients/python/lakefs_sdk/api/external_api.py
index 85fe39392a0..19384b63321 100644
--- a/clients/python/lakefs_sdk/api/external_api.py
+++ b/clients/python/lakefs_sdk/api/external_api.py
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
self.api_client = api_client
@validate_arguments
- def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> None: # noqa: E501
+ def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> None: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -62,7 +62,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -81,7 +81,7 @@ def create_user_external_principal(self, user_id : StrictStr, principal_id : Str
return self.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, **kwargs) # noqa: E501
@validate_arguments
- def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : ExternalPrincipalCreation, **kwargs) -> ApiResponse: # noqa: E501
+ def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> ApiResponse: # noqa: E501
"""attach external principal to user # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -94,7 +94,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
:type user_id: str
:param principal_id: (required)
:type principal_id: str
- :param external_principal_creation: (required)
+ :param external_principal_creation:
:type external_principal_creation: ExternalPrincipalCreation
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
@@ -157,12 +157,12 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -190,7 +190,7 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'POST',
+ '/auth/users/{userId}/external/principals', 'POST',
_path_params,
_query_params,
_header_params,
@@ -310,12 +310,12 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
if _params['user_id']:
_path_params['userId'] = _params['user_id']
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -333,7 +333,7 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_response_types_map = {}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'DELETE',
+ '/auth/users/{userId}/external/principals', 'DELETE',
_path_params,
_query_params,
_header_params,
@@ -350,17 +350,15 @@ def delete_user_external_principal_with_http_info(self, user_id : StrictStr, pri
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def get_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_external_principal(self, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal(principal_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
:param principal_id: (required)
:type principal_id: str
:param async_req: Whether to execute the request asynchronously.
@@ -376,21 +374,19 @@ def get_user_external_principal(self, user_id : StrictStr, principal_id : Strict
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the get_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.get_user_external_principal_with_http_info(user_id, principal_id, **kwargs) # noqa: E501
+ raise ValueError("Error! Please call the get_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
+ return self.get_external_principal_with_http_info(principal_id, **kwargs) # noqa: E501
@validate_arguments
- def get_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
- """get external principal of a user # noqa: E501
+ def get_external_principal_with_http_info(self, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """describe external principal by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_user_external_principal_with_http_info(user_id, principal_id, async_req=True)
+ >>> thread = api.get_external_principal_with_http_info(principal_id, async_req=True)
>>> result = thread.get()
- :param user_id: (required)
- :type user_id: str
:param principal_id: (required)
:type principal_id: str
:param async_req: Whether to execute the request asynchronously.
@@ -421,7 +417,6 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
_params = locals()
_all_params = [
- 'user_id',
'principal_id'
]
_all_params.extend(
@@ -441,7 +436,7 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method get_user_external_principal" % _key
+ " to method get_external_principal" % _key
)
_params[_key] = _val
del _params['kwargs']
@@ -450,15 +445,12 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
# process the path parameters
_path_params = {}
- if _params['user_id']:
- _path_params['userId'] = _params['user_id']
-
- if _params['principal_id']:
- _path_params['principalId'] = _params['principal_id']
-
# process the query parameters
_query_params = []
+ if _params.get('principal_id') is not None: # noqa: E501
+ _query_params.append(('principalId', _params['principal_id']))
+
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
@@ -481,7 +473,7 @@ def get_user_external_principal_with_http_info(self, user_id : StrictStr, princi
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principal/{principalId}', 'GET',
+ '/auth/external/principals', 'GET',
_path_params,
_query_params,
_header_params,
@@ -645,7 +637,7 @@ def list_user_external_principals_with_http_info(self, user_id : StrictStr, pref
}
return self.api_client.call_api(
- '/auth/users/{userId}/external/principals', 'GET',
+ '/auth/users/{userId}/external/principals/ls', 'GET',
_path_params,
_query_params,
_header_params,
diff --git a/clients/python/test/test_auth_api.py b/clients/python/test/test_auth_api.py
index a0bdbe2d976..0438975ef2f 100644
--- a/clients/python/test/test_auth_api.py
+++ b/clients/python/test/test_auth_api.py
@@ -155,6 +155,13 @@ def test_get_current_user(self):
"""
pass
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
+
+ describe external principal by id # noqa: E501
+ """
+ pass
+
def test_get_group(self):
"""Test case for get_group
@@ -183,13 +190,6 @@ def test_get_user(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
-
- get external principal of a user # noqa: E501
- """
- pass
-
def test_list_group_members(self):
"""Test case for list_group_members
diff --git a/clients/python/test/test_experimental_api.py b/clients/python/test/test_experimental_api.py
index 5181c5fdc88..c9635638b62 100644
--- a/clients/python/test/test_experimental_api.py
+++ b/clients/python/test/test_experimental_api.py
@@ -64,10 +64,10 @@ def test_delete_user_external_principal(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
- get external principal of a user # noqa: E501
+ describe external principal by id # noqa: E501
"""
pass
diff --git a/clients/python/test/test_external_api.py b/clients/python/test/test_external_api.py
index 4bb24081fde..946919f1f46 100644
--- a/clients/python/test/test_external_api.py
+++ b/clients/python/test/test_external_api.py
@@ -43,10 +43,10 @@ def test_delete_user_external_principal(self):
"""
pass
- def test_get_user_external_principal(self):
- """Test case for get_user_external_principal
+ def test_get_external_principal(self):
+ """Test case for get_external_principal
- get external principal of a user # noqa: E501
+ describe external principal by id # noqa: E501
"""
pass
diff --git a/docs/assets/js/swagger.yml b/docs/assets/js/swagger.yml
index bb14777143d..81f8a2db461 100644
--- a/docs/assets/js/swagger.yml
+++ b/docs/assets/js/swagger.yml
@@ -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:
@@ -2454,7 +2455,7 @@ paths:
operationId: createUserExternalPrincipal
summary: attach external principal to user
requestBody:
- required: true
+ required: false
content:
application/json:
schema:
@@ -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:
@@ -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
@@ -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:
@@ -2546,6 +2555,7 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
+
/auth/groups/{groupId}/policies:
parameters:
- in: path
diff --git a/pkg/api/controller.go b/pkg/api/controller.go
index 8591c951148..5aeca559e42 100644
--- a/pkg/api/controller.go
+++ b/pkg/api/controller.go
@@ -5235,7 +5235,7 @@ func (c *Controller) GetUsageReportSummary(w http.ResponseWriter, r *http.Reques
writeResponse(w, r, http.StatusOK, response)
}
-func (c *Controller) CreateUserExternalPrincipal(w http.ResponseWriter, r *http.Request, body apigen.CreateUserExternalPrincipalJSONRequestBody, userID, principalID string) {
+func (c *Controller) CreateUserExternalPrincipal(w http.ResponseWriter, r *http.Request, body apigen.CreateUserExternalPrincipalJSONRequestBody, userID string, params apigen.CreateUserExternalPrincipalParams) {
ctx := r.Context()
if c.isExternalPrincipalNotSupported(ctx) {
writeError(w, r, http.StatusNotImplemented, "Not implemented")
@@ -5252,14 +5252,14 @@ func (c *Controller) CreateUserExternalPrincipal(w http.ResponseWriter, r *http.
c.LogAction(ctx, "create_user_external_principal", r, "", "", "")
- err := c.Auth.CreateUserExternalPrincipal(ctx, userID, principalID)
+ err := c.Auth.CreateUserExternalPrincipal(ctx, userID, params.PrincipalId)
if c.handleAPIError(ctx, w, r, err) {
return
}
writeResponse(w, r, http.StatusCreated, nil)
}
-func (c *Controller) DeleteUserExternalPrincipal(w http.ResponseWriter, r *http.Request, userID, principalID string) {
+func (c *Controller) DeleteUserExternalPrincipal(w http.ResponseWriter, r *http.Request, userID string, params apigen.DeleteUserExternalPrincipalParams) {
ctx := r.Context()
if c.isExternalPrincipalNotSupported(ctx) {
writeError(w, r, http.StatusNotImplemented, "Not implemented")
@@ -5274,14 +5274,14 @@ func (c *Controller) DeleteUserExternalPrincipal(w http.ResponseWriter, r *http.
return
}
c.LogAction(ctx, "delete_user_external_principal", r, "", "", "")
- err := c.Auth.DeleteUserExternalPrincipal(ctx, userID, principalID)
+ err := c.Auth.DeleteUserExternalPrincipal(ctx, userID, params.PrincipalId)
if c.handleAPIError(ctx, w, r, err) {
return
}
writeResponse(w, r, http.StatusNoContent, nil)
}
-func (c *Controller) GetUserExternalPrincipal(w http.ResponseWriter, r *http.Request, userID, principalID string) {
+func (c *Controller) GetExternalPrincipal(w http.ResponseWriter, r *http.Request, params apigen.GetExternalPrincipalParams) {
ctx := r.Context()
if c.isExternalPrincipalNotSupported(ctx) {
writeError(w, r, http.StatusNotImplemented, "Not implemented")
@@ -5289,15 +5289,15 @@ func (c *Controller) GetUserExternalPrincipal(w http.ResponseWriter, r *http.Req
}
if !c.authorize(w, r, permissions.Node{
Permission: permissions.Permission{
- Action: permissions.ReadUserAction,
- Resource: permissions.UserArn(userID),
+ Action: permissions.ReadExternalPrincipalAction,
+ Resource: permissions.ExternalPrincipalArn(params.PrincipalId),
},
}) {
return
}
- c.LogAction(ctx, "get_user_external_principal", r, "", "", "")
+ c.LogAction(ctx, "get_external_principal", r, "", "", "")
- principal, err := c.Auth.GetUserExternalPrincipal(ctx, userID, principalID)
+ principal, err := c.Auth.GetExternalPrincipal(ctx, params.PrincipalId)
if c.handleAPIError(ctx, w, r, err) {
return
}
diff --git a/pkg/auth/mock/mock_auth_client.go b/pkg/auth/mock/mock_auth_client.go
index c1df5742efb..9b5b177d7e7 100644
--- a/pkg/auth/mock/mock_auth_client.go
+++ b/pkg/auth/mock/mock_auth_client.go
@@ -237,7 +237,7 @@ func (mr *MockClientWithResponsesInterfaceMockRecorder) CreatePolicyWithResponse
}
// CreateUserExternalPrincipalWithResponse mocks base method.
-func (m *MockClientWithResponsesInterface) CreateUserExternalPrincipalWithResponse(arg0 context.Context, arg1, arg2 string, arg3 ...auth.RequestEditorFn) (*auth.CreateUserExternalPrincipalResponse, error) {
+func (m *MockClientWithResponsesInterface) CreateUserExternalPrincipalWithResponse(arg0 context.Context, arg1 string, arg2 *auth.CreateUserExternalPrincipalParams, arg3 ...auth.RequestEditorFn) (*auth.CreateUserExternalPrincipalResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2}
for _, a := range arg3 {
@@ -377,7 +377,7 @@ func (mr *MockClientWithResponsesInterfaceMockRecorder) DeletePolicyWithResponse
}
// DeleteUserExternalPrincipalWithResponse mocks base method.
-func (m *MockClientWithResponsesInterface) DeleteUserExternalPrincipalWithResponse(arg0 context.Context, arg1, arg2 string, arg3 ...auth.RequestEditorFn) (*auth.DeleteUserExternalPrincipalResponse, error) {
+func (m *MockClientWithResponsesInterface) DeleteUserExternalPrincipalWithResponse(arg0 context.Context, arg1 string, arg2 *auth.DeleteUserExternalPrincipalParams, arg3 ...auth.RequestEditorFn) (*auth.DeleteUserExternalPrincipalResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2}
for _, a := range arg3 {
@@ -496,6 +496,26 @@ func (mr *MockClientWithResponsesInterfaceMockRecorder) GetCredentialsWithRespon
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCredentialsWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).GetCredentialsWithResponse), varargs...)
}
+// GetExternalPrincipalWithResponse mocks base method.
+func (m *MockClientWithResponsesInterface) GetExternalPrincipalWithResponse(arg0 context.Context, arg1 *auth.GetExternalPrincipalParams, arg2 ...auth.RequestEditorFn) (*auth.GetExternalPrincipalResponse, error) {
+ m.ctrl.T.Helper()
+ varargs := []interface{}{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "GetExternalPrincipalWithResponse", varargs...)
+ ret0, _ := ret[0].(*auth.GetExternalPrincipalResponse)
+ ret1, _ := ret[1].(error)
+ return ret0, ret1
+}
+
+// GetExternalPrincipalWithResponse indicates an expected call of GetExternalPrincipalWithResponse.
+func (mr *MockClientWithResponsesInterfaceMockRecorder) GetExternalPrincipalWithResponse(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]interface{}{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExternalPrincipalWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).GetExternalPrincipalWithResponse), varargs...)
+}
+
// GetGroupWithResponse mocks base method.
func (m *MockClientWithResponsesInterface) GetGroupWithResponse(arg0 context.Context, arg1 string, arg2 ...auth.RequestEditorFn) (*auth.GetGroupResponse, error) {
m.ctrl.T.Helper()
@@ -536,26 +556,6 @@ func (mr *MockClientWithResponsesInterfaceMockRecorder) GetPolicyWithResponse(ar
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).GetPolicyWithResponse), varargs...)
}
-// GetUserExternalPrincipalWithResponse mocks base method.
-func (m *MockClientWithResponsesInterface) GetUserExternalPrincipalWithResponse(arg0 context.Context, arg1, arg2 string, arg3 ...auth.RequestEditorFn) (*auth.GetUserExternalPrincipalResponse, error) {
- m.ctrl.T.Helper()
- varargs := []interface{}{arg0, arg1, arg2}
- for _, a := range arg3 {
- varargs = append(varargs, a)
- }
- ret := m.ctrl.Call(m, "GetUserExternalPrincipalWithResponse", varargs...)
- ret0, _ := ret[0].(*auth.GetUserExternalPrincipalResponse)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// GetUserExternalPrincipalWithResponse indicates an expected call of GetUserExternalPrincipalWithResponse.
-func (mr *MockClientWithResponsesInterfaceMockRecorder) GetUserExternalPrincipalWithResponse(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserExternalPrincipalWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).GetUserExternalPrincipalWithResponse), varargs...)
-}
-
// GetUserWithResponse mocks base method.
func (m *MockClientWithResponsesInterface) GetUserWithResponse(arg0 context.Context, arg1 string, arg2 ...auth.RequestEditorFn) (*auth.GetUserResponse, error) {
m.ctrl.T.Helper()
diff --git a/pkg/auth/service.go b/pkg/auth/service.go
index 9a2847c115c..12500ac7d4e 100644
--- a/pkg/auth/service.go
+++ b/pkg/auth/service.go
@@ -83,7 +83,7 @@ type ExternalPrincipalsService interface {
IsExternalPrincipalsEnabled(ctx context.Context) bool
CreateUserExternalPrincipal(ctx context.Context, userID, principalID string) error
DeleteUserExternalPrincipal(ctx context.Context, userID, principalID string) error
- GetUserExternalPrincipal(ctx context.Context, userID, principalID string) (*model.ExternalPrincipal, error)
+ GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
}
@@ -1126,7 +1126,7 @@ func (s *AuthService) DeleteUserExternalPrincipal(ctx context.Context, userID, p
return ErrNotImplemented
}
-func (s *AuthService) GetUserExternalPrincipal(ctx context.Context, userID, principalID string) (*model.ExternalPrincipal, error) {
+func (s *AuthService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error) {
return nil, ErrNotImplemented
}
@@ -1975,7 +1975,9 @@ func (a *APIAuthService) CreateUserExternalPrincipal(ctx context.Context, userID
return fmt.Errorf("external principals disabled: %w", ErrInvalidRequest)
}
- resp, err := a.apiClient.CreateUserExternalPrincipalWithResponse(ctx, userID, principalID)
+ resp, err := a.apiClient.CreateUserExternalPrincipalWithResponse(ctx, userID, &CreateUserExternalPrincipalParams{
+ PrincipalId: principalID,
+ })
if err != nil {
return fmt.Errorf("create principal: %w", err)
}
@@ -1987,18 +1989,22 @@ func (a *APIAuthService) DeleteUserExternalPrincipal(ctx context.Context, userID
if !a.IsExternalPrincipalsEnabled(ctx) {
return fmt.Errorf("external principals disabled: %w", ErrInvalidRequest)
}
- resp, err := a.apiClient.DeleteUserExternalPrincipalWithResponse(ctx, userID, principalID)
+ resp, err := a.apiClient.DeleteUserExternalPrincipalWithResponse(ctx, userID, &DeleteUserExternalPrincipalParams{
+ principalID,
+ })
if err != nil {
return fmt.Errorf("delete external principal: %w", err)
}
return a.validateResponse(resp, http.StatusNoContent)
}
-func (a *APIAuthService) GetUserExternalPrincipal(ctx context.Context, userID, principalID string) (*model.ExternalPrincipal, error) {
+func (a *APIAuthService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error) {
if !a.IsExternalPrincipalsEnabled(ctx) {
return nil, fmt.Errorf("external principals disabled: %w", ErrInvalidRequest)
}
- resp, err := a.apiClient.GetUserExternalPrincipalWithResponse(ctx, userID, principalID)
+ resp, err := a.apiClient.GetExternalPrincipalWithResponse(ctx, &GetExternalPrincipalParams{
+ PrincipalId: principalID,
+ })
if err != nil {
return nil, fmt.Errorf("get external principal: %w", err)
}
diff --git a/pkg/auth/service_test.go b/pkg/auth/service_test.go
index 85aa1dd5dd8..7611f86f3a3 100644
--- a/pkg/auth/service_test.go
+++ b/pkg/auth/service_test.go
@@ -2657,7 +2657,8 @@ func TestAPIAuthService_CreateUserExternalPrincipal(t *testing.T) {
StatusCode: tt.responseStatusCode,
},
}
- mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), tt.userID, tt.principalID).Return(response, nil)
+ reqParams := gomock.Eq(&auth.CreateUserExternalPrincipalParams{PrincipalId: tt.principalID})
+ mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), tt.userID, reqParams).Return(response, nil)
err := s.CreateUserExternalPrincipal(ctx, tt.userID, tt.principalID)
if !errors.Is(err, tt.expectedErr) {
t.Fatalf("CreateUserExternalPrincipal: expected err: %v got: %v", tt.expectedErr, err)
@@ -2676,7 +2677,8 @@ func TestAPIAuthService_ReusePrincipalAfterDelete(t *testing.T) {
ctx := context.Background()
// create principal A for user1
- mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userA, principalId).Return(&auth.CreateUserExternalPrincipalResponse{
+ reqParams := gomock.Eq(&auth.CreateUserExternalPrincipalParams{PrincipalId: principalId})
+ mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userA, reqParams).Return(&auth.CreateUserExternalPrincipalResponse{
HTTPResponse: &http.Response{
StatusCode: http.StatusCreated,
},
@@ -2685,7 +2687,8 @@ func TestAPIAuthService_ReusePrincipalAfterDelete(t *testing.T) {
require.NoErrorf(t, err, "creating initial principal for user %s", userA)
// delete principal A for user1
- mockClient.EXPECT().DeleteUserExternalPrincipalWithResponse(gomock.Any(), userA, principalId).Return(&auth.DeleteUserExternalPrincipalResponse{
+ reqDelParams := gomock.Eq(&auth.DeleteUserExternalPrincipalParams{PrincipalId: principalId})
+ mockClient.EXPECT().DeleteUserExternalPrincipalWithResponse(gomock.Any(), userA, reqDelParams).Return(&auth.DeleteUserExternalPrincipalResponse{
HTTPResponse: &http.Response{
StatusCode: http.StatusNoContent,
},
@@ -2694,7 +2697,7 @@ func TestAPIAuthService_ReusePrincipalAfterDelete(t *testing.T) {
require.NoErrorf(t, err, "deleting principal for user %s", userA)
// re-use principal A again for user2
- mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userB, principalId).Return(&auth.CreateUserExternalPrincipalResponse{
+ mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userB, reqParams).Return(&auth.CreateUserExternalPrincipalResponse{
HTTPResponse: &http.Response{
StatusCode: http.StatusCreated,
},
@@ -2710,7 +2713,8 @@ func TestAPIAuthService_DeleteExternalPrincipalAttachedToUserDelete(t *testing.T
ctx := context.Background()
// create userA and principalA
- mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userId, principalId).Return(&auth.CreateUserExternalPrincipalResponse{
+ reqParams := gomock.Eq(&auth.CreateUserExternalPrincipalParams{PrincipalId: principalId})
+ mockClient.EXPECT().CreateUserExternalPrincipalWithResponse(gomock.Any(), userId, reqParams).Return(&auth.CreateUserExternalPrincipalResponse{
HTTPResponse: &http.Response{
StatusCode: http.StatusCreated,
},
@@ -2727,13 +2731,16 @@ func TestAPIAuthService_DeleteExternalPrincipalAttachedToUserDelete(t *testing.T
err = s.DeleteUser(ctx, userId)
require.NoError(t, err)
// get principalA and expect error
- mockClient.EXPECT().GetUserExternalPrincipalWithResponse(gomock.Any(), userId, gomock.Any()).Return(
- &auth.GetUserExternalPrincipalResponse{
+
+ mockClient.EXPECT().GetExternalPrincipalWithResponse(gomock.Any(), gomock.Eq(&auth.GetExternalPrincipalParams{
+ PrincipalId: principalId,
+ })).Return(
+ &auth.GetExternalPrincipalResponse{
HTTPResponse: &http.Response{
StatusCode: http.StatusNotFound,
},
}, auth.ErrNotFound)
- _, err = s.GetUserExternalPrincipal(ctx, userId, principalId)
+ _, err = s.GetExternalPrincipal(ctx, principalId)
require.Errorf(t, err, "principal should not exist if a user is deleted")
}
diff --git a/pkg/permissions/actions.gen.go b/pkg/permissions/actions.gen.go
index 55b91257cd5..34d84a96d13 100644
--- a/pkg/permissions/actions.gen.go
+++ b/pkg/permissions/actions.gen.go
@@ -52,6 +52,7 @@ var Actions = []string{
"auth:ListCredentials",
"auth:CreateUserExternalPrincipal",
"auth:DeleteUserExternalPrincipal",
+ "auth:ReadExternalPrincipal",
"ci:ReadAction",
"retention:PrepareGarbageCollectionCommits",
"retention:GetGarbageCollectionRules",
diff --git a/pkg/permissions/actions.go b/pkg/permissions/actions.go
index c495cfd16da..3fa70f13f22 100644
--- a/pkg/permissions/actions.go
+++ b/pkg/permissions/actions.go
@@ -63,6 +63,7 @@ const (
ListCredentialsAction = "auth:ListCredentials" //nolint:gosec
CreateUserExternalPrincipalAction = "auth:CreateUserExternalPrincipal"
DeleteUserExternalPrincipalAction = "auth:DeleteUserExternalPrincipal"
+ ReadExternalPrincipalAction = "auth:ReadExternalPrincipal"
ReadActionsAction = "ci:ReadAction"
PrepareGarbageCollectionCommitsAction = "retention:PrepareGarbageCollectionCommits"
GetGarbageCollectionRulesAction = "retention:GetGarbageCollectionRules"
diff --git a/pkg/permissions/permission.go b/pkg/permissions/permission.go
index 78b81fc4b67..5035db76309 100644
--- a/pkg/permissions/permission.go
+++ b/pkg/permissions/permission.go
@@ -57,3 +57,7 @@ func GroupArn(groupID string) string {
func PolicyArn(policyID string) string {
return authArnPrefix + "policy/" + policyID
}
+
+func ExternalPrincipalArn(principalID string) string {
+ return authArnPrefix + "externalPrincipal/" + principalID
+}