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

Initial code release for resource AWS::SSO::PermissionSet and AWS::SSO::Assignment #4

Merged
merged 6 commits into from
Sep 24, 2020

Conversation

boweix-amz
Copy link
Contributor

Issue #, if available:

Description of changes:
Release the implementation of the CFN resource PermissionSet and Assignment.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@boweix-amz boweix-amz closed this Sep 24, 2020
@boweix-amz boweix-amz reopened this Sep 24, 2020
@boweix-amz boweix-amz closed this Sep 24, 2020
@boweix-amz boweix-amz reopened this Sep 24, 2020
@boweix-amz boweix-amz marked this pull request as ready for review September 24, 2020 22:09
Comment on lines +1 to +12
# AWS::SSO::Assignment

Congratulations on starting development! Next steps:

1. Write the JSON schema describing your resource, `aws-sso-assignment.json`
1. Implement your resource handlers.

The RPDK will automatically generate the correct resource model from the schema whenever the project is built via Maven. You can also do this manually with the following command: `cfn generate`.

> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten.

The code uses [Lombok](https://projectlombok.org/), and [you may have to install IDE integrations](https://projectlombok.org/setup/overview) to enable auto-complete for Lombok-annotated classes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, this is the generated README from cfn build process. Saw other teams also kept it that way.

"update": {
"permissions": []
},
"list": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should listAccountAssignments be here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, due to the sso instance input for our list API, we dont implement list API. Update API is due to assignment not updatable.

Comment on lines +4 to +8
public final static String TEST_SSO_INSTANCE_ARN = "arn:aws:sso:::instance/ins-1a5c249c9a03b908";
public final static String TEST_PERMISSION_SET_ARN = "arn:aws:sso:::permissionSet/ssoins-1a5c249c9a03b908/ps-d1fc7a84aead19b9";
public final static String TEST_PERMISSION_SET_ARN_2 = "arn:aws:sso:::permissionSet/ssoins-1a5c249c9a03b908/ps-d1fc7a84aead18b8";
public final static String TEST_TARGET_ID = "089648181234";
public final static String TEST_TARGET_ID_2 = "089648185678";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just want to make sure these are not real

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, these are fake

Comment on lines +1 to +12
# AWS::SSO::PermissionSet

Congratulations on starting development! Next steps:

1. Write the JSON schema describing your resource, `aws-sso-permissionset.json`
1. Implement your resource handlers.

The RPDK will automatically generate the correct resource model from the schema whenever the project is built via Maven. You can also do this manually with the following command: `cfn generate`.

> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten.

The code uses [Lombok](https://projectlombok.org/), and [you may have to install IDE integrations](https://projectlombok.org/setup/overview) to enable auto-complete for Lombok-annotated classes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing for this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same response as permissionset

@@ -0,0 +1,160 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes for assignment too but are the descriptions matching our public documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the public CFN file is generated from this json file

"sso:DeletePermissionSet"
]
},
"list": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there are some ones missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, due to the sso instance input for our list API, we dont implement list API.

@boweix-amz boweix-amz merged commit 831adce into aws-cloudformation:master Sep 24, 2020
"InstanceArn": {
"description": "The sso instance that the permission set is owned.",
"type": "string",
"pattern": "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}",
Copy link

@PatMyron PatMyron Jan 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"PermissionSetArn": {
"description": "The permission set that the assignemt will be assigned",
"type": "string",
"pattern": "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}",
Copy link

@PatMyron PatMyron Jan 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"PermissionSetArn": {
"description": "The permission set that the policy will be attached to",
"type": "string",
"pattern": "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}",
Copy link

@PatMyron PatMyron Jan 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"InstanceArn": {
"description": "The sso instance arn that the permission set is owned.",
"type": "string",
"pattern": "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}",
Copy link

@PatMyron PatMyron Jan 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

4 participants