Skip to content

Commit

Permalink
change on how aws creds is being printed
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdhasjg committed Dec 1, 2023
1 parent 022225e commit d6b76e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions aws_fusion/commands/iam_user_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ def run_get(args):
else:
command = '$env:' if sys.platform == 'win32' else 'export '

print(f'{command}AWS_ACCESS_KEY_ID="{args.access_key}"')
print(f'{command}AWS_SECRET_ACCESS_KEY="{secret_key}"')
print('\n'.join([
f'{command}AWS_ACCESS_KEY_ID="{args.access_key}"',
f'{command}AWS_SECRET_ACCESS_KEY="{secret_key}"'
]))
6 changes: 2 additions & 4 deletions aws_fusion/commands/okta.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@


def setup(subparsers, parent_parser):
common_parser = ArgumentParser(add_help=False)
common_parser.add_argument('--org-domain', required=True, help="Full domain hostname of the Okta org e.g. example.okta.com")

summary = 'Generate AWS session credentials from Okta.'
parser: ArgumentParser = subparsers.add_parser('okta', description=summary, help=summary, parents=[parent_parser])
okta_subparsers = parser.add_subparsers(dest='okta_command', required=True, help='Available Okta commands')

device_auth_summary = 'Generate AWS session credentials using SAML assertion from Okta device authentication.'
device_auth_parser = okta_subparsers.add_parser('device-auth', description=device_auth_summary, help=device_auth_summary, parents=[parent_parser, common_parser])
device_auth_parser = okta_subparsers.add_parser('device-auth', description=device_auth_summary, help=device_auth_summary, parents=[parent_parser])
device_auth_parser.set_defaults(func=run_device_auth)
device_auth_parser.add_argument('--org-domain', required=True, help="Full domain hostname of the Okta org e.g. example.okta.com")
device_auth_parser.add_argument('--oidc-client-id', required=True, help="The ID is the identifier of the client is Okta app acting as the IdP for AWS")
device_auth_parser.add_argument('--aws-acct-fed-app-id', required=True, help="The ID for the AWS Account Federation integration app")
device_auth_parser.add_argument('--aws-iam-role', required=True, help="The AWS IAM Role ARN to assume")
Expand Down

0 comments on commit d6b76e9

Please sign in to comment.