Category
Other
Describe the feature you'd like to request
It would be helpful and less error prone for building policies on demand if there were native Java PolicyBuilder classes. For example:
Policy conditionalPolicy = PolicyBuilder.builder()
.effect(Effect.PERMIT)
.principal(Principal.parse("User::\"bob\""))
.action(Action.parse("Action::\"write\""))
.resource(Resource.parse("File::\"report.pdf\""))
.condition(Condition.when(
Expression.parse("principal.department == \"engineering\"")
))
.build();
Describe alternatives you've considered
Today when I need to build Cedar policies on demand I either need to use string manipulation or create JSON objects that follow a specific format.
Additional context
Similar policy builder type classes for other policy languages: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/feature-iam-policy-builder.html
Is this something that you'd be interested in working on?
Category
Other
Describe the feature you'd like to request
It would be helpful and less error prone for building policies on demand if there were native Java PolicyBuilder classes. For example:
Describe alternatives you've considered
Today when I need to build Cedar policies on demand I either need to use string manipulation or create JSON objects that follow a specific format.
Additional context
Similar policy builder type classes for other policy languages: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/feature-iam-policy-builder.html
Is this something that you'd be interested in working on?