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

auth/aws: Fix panics when malformed ARNs are passed in #3280

Merged
merged 1 commit into from
Sep 4, 2017

Conversation

joelthompson
Copy link
Contributor

The parseIamArn method was making assumptions about the input arn being
properly formatted and of a certain type. If users tried to pass a
bound_iam_principal_arn that was malformed (or was the ARN of the root
user), it would cause a panic. parseIamArn now explicitly checks the
assumptions it's making and tests are added to ensure it properly errors
out (rather than panic'ing) on malformed input.

#3179 first reported the panic on the root ARN being passed in. #3181 fixed the
panic, but when it was reverted in #3212 it reintroduced the issue of Vault
panic'ing when the root arn was passed in. Vault should fail gracefully in these
scenarios :)

The parseIamArn method was making assumptions about the input arn being
properly formatted and of a certain type. If users tried to pass a
bound_iam_principal_arn that was malformed (or was the ARN of the root
user), it would cause a panic. parseIamArn now explicitly checks the
assumptions it's making and tests are added to ensure it properly errors
out (rather than panic'ing) on malformed input.
@jefferai jefferai added this to the 0.8.2 milestone Sep 4, 2017
@jefferai
Copy link
Member

jefferai commented Sep 4, 2017

Good catch!

@jefferai jefferai merged commit 7f75dbc into hashicorp:master Sep 4, 2017
@joelthompson joelthompson deleted the handle_malformed_arns branch September 4, 2017 01:10
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.

2 participants