Skip to content

SDK (function) to list NPE/PE attributes? #947

Closed Answered by jrschumacher
b-long asked this question in SDK Q&A
Discussion options

You must be logged in to vote

Yes, but we don't have a convenient method quite yet. What you'll need to do is use the Authorization Service https://github.com/opentdf/platform/blob/main/sdk/sdk.go#L140 which uses this proto https://github.com/opentdf/platform/blob/main/service/authorization/authorization.proto.

Also keep in mind that the client (i.e. service-client) will need the appropriate permissions.

It should look something like this, but keep in mind you'll need to import the protocols for authorization.

package main

import "github.com/opentdf/platform/protocol/go/authorization"

// ... 
sdkClient.Authorization.GetEntitlements(context.TODO(), &authorization.GetEntitlementsRequest{
	Entities: []*authorization.En…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@b-long
Comment options

b-long Jun 7, 2024
Collaborator Author

@jrschumacher
Comment options

@b-long
Comment options

b-long Jun 7, 2024
Collaborator Author

@jrschumacher
Comment options

Answer selected by jrschumacher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants