Skip to content

Commit

Permalink
feat(sdk): the authorization service is needed for use by gateway (#85)
Browse files Browse the repository at this point in the history
It is also included in the go sdk so it should be safe to expose to
customers
  • Loading branch information
mkleene authored Jul 15, 2024
1 parent c299dbd commit 73cac82
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sdk/src/main/java/io/opentdf/platform/sdk/SDK.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package io.opentdf.platform.sdk;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.opentdf.platform.authorization.AuthorizationServiceGrpc;
import io.opentdf.platform.authorization.AuthorizationServiceGrpc.AuthorizationServiceFutureStub;
import io.opentdf.platform.policy.attributes.AttributesServiceGrpc;
import io.opentdf.platform.policy.attributes.AttributesServiceGrpc.AttributesServiceFutureStub;
import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc;
Expand Down Expand Up @@ -34,6 +35,7 @@ public interface KAS extends AutoCloseable {

// TODO: add KAS
public interface Services extends AutoCloseable {
AuthorizationServiceFutureStub authorization();
AttributesServiceFutureStub attributes();
NamespaceServiceFutureStub namespaces();
SubjectMappingServiceFutureStub subjectMappings();
Expand All @@ -45,6 +47,7 @@ static Services newServices(ManagedChannel channel, KAS kas) {
var namespaceService = NamespaceServiceGrpc.newFutureStub(channel);
var subjectMappingService = SubjectMappingServiceGrpc.newFutureStub(channel);
var resourceMappingService = ResourceMappingServiceGrpc.newFutureStub(channel);
var authorizationService = AuthorizationServiceGrpc.newFutureStub(channel);

return new Services() {
@Override
Expand Down Expand Up @@ -73,6 +76,11 @@ public ResourceMappingServiceFutureStub resourceMappings() {
return resourceMappingService;
}

@Override
public AuthorizationServiceFutureStub authorization() {
return authorizationService;
}

@Override
public KAS kas() {
return kas;
Expand Down

0 comments on commit 73cac82

Please sign in to comment.