Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verified Permissions L2 Constructs #528

Closed
1 of 11 tasks
reste85 opened this issue Aug 10, 2023 · 5 comments
Closed
1 of 11 tasks

Verified Permissions L2 Constructs #528

reste85 opened this issue Aug 10, 2023 · 5 comments

Comments

@reste85
Copy link

reste85 commented Aug 10, 2023

Description

Create L2 Constructs for Amazon Verified Permissions. Amazon Verified Permissions is a scalable permissions management and fine-grained authorization service for the applications that you build. Using Cedar, an expressive and analyzable open-source policy language, developers and admins can define policy-based access controls using roles and attributes for more granular, context-aware access control.

This proposal will cover only the constructs related to Amazon Verified Permissions, not Cedar (as i see in the issues list, this will be covered in a different RFC). All the properties / fields that will contain Cedar resources (schemas or policies) will be treated as simple strings.

Constructs will be created for:

  • PolicyStore
  • Policy
  • PolicyTemplate
  • IdentitySource

Main idea of implementation:

  • Exposing proper Enum for PolicyStore property ValidationSettings.Mode
  • Throwing error in case ValidationSettings.Mode is set to STRICT and PolicyStore schema is not defined
  • A set of methods will be created on PolicyStore to grant read/write/authorization api access to a specific iam.IGrantable
  • (To be verified) A set of methods will be created on PolicyStore to add directly to the store the following resources:
  1. Policies
  2. PolicyTemplates
  3. IdentitySource

Aiming to build L2 constructs with some convenience methods/properties

Roles

Role User
Proposed by @reste85
Author(s) @reste85
API Bar Raiser @alias
Stakeholders @alias, @alias, @alias

See RFC Process for details

Workflow

  • Tracking issue created (label: status/proposed)
  • API bar raiser assigned (ping us at #aws-cdk-rfcs if needed)
  • Kick off meeting
  • RFC pull request submitted (label: status/review)
  • Community reach out (via Slack and/or Twitter)
  • API signed-off (label api-approved applied to pull request)
  • Final comments period (label: status/final-comments-period)
  • Approved and merged (label: status/approved)
  • Execution plan submitted (label: status/planning)
  • Plan approved and merged (label: status/implementing)
  • Implementation complete (label: status/done)

Author is responsible to progress the RFC according to this checklist, and
apply the relevant labels to this issue so that the RFC table in README gets
updated.

@evgenyka evgenyka added l2-request request for new L2 construct bar-raiser/needed labels Aug 10, 2023
@mrpackethead
Copy link
Contributor

This is an important and useful thing to add to CDK. Related to #523 and somewhat less related to #521

Of interest is that there is now a JSON representation of CEDAR, which will make creating the policy significantly easier and less error prone that the text format.. https://github.com/cedar-policy/cedar-docs/blob/main/docs/json-format.md. However as yet, it is not possible to pass the Json object to the api/ cfn L1, as it only takes the string format. There is rust based code ( cedar is Rust centric ), that does the conversion, which could be the basis for creating some ts code.
In any case, a construct should be future proofed to accomodate for the the possiblity that either a string or json may be passed on, so that non breaking changes can be made.

Apart from this the problem for this construct are not particuarly complex compared to some constructs that are in CDK, provided the construct sticks to just AVP, and does'nt attempt to provide opionated L3 'solutions'.

This would be a good project for someone familar with CDK, but not having built a construct set themselves, and an ideal candidate to be community mentored to get it to 95% good stage, so that the effort required by the CDK team, can be minimized since they are overly committed and unable to take on much additional work.

I have an nearly immediate need for this, and so have already done quite a bit of work for my own construct and in this case, dont' have a need for it to be in the cdk-lib. I'd be happy to assist someone getting on with this.

@mrgrain mrgrain changed the title Verified Permissions L2 Contructs Verified Permissions L2 Constructs Oct 13, 2023
@piotrekwitkowski
Copy link

Hi @mrpackethead, can you link the rust-based tool to convert policies from json to strings here?

@reste85
Copy link
Author

reste85 commented Nov 20, 2023

This is an important and useful thing to add to CDK. Related to #523 and somewhat less related to #521

Of interest is that there is now a JSON representation of CEDAR, which will make creating the policy significantly easier and less error prone that the text format.. https://github.com/cedar-policy/cedar-docs/blob/main/docs/json-format.md. However as yet, it is not possible to pass the Json object to the api/ cfn L1, as it only takes the string format. There is rust based code ( cedar is Rust centric ), that does the conversion, which could be the basis for creating some ts code. In any case, a construct should be future proofed to accomodate for the the possiblity that either a string or json may be passed on, so that non breaking changes can be made.

Apart from this the problem for this construct are not particuarly complex compared to some constructs that are in CDK, provided the construct sticks to just AVP, and does'nt attempt to provide opionated L3 'solutions'.

This would be a good project for someone familar with CDK, but not having built a construct set themselves, and an ideal candidate to be community mentored to get it to 95% good stage, so that the effort required by the CDK team, can be minimized since they are overly committed and unable to take on much additional work.

I have an nearly immediate need for this, and so have already done quite a bit of work for my own construct and in this case, dont' have a need for it to be in the cdk-lib. I'd be happy to assist someone getting on with this.

Hello @mrpackethead, since the submission process is currently stopped i think we'll release it in ConstructHub first. Stay tuned, i'll let you know

@awsmjs
Copy link
Contributor

awsmjs commented Dec 14, 2023

Closing this ticket. We believe the functionality is beneficial, but does not intersect with the core framework and should be vended and maintained separately.

@awsmjs awsmjs closed this as completed Dec 14, 2023
@mrgrain mrgrain added status/rejected and removed status/proposed Newly proposed RFC labels Dec 19, 2023
@reste85
Copy link
Author

reste85 commented Feb 28, 2024

FYI:
We released the constructs in ConstructHub --> https://constructs.dev/packages/@cdklabs/cdk-verified-permissions/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants