diff --git a/api/authorization.yml b/api/authorization.yml
index b5d86c093ba..849bd4f4a9e 100644
--- a/api/authorization.yml
+++ b/api/authorization.yml
@@ -340,6 +340,29 @@ components:
format: int64
description: Unix Epoch in seconds
+ ExternalPrincipal:
+ type: object
+ required:
+ - user_id
+ - id
+ properties:
+ user_id:
+ type: string
+ id:
+ type: string
+ ExternalPrincipalList:
+ type: object
+ required:
+ - pagination
+ - results
+ properties:
+ pagination:
+ $ref: "#/components/schemas/Pagination"
+ results:
+ type: array
+ items:
+ $ref: "#/components/schemas/ExternalPrincipal"
+
paths:
/auth/users:
get:
@@ -1079,7 +1102,101 @@ paths:
$ref: "#/components/responses/Unauthorized"
default:
$ref: "#/components/responses/ServerError"
+ /auth/users/{userId}/external/principals:
+ parameters:
+ - in: path
+ name: userId
+ required: true
+ schema:
+ type: string
+ get:
+ tags:
+ - auth
+ - experimental
+ parameters:
+ - $ref: "#/components/parameters/PaginationPrefix"
+ - $ref: "#/components/parameters/PaginationAfter"
+ - $ref: "#/components/parameters/PaginationAmount"
+ operationId: listUserExternalPrincipals
+ summary: list external principals for user
+ responses:
+ 200:
+ description: external principals
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ExternalPrincipalList"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ default:
+ $ref: "#/components/responses/ServerError"
+ /auth/users/{userId}/external/principals/{principalId}:
+ parameters:
+ - in: path
+ name: userId
+ required: true
+ schema:
+ type: string
+ - in: path
+ name: principalId
+ required: true
+ schema:
+ type: string
+ post:
+ tags:
+ - auth
+ - experimental
+ operationId: createUserExternalPrincipal
+ summary: Create principal as external identity connected to lakeFS user
+ responses:
+ 201:
+ description: external principal created successfully
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 409:
+ $ref: "#/components/responses/Conflict"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+ delete:
+ tags:
+ - auth
+ - experimental
+ operationId: deleteUserExternalPrincipal
+ summary: delete external principal from user's external principal list
+ responses:
+ 204:
+ description: external principal deleted
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ default:
+ $ref: "#/components/responses/ServerError"
+ get:
+ tags:
+ - auth
+ - experimental
+ operationId: getUserExternalPrincipal
+ summary: get external principal
+ responses:
+ 200:
+ description: external principal
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ExternalPrincipal"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ default:
+ $ref: "#/components/responses/ServerError"
+
/healthcheck:
get:
operationId: healthCheck
diff --git a/api/swagger.yml b/api/swagger.yml
index 1b3082dc85e..bb14777143d 100644
--- a/api/swagger.yml
+++ b/api/swagger.yml
@@ -1633,7 +1633,47 @@ components:
- installation_id
- reports
-
+ ExternalPrincipalList:
+ type: object
+ required:
+ - pagination
+ - results
+ properties:
+ pagination:
+ $ref: "#/components/schemas/Pagination"
+ results:
+ type: array
+ items:
+ $ref: "#/components/schemas/ExternalPrincipal"
+ ExternalPrincipalSettings:
+ type: object
+ additionalProperties:
+ type: string
+ description: Additional settings to be consumed by the remote authenticator
+ ExternalPrincipalCreation:
+ type: object
+ properties:
+ settings:
+ type: object
+ items:
+ $ref: "#/components/schemas/ExternalPrincipalSettings"
+ ExternalPrincipal:
+ type: object
+ required:
+ - user_id
+ - id
+ properties:
+ id:
+ type: string
+ description: A unique identifier for the external principal i.e aws:sts::123:assumed-role/role-name
+ user_id:
+ type: string
+ description: |
+ lakeFS user ID to associate with an external principal.
+ settings:
+ type: object
+ items:
+ $ref: "#/components/schemas/ExternalPrincipalSettings"
paths:
/setup_comm_prefs:
post:
@@ -2394,6 +2434,118 @@ paths:
default:
$ref: "#/components/responses/ServerError"
+ /auth/users/{userId}/external/principal/{principalId}:
+ parameters:
+ - in: path
+ name: userId
+ required: true
+ schema:
+ type: string
+ - in: path
+ name: principalId
+ required: true
+ schema:
+ type: string
+ post:
+ tags:
+ - auth
+ - external
+ - experimental
+ operationId: createUserExternalPrincipal
+ summary: attach external principal to user
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ExternalPrincipalCreation"
+ responses:
+ 201:
+ description: external principal attached successfully
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 409:
+ $ref: "#/components/responses/Conflict"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+ delete:
+ tags:
+ - auth
+ - external
+ - experimental
+ operationId: deleteUserExternalPrincipal
+ summary: delete external principal from user
+ responses:
+ 204:
+ description: external principal detached successfully
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+ get:
+ tags:
+ - auth
+ - external
+ - experimental
+ operationId: getUserExternalPrincipal
+ summary: get external principal of a user
+ responses:
+ 200:
+ description: external principal
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ExternalPrincipal"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+
+ /auth/users/{userId}/external/principals:
+ parameters:
+ - in: path
+ name: userId
+ required: true
+ schema:
+ type: string
+ get:
+ tags:
+ - 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
+ responses:
+ 200:
+ description: external principals list
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ExternalPrincipalList"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
/auth/groups/{groupId}/policies:
parameters:
- in: path
@@ -2523,7 +2675,7 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
-
+
/repositories:
get:
tags:
diff --git a/clients/java-legacy/.openapi-generator/FILES b/clients/java-legacy/.openapi-generator/FILES
index 901152a3b23..2daced71191 100644
--- a/clients/java-legacy/.openapi-generator/FILES
+++ b/clients/java-legacy/.openapi-generator/FILES
@@ -36,6 +36,10 @@ docs/DiffList.md
docs/Error.md
docs/ErrorNoACL.md
docs/ExperimentalApi.md
+docs/ExternalApi.md
+docs/ExternalPrincipal.md
+docs/ExternalPrincipalCreation.md
+docs/ExternalPrincipalList.md
docs/FindMergeBaseResult.md
docs/GarbageCollectionConfig.md
docs/GarbageCollectionPrepareResponse.md
@@ -134,6 +138,7 @@ src/main/java/io/lakefs/clients/api/CommitsApi.java
src/main/java/io/lakefs/clients/api/ConfigApi.java
src/main/java/io/lakefs/clients/api/Configuration.java
src/main/java/io/lakefs/clients/api/ExperimentalApi.java
+src/main/java/io/lakefs/clients/api/ExternalApi.java
src/main/java/io/lakefs/clients/api/GzipRequestInterceptor.java
src/main/java/io/lakefs/clients/api/HealthCheckApi.java
src/main/java/io/lakefs/clients/api/ImportApi.java
@@ -180,6 +185,9 @@ src/main/java/io/lakefs/clients/api/model/Diff.java
src/main/java/io/lakefs/clients/api/model/DiffList.java
src/main/java/io/lakefs/clients/api/model/Error.java
src/main/java/io/lakefs/clients/api/model/ErrorNoACL.java
+src/main/java/io/lakefs/clients/api/model/ExternalPrincipal.java
+src/main/java/io/lakefs/clients/api/model/ExternalPrincipalCreation.java
+src/main/java/io/lakefs/clients/api/model/ExternalPrincipalList.java
src/main/java/io/lakefs/clients/api/model/FindMergeBaseResult.java
src/main/java/io/lakefs/clients/api/model/GarbageCollectionConfig.java
src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponse.java
@@ -255,6 +263,7 @@ src/test/java/io/lakefs/clients/api/BranchesApiTest.java
src/test/java/io/lakefs/clients/api/CommitsApiTest.java
src/test/java/io/lakefs/clients/api/ConfigApiTest.java
src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
+src/test/java/io/lakefs/clients/api/ExternalApiTest.java
src/test/java/io/lakefs/clients/api/HealthCheckApiTest.java
src/test/java/io/lakefs/clients/api/ImportApiTest.java
src/test/java/io/lakefs/clients/api/InternalApiTest.java
@@ -289,6 +298,9 @@ src/test/java/io/lakefs/clients/api/model/DiffListTest.java
src/test/java/io/lakefs/clients/api/model/DiffTest.java
src/test/java/io/lakefs/clients/api/model/ErrorNoACLTest.java
src/test/java/io/lakefs/clients/api/model/ErrorTest.java
+src/test/java/io/lakefs/clients/api/model/ExternalPrincipalCreationTest.java
+src/test/java/io/lakefs/clients/api/model/ExternalPrincipalListTest.java
+src/test/java/io/lakefs/clients/api/model/ExternalPrincipalTest.java
src/test/java/io/lakefs/clients/api/model/FindMergeBaseResultTest.java
src/test/java/io/lakefs/clients/api/model/GarbageCollectionConfigTest.java
src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponseTest.java
diff --git a/clients/java-legacy/README.md b/clients/java-legacy/README.md
index e6cde5c1aef..283c01eedb0 100644
--- a/clients/java-legacy/README.md
+++ b/clients/java-legacy/README.md
@@ -146,11 +146,13 @@ 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* | [**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* | [**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
@@ -159,11 +161,13 @@ Class | Method | HTTP request | Description
*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* | [**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
@@ -184,7 +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* | [**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
*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
@@ -280,6 +292,9 @@ Class | Method | HTTP request | Description
- [DiffList](docs/DiffList.md)
- [Error](docs/Error.md)
- [ErrorNoACL](docs/ErrorNoACL.md)
+ - [ExternalPrincipal](docs/ExternalPrincipal.md)
+ - [ExternalPrincipalCreation](docs/ExternalPrincipalCreation.md)
+ - [ExternalPrincipalList](docs/ExternalPrincipalList.md)
- [FindMergeBaseResult](docs/FindMergeBaseResult.md)
- [GarbageCollectionConfig](docs/GarbageCollectionConfig.md)
- [GarbageCollectionPrepareResponse](docs/GarbageCollectionPrepareResponse.md)
diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml
index 2e2eca251fb..4a5a6a1d592 100644
--- a/clients/java-legacy/api/openapi.yaml
+++ b/clients/java-legacy/api/openapi.yaml
@@ -1378,6 +1378,233 @@ paths:
tags:
- auth
x-accepts: application/json
+ /auth/users/{userId}/external/principal/{principalId}:
+ delete:
+ operationId: deleteUserExternalPrincipal
+ 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:
+ "204":
+ description: external principal detached successfully
+ "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: delete external principal from user
+ tags:
+ - auth
+ - 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:
+ - 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
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExternalPrincipalCreation'
+ required: true
+ responses:
+ "201":
+ description: external principal attached successfully
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "409":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Conflicts With Target
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: attach external principal to user
+ tags:
+ - auth
+ - external
+ - experimental
+ x-contentType: application/json
+ x-accepts: application/json
+ /auth/users/{userId}/external/principals:
+ get:
+ operationId: listUserExternalPrincipals
+ parameters:
+ - explode: false
+ in: path
+ name: userId
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: return items prefixed with this value
+ explode: true
+ in: query
+ name: prefix
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: return items after this value
+ explode: true
+ in: query
+ name: after
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: how many items to return
+ explode: true
+ in: query
+ name: amount
+ required: false
+ schema:
+ default: 100
+ maximum: 1000
+ minimum: -1
+ type: integer
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExternalPrincipalList'
+ description: external principals list
+ "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: list user external policies attached to a user
+ tags:
+ - auth
+ - external
+ - experimental
+ x-accepts: application/json
/auth/groups/{groupId}/policies:
get:
operationId: listGroupPolicies
@@ -8736,6 +8963,74 @@ components:
- installation_id
- reports
type: object
+ ExternalPrincipalList:
+ example:
+ pagination:
+ max_per_page: 0
+ has_more: true
+ next_offset: next_offset
+ results: 0
+ results:
+ - settings:
+ - null
+ - null
+ user_id: user_id
+ id: id
+ - settings:
+ - null
+ - null
+ user_id: user_id
+ id: id
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ results:
+ items:
+ $ref: '#/components/schemas/ExternalPrincipal'
+ type: array
+ required:
+ - pagination
+ - results
+ type: object
+ ExternalPrincipalSettings:
+ additionalProperties:
+ type: string
+ description: Additional settings to be consumed by the remote authenticator
+ type: object
+ ExternalPrincipalCreation:
+ example:
+ settings:
+ - null
+ - null
+ properties:
+ settings:
+ items:
+ $ref: '#/components/schemas/ExternalPrincipalSettings'
+ type: array
+ type: object
+ ExternalPrincipal:
+ example:
+ settings:
+ - null
+ - null
+ user_id: user_id
+ id: id
+ properties:
+ id:
+ description: A unique identifier for the external principal i.e aws:sts::123:assumed-role/role-name
+ type: string
+ user_id:
+ description: |
+ lakeFS user ID to associate with an external principal.
+ type: string
+ settings:
+ items:
+ $ref: '#/components/schemas/ExternalPrincipalSettings'
+ type: array
+ required:
+ - id
+ - user_id
+ type: object
inline_object:
properties:
content:
diff --git a/clients/java-legacy/docs/AuthApi.md b/clients/java-legacy/docs/AuthApi.md
index 25fddc385c9..fff5b7ebc57 100644
--- a/clients/java-legacy/docs/AuthApi.md
+++ b/clients/java-legacy/docs/AuthApi.md
@@ -11,11 +11,13 @@ 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
[**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
[**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
@@ -24,11 +26,13 @@ Method | HTTP request | Description
[**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
[**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
@@ -686,6 +690,102 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **createUserExternalPrincipal**
+> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+
+attach external principal to user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.AuthApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ AuthApi apiInstance = new AuthApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
+ try {
+ apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AuthApi#createUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | external principal attached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**409** | Resource Conflicts With Target | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
# **deleteCredentials**
> deleteCredentials(userId, accessKeyId)
@@ -1145,6 +1245,99 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **deleteUserExternalPrincipal**
+> deleteUserExternalPrincipal(userId, principalId)
+
+delete external principal from user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.AuthApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ AuthApi apiInstance = new AuthApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ try {
+ apiInstance.deleteUserExternalPrincipal(userId, principalId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AuthApi#deleteUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**204** | external principal detached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
# **detachPolicyFromGroup**
> detachPolicyFromGroup(groupId, policyId)
@@ -1877,6 +2070,100 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **getUserExternalPrincipal**
+> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+get external principal of a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.AuthApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ AuthApi apiInstance = new AuthApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ try {
+ ExternalPrincipal result = apiInstance.getUserExternalPrincipal(userId, principalId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AuthApi#getUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+[**ExternalPrincipal**](ExternalPrincipal.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### 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 | - |
+
# **listGroupMembers**
> UserList listGroupMembers(groupId, prefix, after, amount)
@@ -2360,6 +2647,104 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **listUserExternalPrincipals**
+> ExternalPrincipalList listUserExternalPrincipals(userId, prefix, after, amount)
+
+list user external policies attached to a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.AuthApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ AuthApi apiInstance = new AuthApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String prefix = "prefix_example"; // String | return items prefixed with this value
+ String after = "after_example"; // String | return items after this value
+ Integer amount = 100; // Integer | how many items to return
+ try {
+ ExternalPrincipalList result = apiInstance.listUserExternalPrincipals(userId, prefix, after, amount);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AuthApi#listUserExternalPrincipals");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **prefix** | **String**| return items prefixed with this value | [optional]
+ **after** | **String**| return items after this value | [optional]
+ **amount** | **Integer**| how many items to return | [optional] [default to 100]
+
+### Return type
+
+[**ExternalPrincipalList**](ExternalPrincipalList.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | external principals list | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
# **listUserGroups**
> GroupList listUserGroups(userId, prefix, after, amount)
diff --git a/clients/java-legacy/docs/ExperimentalApi.md b/clients/java-legacy/docs/ExperimentalApi.md
index 96bbe055171..a4d891638f7 100644
--- a/clients/java-legacy/docs/ExperimentalApi.md
+++ b/clients/java-legacy/docs/ExperimentalApi.md
@@ -7,7 +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
[**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
@@ -317,6 +321,289 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **createUserExternalPrincipal**
+> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+
+attach external principal to user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExperimentalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
+ try {
+ apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExperimentalApi#createUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | external principal attached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**409** | Resource Conflicts With Target | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **deleteUserExternalPrincipal**
+> deleteUserExternalPrincipal(userId, principalId)
+
+delete external principal from user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExperimentalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ try {
+ apiInstance.deleteUserExternalPrincipal(userId, principalId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExperimentalApi#deleteUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**204** | external principal detached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **getUserExternalPrincipal**
+> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+get external principal of a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExperimentalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //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);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExperimentalApi#getUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+[**ExternalPrincipal**](ExternalPrincipal.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### 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 | - |
+
# **hardResetBranch**
> hardResetBranch(repository, branch, ref, force)
@@ -418,3 +705,101 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **listUserExternalPrincipals**
+> ExternalPrincipalList listUserExternalPrincipals(userId, prefix, after, amount)
+
+list user external policies attached to a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExperimentalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String prefix = "prefix_example"; // String | return items prefixed with this value
+ String after = "after_example"; // String | return items after this value
+ Integer amount = 100; // Integer | how many items to return
+ try {
+ ExternalPrincipalList result = apiInstance.listUserExternalPrincipals(userId, prefix, after, amount);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExperimentalApi#listUserExternalPrincipals");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **prefix** | **String**| return items prefixed with this value | [optional]
+ **after** | **String**| return items after this value | [optional]
+ **amount** | **Integer**| how many items to return | [optional] [default to 100]
+
+### Return type
+
+[**ExternalPrincipalList**](ExternalPrincipalList.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | external principals list | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
diff --git a/clients/java-legacy/docs/ExternalApi.md b/clients/java-legacy/docs/ExternalApi.md
new file mode 100644
index 00000000000..11a267baf24
--- /dev/null
+++ b/clients/java-legacy/docs/ExternalApi.md
@@ -0,0 +1,393 @@
+# ExternalApi
+
+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**
+> createUserExternalPrincipal(userId, principalId, externalPrincipalCreation)
+
+attach external principal to user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExternalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExternalApi apiInstance = new ExternalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ ExternalPrincipalCreation externalPrincipalCreation = new ExternalPrincipalCreation(); // ExternalPrincipalCreation |
+ try {
+ apiInstance.createUserExternalPrincipal(userId, principalId, externalPrincipalCreation);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExternalApi#createUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+ **externalPrincipalCreation** | [**ExternalPrincipalCreation**](ExternalPrincipalCreation.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | external principal attached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**409** | Resource Conflicts With Target | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **deleteUserExternalPrincipal**
+> deleteUserExternalPrincipal(userId, principalId)
+
+delete external principal from user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExternalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExternalApi apiInstance = new ExternalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String principalId = "principalId_example"; // String |
+ try {
+ apiInstance.deleteUserExternalPrincipal(userId, principalId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExternalApi#deleteUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**204** | external principal detached successfully | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **getUserExternalPrincipal**
+> ExternalPrincipal getUserExternalPrincipal(userId, principalId)
+
+get external principal of a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExternalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //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);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExternalApi#getUserExternalPrincipal");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **principalId** | **String**| |
+
+### Return type
+
+[**ExternalPrincipal**](ExternalPrincipal.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### 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 | - |
+
+
+# **listUserExternalPrincipals**
+> ExternalPrincipalList listUserExternalPrincipals(userId, prefix, after, amount)
+
+list user external policies attached to a user
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.ExternalApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/api/v1");
+
+ // Configure HTTP basic authorization: basic_auth
+ HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
+ basic_auth.setUsername("YOUR USERNAME");
+ basic_auth.setPassword("YOUR PASSWORD");
+
+ // Configure API key authorization: cookie_auth
+ ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
+ cookie_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //cookie_auth.setApiKeyPrefix("Token");
+
+ // Configure HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER TOKEN");
+
+ // Configure API key authorization: oidc_auth
+ ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
+ oidc_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //oidc_auth.setApiKeyPrefix("Token");
+
+ // Configure API key authorization: saml_auth
+ ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
+ saml_auth.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //saml_auth.setApiKeyPrefix("Token");
+
+ ExternalApi apiInstance = new ExternalApi(defaultClient);
+ String userId = "userId_example"; // String |
+ String prefix = "prefix_example"; // String | return items prefixed with this value
+ String after = "after_example"; // String | return items after this value
+ Integer amount = 100; // Integer | how many items to return
+ try {
+ ExternalPrincipalList result = apiInstance.listUserExternalPrincipals(userId, prefix, after, amount);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ExternalApi#listUserExternalPrincipals");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **String**| |
+ **prefix** | **String**| return items prefixed with this value | [optional]
+ **after** | **String**| return items after this value | [optional]
+ **amount** | **Integer**| how many items to return | [optional] [default to 100]
+
+### Return type
+
+[**ExternalPrincipalList**](ExternalPrincipalList.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | external principals list | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
diff --git a/clients/java-legacy/docs/ExternalPrincipal.md b/clients/java-legacy/docs/ExternalPrincipal.md
new file mode 100644
index 00000000000..718d53279b5
--- /dev/null
+++ b/clients/java-legacy/docs/ExternalPrincipal.md
@@ -0,0 +1,15 @@
+
+
+# ExternalPrincipal
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | A unique identifier for the external principal i.e aws:sts::123:assumed-role/role-name |
+**userId** | **String** | lakeFS user ID to associate with an external principal. |
+**settings** | **List<Map<String, String>>** | | [optional]
+
+
+
diff --git a/clients/java-legacy/docs/ExternalPrincipalCreation.md b/clients/java-legacy/docs/ExternalPrincipalCreation.md
new file mode 100644
index 00000000000..b0b723143af
--- /dev/null
+++ b/clients/java-legacy/docs/ExternalPrincipalCreation.md
@@ -0,0 +1,13 @@
+
+
+# ExternalPrincipalCreation
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**settings** | **List<Map<String, String>>** | | [optional]
+
+
+
diff --git a/clients/java-legacy/docs/ExternalPrincipalList.md b/clients/java-legacy/docs/ExternalPrincipalList.md
new file mode 100644
index 00000000000..ca12d513045
--- /dev/null
+++ b/clients/java-legacy/docs/ExternalPrincipalList.md
@@ -0,0 +1,14 @@
+
+
+# ExternalPrincipalList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pagination** | [**Pagination**](Pagination.md) | |
+**results** | [**List<ExternalPrincipal>**](ExternalPrincipal.md) | |
+
+
+
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 cb477ecfc87..0462a6231a3 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
@@ -35,6 +35,9 @@
import io.lakefs.clients.api.model.CurrentUser;
import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.ErrorNoACL;
+import io.lakefs.clients.api.model.ExternalPrincipal;
+import io.lakefs.clients.api.model.ExternalPrincipalCreation;
+import io.lakefs.clients.api.model.ExternalPrincipalList;
import io.lakefs.clients.api.model.Group;
import io.lakefs.clients.api.model.GroupCreation;
import io.lakefs.clients.api.model.GroupList;
@@ -979,6 +982,153 @@ public okhttp3.Call createUserAsync(UserCreation userCreation, final ApiCallback
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for createUserExternalPrincipal
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+ 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()));
+
+ 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 = {
+ "application/json"
+ };
+ 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, 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 createUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ 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;
+
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ createUserExternalPrincipalWithHttpInfo(userId, principalId, externalPrincipalCreation);
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * attach external principal to user (asynchronously)
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalAsync(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
/**
* Build call for deleteCredentials
* @param userId (required)
@@ -1619,6 +1769,140 @@ public okhttp3.Call deleteUserAsync(String userId, final ApiCallback _call
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
+ /**
+ * Build call for deleteUserExternalPrincipal
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalCall(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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteUserExternalPrincipalValidateBeforeCall(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 deleteUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ throw new ApiException("Missing the required parameter 'principalId' when calling deleteUserExternalPrincipal(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalCall(userId, principalId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void deleteUserExternalPrincipal(String userId, String principalId) throws ApiException {
+ deleteUserExternalPrincipalWithHttpInfo(userId, principalId);
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse deleteUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * delete external principal from 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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
/**
* Build call for detachPolicyFromGroup
* @param groupId (required)
@@ -2639,6 +2923,144 @@ 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)
@@ -3367,6 +3789,158 @@ public okhttp3.Call listUserCredentialsAsync(String userId, String prefix, Strin
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for listUserExternalPrincipals
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (prefix != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix));
+ }
+
+ if (after != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
+ }
+
+ if (amount != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount));
+ }
+
+ 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 listUserExternalPrincipalsValidateBeforeCall(String userId, String prefix, String after, Integer amount, 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 listUserExternalPrincipals(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsCall(userId, prefix, after, amount, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ExternalPrincipalList
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ExternalPrincipalList listUserExternalPrincipals(String userId, String prefix, String after, Integer amount) throws ApiException {
+ ApiResponse localVarResp = listUserExternalPrincipalsWithHttpInfo(userId, prefix, after, amount);
+ return localVarResp.getData();
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ApiResponse<ExternalPrincipalList>
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse listUserExternalPrincipalsWithHttpInfo(String userId, String prefix, String after, Integer amount) throws ApiException {
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * list user external policies attached to a user (asynchronously)
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsAsync(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for listUserGroups
* @param userId (required)
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 428be7ae3da..fecc4802c95 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
@@ -30,6 +30,9 @@
import io.lakefs.clients.api.model.AbortPresignMultipartUpload;
import io.lakefs.clients.api.model.CompletePresignMultipartUpload;
import io.lakefs.clients.api.model.Error;
+import io.lakefs.clients.api.model.ExternalPrincipal;
+import io.lakefs.clients.api.model.ExternalPrincipalCreation;
+import io.lakefs.clients.api.model.ExternalPrincipalList;
import io.lakefs.clients.api.model.ObjectStats;
import io.lakefs.clients.api.model.PresignMultipartUpload;
import io.lakefs.clients.api.model.StagingLocation;
@@ -560,6 +563,425 @@ public okhttp3.Call createPresignMultipartUploadAsync(String repository, String
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for createUserExternalPrincipal
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+ 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()));
+
+ 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 = {
+ "application/json"
+ };
+ 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, 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 createUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ 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;
+
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ createUserExternalPrincipalWithHttpInfo(userId, principalId, externalPrincipalCreation);
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * attach external principal to user (asynchronously)
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalAsync(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteUserExternalPrincipal
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalCall(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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteUserExternalPrincipalValidateBeforeCall(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 deleteUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ throw new ApiException("Missing the required parameter 'principalId' when calling deleteUserExternalPrincipal(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalCall(userId, principalId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void deleteUserExternalPrincipal(String userId, String principalId) throws ApiException {
+ deleteUserExternalPrincipalWithHttpInfo(userId, principalId);
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse deleteUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * delete external principal from 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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _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 hardResetBranch
* @param repository (required)
@@ -723,4 +1145,156 @@ public okhttp3.Call hardResetBranchAsync(String repository, String branch, Strin
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
+ /**
+ * Build call for listUserExternalPrincipals
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (prefix != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix));
+ }
+
+ if (after != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
+ }
+
+ if (amount != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount));
+ }
+
+ 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 listUserExternalPrincipalsValidateBeforeCall(String userId, String prefix, String after, Integer amount, 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 listUserExternalPrincipals(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsCall(userId, prefix, after, amount, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ExternalPrincipalList
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ExternalPrincipalList listUserExternalPrincipals(String userId, String prefix, String after, Integer amount) throws ApiException {
+ ApiResponse localVarResp = listUserExternalPrincipalsWithHttpInfo(userId, prefix, after, amount);
+ return localVarResp.getData();
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ApiResponse<ExternalPrincipalList>
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse listUserExternalPrincipalsWithHttpInfo(String userId, String prefix, String after, Integer amount) throws ApiException {
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * list user external policies attached to a user (asynchronously)
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsAsync(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
}
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
new file mode 100644
index 00000000000..e31aeb9d8ad
--- /dev/null
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExternalApi.java
@@ -0,0 +1,631 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api;
+
+import io.lakefs.clients.api.ApiCallback;
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.ApiResponse;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.Pair;
+import io.lakefs.clients.api.ProgressRequestBody;
+import io.lakefs.clients.api.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import io.lakefs.clients.api.model.Error;
+import io.lakefs.clients.api.model.ExternalPrincipal;
+import io.lakefs.clients.api.model.ExternalPrincipalCreation;
+import io.lakefs.clients.api.model.ExternalPrincipalList;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ExternalApi {
+ private ApiClient localVarApiClient;
+
+ public ExternalApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public ExternalApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ /**
+ * Build call for createUserExternalPrincipal
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+ 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()));
+
+ 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 = {
+ "application/json"
+ };
+ 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createUserExternalPrincipalValidateBeforeCall(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, 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 createUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ 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;
+
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void createUserExternalPrincipal(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ createUserExternalPrincipalWithHttpInfo(userId, principalId, externalPrincipalCreation);
+ }
+
+ /**
+ * attach external principal to user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse createUserExternalPrincipalWithHttpInfo(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation) throws ApiException {
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * attach external principal to user (asynchronously)
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @param externalPrincipalCreation (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 |
+ 201 | external principal attached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 409 | Resource Conflicts With Target | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call createUserExternalPrincipalAsync(String userId, String principalId, ExternalPrincipalCreation externalPrincipalCreation, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createUserExternalPrincipalValidateBeforeCall(userId, principalId, externalPrincipalCreation, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteUserExternalPrincipal
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalCall(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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteUserExternalPrincipalValidateBeforeCall(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 deleteUserExternalPrincipal(Async)");
+ }
+
+ // verify the required parameter 'principalId' is set
+ if (principalId == null) {
+ throw new ApiException("Missing the required parameter 'principalId' when calling deleteUserExternalPrincipal(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalCall(userId, principalId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public void deleteUserExternalPrincipal(String userId, String principalId) throws ApiException {
+ deleteUserExternalPrincipalWithHttpInfo(userId, principalId);
+ }
+
+ /**
+ * delete external principal from user
+ *
+ * @param userId (required)
+ * @param principalId (required)
+ * @return ApiResponse<Void>
+ * @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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse deleteUserExternalPrincipalWithHttpInfo(String userId, String principalId) throws ApiException {
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * delete external principal from 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 |
+ 204 | external principal detached successfully | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call deleteUserExternalPrincipalAsync(String userId, String principalId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteUserExternalPrincipalValidateBeforeCall(userId, principalId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _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 listUserExternalPrincipals
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/auth/users/{userId}/external/principals"
+ .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (prefix != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix));
+ }
+
+ if (after != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
+ }
+
+ if (amount != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount));
+ }
+
+ 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 listUserExternalPrincipalsValidateBeforeCall(String userId, String prefix, String after, Integer amount, 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 listUserExternalPrincipals(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsCall(userId, prefix, after, amount, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ExternalPrincipalList
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ExternalPrincipalList listUserExternalPrincipals(String userId, String prefix, String after, Integer amount) throws ApiException {
+ ApiResponse localVarResp = listUserExternalPrincipalsWithHttpInfo(userId, prefix, after, amount);
+ return localVarResp.getData();
+ }
+
+ /**
+ * list user external policies attached to a user
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @return ApiResponse<ExternalPrincipalList>
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse listUserExternalPrincipalsWithHttpInfo(String userId, String prefix, String after, Integer amount) throws ApiException {
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * list user external policies attached to a user (asynchronously)
+ *
+ * @param userId (required)
+ * @param prefix return items prefixed with this value (optional)
+ * @param after return items after this value (optional)
+ * @param amount how many items to return (optional, default to 100)
+ * @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 principals list | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call listUserExternalPrincipalsAsync(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listUserExternalPrincipalsValidateBeforeCall(userId, prefix, after, amount, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ExternalPrincipal.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ExternalPrincipal.java
new file mode 100644
index 00000000000..d44e2c24f4e
--- /dev/null
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ExternalPrincipal.java
@@ -0,0 +1,167 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ExternalPrincipal
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ExternalPrincipal {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_USER_ID = "user_id";
+ @SerializedName(SERIALIZED_NAME_USER_ID)
+ private String userId;
+
+ public static final String SERIALIZED_NAME_SETTINGS = "settings";
+ @SerializedName(SERIALIZED_NAME_SETTINGS)
+ private List