cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
538 stars 180 forks source link

Configuration strings #46

Closed afosterw closed 6 years ago

afosterw commented 6 years ago

Hi there, Just curious if there is a reason for not accepting unicode objects as well as strings in the configuration.py library.

mide commented 6 years ago

It's mostly because of needing to maintain support both Python 2 and Python 3. Is there something that broke for you?

afosterw commented 6 years ago

Not horribly. I'm using it as a library and was passing unicode into it. I ended up having to copy most of the cli() function anyway because I need to pull in the password from my code so I just cast the config params appropriately. It just seemed like it was possible that the username in particular might have to support unicode.

nonspecialist commented 6 years ago

This isn't a risk (at least for usernames); Google's documentation states that usernames can only be a limited set of ASCII/UTF-8 characters:

Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.).

https://support.google.com/a/answer/33386?hl=en

nonspecialist commented 6 years ago

Because we aren't saving anything else into the config file that could be a unicode string, (the IDP and SP IDs, and the AWS role ARN can't be other than UTF-8 either) so I'm going to close this.