Skip to content

Commit d5a88b8

Browse files
committed
Remove federated flag from principal entity
1 parent bcbe4ee commit d5a88b8

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package org.apache.polaris.service.it.test;
2020

21-
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
2221
import static javax.ws.rs.core.Response.Status.CREATED;
2322
import static javax.ws.rs.core.Response.Status.FORBIDDEN;
2423
import static org.apache.polaris.service.it.env.PolarisClient.polarisClient;
@@ -874,21 +873,6 @@ public void testCreatePrincipalAndRotateCredentials() {
874873
// rotation that makes the old secret fall off retention.
875874
}
876875

877-
@Test
878-
public void testCreateFederatedPrincipalFails() {
879-
// Create a federated Principal
880-
Principal federatedPrincipal =
881-
new Principal(client.newEntityName("federatedPrincipal"), "abc", true, Map.of(), 0L, 0L, 1);
882-
883-
// Attempt to create the federated Principal using the managementApi
884-
try (Response createPResponse =
885-
managementApi
886-
.request("v1/principals")
887-
.post(Entity.json(new CreatePrincipalRequest(federatedPrincipal, false)))) {
888-
assertThat(createPResponse).returns(BAD_REQUEST.getStatusCode(), Response::getStatus);
889-
}
890-
}
891-
892876
@Test
893877
public void testCreateFederatedPrincipalRoleSucceeds() {
894878
// Create a federated Principal Role

polaris-core/src/main/java/org/apache/polaris/core/entity/PrincipalEntity.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public static PrincipalEntity of(PolarisBaseEntity sourceEntity) {
3737
public static PrincipalEntity fromPrincipal(Principal principal) {
3838
return new Builder()
3939
.setName(principal.getName())
40-
.setFederated(principal.getFederated())
4140
.setProperties(principal.getProperties())
4241
.setClientId(principal.getClientId())
4342
.build();
@@ -47,7 +46,6 @@ public Principal asPrincipal() {
4746
return new Principal(
4847
getName(),
4948
getClientId(),
50-
FederatedEntities.isFederated(this),
5149
getPropertiesAsMap(),
5250
getCreateTimestamp(),
5351
getLastUpdateTimestamp(),

spec/polaris-management-service.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,10 +1101,6 @@ components:
11011101
clientId:
11021102
type: string
11031103
description: The output-only OAuth clientId associated with this principal if applicable
1104-
federated:
1105-
type: boolean
1106-
description: Whether the principal is a federated identity (that is, managed by an external identity provider)
1107-
default: false
11081104
properties:
11091105
type: object
11101106
additionalProperties:

0 commit comments

Comments
 (0)