generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
feature-requestRequest for a new featureRequest for a new featurepending-triageHasn't been triaged yetHasn't been triaged yet
Description
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?
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
Metadata
Metadata
Assignees
Labels
feature-requestRequest for a new featureRequest for a new featurepending-triageHasn't been triaged yetHasn't been triaged yet