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

Latest commit

 

History

History
38 lines (22 loc) · 1.24 KB

README.md

File metadata and controls

38 lines (22 loc) · 1.24 KB

AWS CLI keys with ADFS credentials

WhuT!?

This script will authenticate with your adfs and get a temporary pair of keys to use with aws cli under the saml profile.

If you have more than one role available the script will present a list of roles to choose from.

After selecting a role the script will save the keys under the saml profile and you can use them as simple as

aws --profile saml s3 ls

Run it with a simple

python saml.py

Enjoy!

How-to "install" :D

Install the requirements pip install -r requirements.txt

Edit the saml.py file variables:

  • fqdn = domain of your adfs
  • awscredentialsfile and awsconfigfile = paths to these files, usually on the .aws folder under your home folder

Notes

Python 3.5 is required (actually developed and tested on it only).

Totally based on the script from Quint Van Deman

Changes were made to

  • use python3 to get rid of unicode annoyances
  • use separate config and credentials files as aws cli does by default
  • report cleanly a failed authentication