-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Correct group inline policy rendering #3069
Correct group inline policy rendering #3069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @limitusus, thanks for the PR!
Can you add the test case to Moto as well? I'm a little surprised that the the build seems to be passing - I guess we don't have test coverage for this specified field yet
@bblommers Sure I'll try that |
@bblommers NOTE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks again, @limitusus!
GetAccountAuthorizationDetails returns an invalid response in group inline policies.
PolicyDocument
should be an IAM policy document JSON, however the current implementation returns a Python dict expression.Similar implementation can be found just below the code, in role inline policies, which seems correct.
https://github.com/spulec/moto/blob/cb600377b48ca676fc6a29a6690aeb51e702da43/moto/iam/responses.py#L2123
This PR fixes group inline policy rendering just like role inline policy.
How to ensure issue
The small code below is a PoC with a group and a policy.
Backend data are correct: you can see a normal JSON.
Output