Accessing Participant Roles in Policy Extension #485
-
As you may know, when creating a participant through the '/api/identity/v1alpha/participants' API, there are properties roles available. I want to use these values for comparison in policies realtimely, so I've been trying to inject 'ParticipantContextService' into a policy extension. However, it doesn't seem to be working properly. Am I attempting something that's not feasible? I tried to add the following code to 'DcpPatchExtension.java' in the /extensions/dcp-impl path of my existing MVD codebase,
and then added to the 'build.gradle.kts' file for injection.
Then I attempted to use it in
If there's any alternative approach, please let me know. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
the roles of a For policy eval, only claims of a VC can be used. If a "role" is a first-level concept in your data space, then you will have to issue VerifiableCredentials that contain role information in their |
Beta Was this translation helpful? Give feedback.
the roles of a
ParticipantContext
are an internal concept of IdentityHub that is not exposed to external clients, and that is to be used only for authn/authz, and not for policy evaluation.For policy eval, only claims of a VC can be used. If a "role" is a first-level concept in your data space, then you will have to issue VerifiableCredentials that contain role information in their
credentialSubject
.