Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Add an option to override/customize clean_iam_username function #80

Open
hmeltaus opened this issue Aug 21, 2017 · 4 comments
Open

Add an option to override/customize clean_iam_username function #80

hmeltaus opened this issue Aug 21, 2017 · 4 comments

Comments

@hmeltaus
Copy link

We use email addresses as IAM usernames, but these can easily be longer than 32 chars. The current implementation of clean_iam_username makes them even longer.

It would be great if we could provide our custom function that would be invoked instead of clean_iam_username.

The custom function could be provided in /etc/aws-ec2-ssh.conf file, or maybe in some separate file.

@michaelwittig
Copy link
Contributor

Hi @hmeltaus
How would your custom implementation look like? E.g. we could also handle the case of email addresses and remove everything after the @ ?

@hmeltaus
Copy link
Author

Removing everything after the @ would certainly work in most cases.

I guess you'd need to introduce a new option in configuration file which would enable this feature. Maybe that same option could be later used to tell that a custom function should be used to process IAM usernames if the default cleaning or email domain stripping isn't enough.

Anyway, having an option to remove everything after @ is just what we need at the moment.

@michaelwittig
Copy link
Contributor

might related #126

@davehewy
Copy link

davehewy commented Aug 9, 2018

+1 for this. anyone done anything with it? be good to have an option to drop everything from/inc @->

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

No branches or pull requests

3 participants