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

Fix for Issue 57 #185

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws_adfs/_duo_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_headers = {
'Accept-Language': 'en',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) Gecko/20100101 Firefox/60.0',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept': 'text/plain, */*; q=0.01',
}
Expand Down
2 changes: 1 addition & 1 deletion aws_adfs/account_aliases_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def account_aliases(session, username, password, auth_method, saml_response, con
verify=config.ssl_verification,
headers={
'Accept-Language': 'en',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) Gecko/20100101 Firefox/60.0',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept': 'text/plain, */*; q=0.01',
},
Expand Down
2 changes: 1 addition & 1 deletion aws_adfs/html_roles_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def fetch_html_encoded_roles(
# also requires tricking the server into thinking we're using IEq
# so that it servers up a redirect to the IWA page.
if sspi:
_headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko'
_headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64) Gecko/20100101 Firefox/60.0'

# Initiate session handler
session = requests.Session()
Expand Down
3 changes: 1 addition & 2 deletions aws_adfs/role_chooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ def choose_role_to_assume(config, principal_roles):
i = 0
for account_name in principal_roles.keys():
roles = principal_roles[account_name]
click.echo('{}:'.format(account_name))
for role_arn in roles.keys():
role_entry = roles[role_arn]
click.echo(' [ {} -> {} ]: {}'.format(role_entry['name'].ljust(30, ' ' if i % 2 == 0 else '.'), i, role_arn))
click.echo(' [{}] : {} / {} '.format(i, account_name, role_entry['name']))
i += 1

selected_index = click.prompt(text='Selection', type=click.IntRange(0, len(role_collection)))
Expand Down