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

AWS add user_path option for role. #6380

Merged
merged 1 commit into from
Apr 23, 2019
Merged

AWS add user_path option for role. #6380

merged 1 commit into from
Apr 23, 2019

Conversation

povils
Copy link
Contributor

@povils povils commented Mar 8, 2019

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 8, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@joelthompson joelthompson left a comment

Choose a reason for hiding this comment

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

Hey @povils -- sorry for the delay here, was out of town for a few days. Mostly looking good!

I would also suggest adding some tests for this feature; I think it should be quick. Just update the existing acceptance tests to create a user in a particular path and then verify the user got created in the given path.

One small point -- there's a lot of noise in viewing the diff because it looks like your editor has made a bunch of whitespace changes to the CHANGELOG. It's much easier to review if these are kept separate, and I've also found the Vault team tends to update the CHANGELOG themselves (so, e.g., if a PR doesn't make a given release, the PR doesn't need to be updated to specify the new release).

builtin/logical/aws/path_roles.go Outdated Show resolved Hide resolved
builtin/logical/aws/path_roles.go Outdated Show resolved Hide resolved
builtin/logical/aws/secret_access_keys.go Outdated Show resolved Hide resolved
builtin/logical/aws/path_roles.go Outdated Show resolved Hide resolved
@briankassouf briankassouf added this to the 1.1.1 milestone Mar 15, 2019
@joelthompson
Copy link
Contributor

Also, I want to add my normal disclaimer so I don't give anybody the wrong impression -- I am not a HashiCorp employee and I don't have merge power for PRs, so the opinions I express here are my own personal ones and don't represent official views of HashiCorp. I try to give feedback to make Vault a better product, but agreeing with me isn't a guarantee that your PR will get merged; likewise, disagreeing with me doesn't guarantee that it won't get merged.

@povils
Copy link
Contributor Author

povils commented Mar 31, 2019

Hey @joelthompson, many thanks for your feedback!

@jefferai jefferai modified the milestones: 1.1.1, 1.1.2 Apr 10, 2019
@tyrannosaurus-becks tyrannosaurus-becks self-assigned this Apr 17, 2019
@tyrannosaurus-becks
Copy link
Contributor

@povils this PR looks great! Thanks for submitting it.

I'd be comfortable moving forward with it now if it just contained the fix for #2318 .

We could either keep the two fixes together and wait until we've reached a good place with the other one, or if you don't want to wait, they could be split into separate PRs to get the one moving forward. Up to you!

@povils
Copy link
Contributor Author

povils commented Apr 17, 2019

@tyrannosaurus-becks thank you for your input!
I did as you said and made this PR to contain the fix only for #2318 :)

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

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

Hi @povils !

I tested this today! It's looking really good. I found that if you don't provide the user_path parameter, it behaves exactly as before. However, if you do provide user_path=/foo/user/, in the AWS console you get that exact path in the AWS console, as well as a user ARN like arn:aws:iam::<redacted account number>:user/foo/user/vault-root-my-role-1555613099-2800.

I do have one last request! Regex's are notorious for being on the more error-prone and hard-to-understand side. Would you be willing to add a couple tests of the regex pattern alone that simply show a couple of strings that should be accepted by it, as well as a couple of strings that should be rejected by it? Just to make sure it's easy to grok and maintain.

@povils
Copy link
Contributor Author

povils commented Apr 22, 2019

Hey @tyrannosaurus-becks !

Thanks for testing it. I added the test you asked for :)

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

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

Thanks @povils !

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.

feature request: make AWS IAM user prefix configurable
6 participants