Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
ddriddle committed Oct 3, 2024
1 parent ea6feef commit 09b7314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/awscli_login/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ class Login(ExternalCommand):
'default': None,
'help_text': 'HTTP Header to store the user\'s Duo factor'
},
{
'name': 'sts-endpoint-url',
'no_paramfile': True,
'default': None,
'help_text': 'AWS STS endpoint URL to retrieve credentials from'
},
{
'name': 'http_header_passcode',
'default': None,
Expand Down Expand Up @@ -223,6 +229,7 @@ class Configure(BasicCommand):
* **duration** - Time in seconds credentials are valid
* **http_header_factor** - HTTP Header to store Duo factor
* **http_header_passcode** - HTTP Header to store passcode
* **sts_endpoint_url** - Set to override default AWS STS endpoint
* **verify_ssl_certificate** - Set to False to skip check of IdP SSL cert
''')
SYNOPSIS = ('aws login configure')
Expand Down
5 changes: 4 additions & 1 deletion src/awscli_login/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def save_sts_token(profile: Profile, client: Client, saml: str,

def login(profile: Profile, session: Session, interactive: bool = True):
session.set_credentials(None, None) # Disable credential lookup
client = session.create_client('sts')
client = session.create_client(
'sts',
endpoint_url=profile.sts_endpoint_url
)

# Exit if already logged in
if interactive:
Expand Down

0 comments on commit 09b7314

Please sign in to comment.