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

Policy JSON generates PassRole With Star in Resource warning #6

Open
blcooley opened this issue Nov 10, 2023 · 1 comment
Open

Policy JSON generates PassRole With Star in Resource warning #6

blcooley opened this issue Nov 10, 2023 · 1 comment
Assignees

Comments

@blcooley
Copy link

For the policy JSON given under the Sagemaker instructions in the setup, the AWS console generates the an error with respect to the following section from lines 24-36:

		{
			"Sid": "IAM1",
			"Effect": "Allow",
			"Action": [
				"iam:CreateRole",
				"iam:DeleteRole",
				"iam:PassRole",
				"iam:AttachRolePolicy",
				"iam:DetachRolePolicy",
				"iam:CreatePolicy"
			],
			"Resource": "*"
		},

The error reads:
PassRole With Star In Resource: Using the iam:PassRole action with wildcards (*) in the resource can be overly permissive because it allows iam:PassRole permissions on multiple resources. We recommend that you specify resource ARNs or add the iam:PassedToService condition key to your statement.

I found this to be confusing, even though I ignored the warning and continued. Is it necessary to specify a wildcard for resource in this section? If so, does adding the iam:PassedToService condition key solve the problem? To be honest, I'm not sure what that means or how to do it right now.

@svpino svpino self-assigned this Nov 14, 2023
@svpino
Copy link
Owner

svpino commented Nov 14, 2023

Hey @blcooley, yeah, this policy is over-permissive, but I ignore the warning because it's just for the cohort.

I have a note on my list to check this and improve it. I'll have to research to ensure I can tie down the policy. Thanks for reporting it!

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

No branches or pull requests

2 participants