Skip to content

Commit eb8c7ce

Browse files
committed
wip, buf limits locally
1 parent 91e8575 commit eb8c7ce

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

examples/src/main/java/io/opentdf/platform/GetEntitlements.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import io.opentdf.platform.authorization.EntityEntitlements;
55
import io.opentdf.platform.authorization.GetEntitlementsRequest;
66
import io.opentdf.platform.authorization.GetEntitlementsResponse;
7+
import io.opentdf.platform.authorization.v2.EntityIdentifier;
8+
import io.opentdf.platform.entity.EntityChain;
79
import io.opentdf.platform.sdk.*;
810

911
import java.util.Collections;
@@ -31,5 +33,6 @@ public static void main(String[] args) {
3133
List<EntityEntitlements> entitlements = resp.getEntitlementsList();
3234

3335
System.out.println(entitlements.get(0).getAttributeValueFqnsList());
36+
3437
}
3538
}

sdk/src/main/java/io/opentdf/platform/sdk/SDK.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import com.connectrpc.impl.ProtocolClient;
66
import io.opentdf.platform.authorization.AuthorizationServiceClientInterface;
7-
import io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface;
87
import io.opentdf.platform.policy.attributes.AttributesServiceClientInterface;
98
import io.opentdf.platform.policy.kasregistry.KeyAccessServerRegistryServiceClientInterface;
109
import io.opentdf.platform.policy.namespaces.NamespaceServiceClientInterface;
@@ -75,7 +74,7 @@ public interface Services extends AutoCloseable {
7574

7675
AuthorizationServiceClientInterface authorization();
7776

78-
io.opentdf.platform.authorization.v2.AuthorizationServiceClient authorizationV2();
77+
io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationV2();
7978

8079
KeyAccessServerRegistryServiceClientInterface kasRegistry();
8180

sdk/src/test/java/io/opentdf/platform/sdk/FakeServices.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
public class FakeServices implements SDK.Services {
1414

1515
private final AuthorizationServiceClientInterface authorizationService;
16+
private final io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationServiceV2;
1617
private final AttributesServiceClientInterface attributesService;
1718
private final NamespaceServiceClientInterface namespaceService;
1819
private final SubjectMappingServiceClientInterface subjectMappingService;
@@ -23,6 +24,7 @@ public class FakeServices implements SDK.Services {
2324

2425
public FakeServices(
2526
AuthorizationServiceClientInterface authorizationService,
27+
io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationServiceV2,
2628
AttributesServiceClientInterface attributesService,
2729
NamespaceServiceClientInterface namespaceService,
2830
SubjectMappingServiceClientInterface subjectMappingService,
@@ -31,6 +33,7 @@ public FakeServices(
3133
WellKnownServiceClientInterface wellKnownServiceClient,
3234
SDK.KAS kas) {
3335
this.authorizationService = authorizationService;
36+
this.authorizationServiceV2 = authorizationServiceV2;
3437
this.attributesService = attributesService;
3538
this.namespaceService = namespaceService;
3639
this.subjectMappingService = subjectMappingService;
@@ -40,6 +43,11 @@ public FakeServices(
4043
this.kas = kas;
4144
}
4245

46+
@Override
47+
public io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationV2() {
48+
return Objects.requireNonNull(authorizationServiceV2);
49+
}
50+
4351
@Override
4452
public AuthorizationServiceClientInterface authorization() {
4553
return Objects.requireNonNull(authorizationService);

sdk/src/test/java/io/opentdf/platform/sdk/FakeServicesBuilder.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
public class FakeServicesBuilder {
1212
private AuthorizationServiceClientInterface authorizationService;
13+
private io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationServiceV2;
1314
private AttributesServiceClientInterface attributesService;
1415
private NamespaceServiceClientInterface namespaceService;
1516
private SubjectMappingServiceClientInterface subjectMappingService;
@@ -23,6 +24,11 @@ public FakeServicesBuilder setAuthorizationService(AuthorizationServiceClientInt
2324
return this;
2425
}
2526

27+
public FakeServicesBuilder setAuthorizationServiceV2(io.opentdf.platform.authorization.v2.AuthorizationServiceClientInterface authorizationServiceV2) {
28+
this.authorizationServiceV2 = authorizationServiceV2;
29+
return this;
30+
}
31+
2632
public FakeServicesBuilder setAttributesService(AttributesServiceClientInterface attributesService) {
2733
this.attributesService = attributesService;
2834
return this;
@@ -59,7 +65,7 @@ public FakeServicesBuilder setKas(SDK.KAS kas) {
5965
}
6066

6167
public FakeServices build() {
62-
return new FakeServices(authorizationService, attributesService, namespaceService, subjectMappingService,
68+
return new FakeServices(authorizationService, authorizationServiceV2, attributesService, namespaceService, subjectMappingService,
6369
resourceMappingService, keyAccessServerRegistryServiceFutureStub, wellKnownServiceClient, kas);
6470
}
6571
}

0 commit comments

Comments
 (0)