Skip to main content

Google Amazon Wrapper Single sign on

Or just gaws it's a wrapper that allows you to run aws commands.

Either aws cli scripts or any aws sdk along a collection of multiple accounts.

This is really usefull when you're something like a hosting provider and have servers along different accounts.

By using this you won't need to authenticate by your self multiple times as it will do it automatically for you.

It's important that your accounts are onboared in the Google Single Sign On service.

Important Data

You will need to know Google's assigned Identity Provider ID, and the ID that they assign to the SAML service provider.

Once you've set up the SAML SSO relationship between Google and AWS, you can find the SP ID by drilling into the Google Apps console, under Apps > SAML Apps > Settings for AWS SSO -- the URL will include a component that looks like ...#AppDetails:service=123456789012... -- that number is GOOGLE_SP_ID

You can find the GOOGLE_IDP_ID, again from the admin console, via Security > Set up single sign-on (SSO) -- the SSO URL includes a string like https://accounts.google.com/o/saml2/idp?idpid=aBcD01AbC where the last bit (after the =) is the GOOGLE_IDP_ID.

This project uses https://github.com/cevoaustralia/aws-google-auth under the hood.


HOW TO INSTALL IT?

First of all, make sure to have AWS CLI installed:

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

After it, make sure to dedicate a virtualenv only for GAWS so it won't mess up with whatever you have on your system.

Create a virtualenv for python3.6 onwards, we tried with 3.9 and it worked like a charm:

virtualenv --python /usr/bin/python3.9 ~/.virtualenvs/gaws

source ~/.virtualenvs/gaws/bin/activate

python -m pip install GAWS

Now, add symbolic link somewhere in your path gaws command, for example:

ln -s ~/.virtualenvs/gaws/bin/gaws ~/.local/bin/gaws


How to use it?

It's easy as fuck, just navigate into the example folder, copy the gaws.ini file into the folder of your project.

If you can, you can grab the inventory_instances.py to test it as an example if you want too.

Then, all you have to do, is go to that folder in your terminal and edit gaws.ini and fill it according your needs.

For example:

cd ~/Projects/MyScriptCollection

emacs gaws.ini ## or vim gaws.ini ## or.. nano gaws.ini...

Now instead of executing the script as your normally could do, prefix it with gaws, see the following:

gaws python inventory_access.py

If you run gaws for first time, it will show you a wizard to fill with default parameters, that are going yo be stored on ~/.gaws/config.ini

And that's it, it will crawl the ini file and execute inventory_access.py against each one of the accounts.

Metadata

Release files for GAWS 0.10.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GAWS 0.10.3
File Size Uploaded Provenance Actions
GAWS-0.10.3.tar.gz 10.3 kB Without provenance Details for GAWS-0.10.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GAWS 0.10.3
File Interpreter ABI Platform Actions
GAWS-0.10.3-py3-none-any.whl Python 3 none any Details for GAWS-0.10.3-py3-none-any.whl

Total release size: 20.1 kB

Release files / GAWS-0.10.3.tar.gz

Download URL GAWS-0.10.3.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
98fa2b4d3ad31a2e6f1430ad7d7bf3dd01ea5eef3708717052b4bb0b648e6440
BLAKE2b-256 checksum
How to use checksums
b7ff4501edffdaa67d00cd8f3f80d94cd1c7199fbe55bc120749315e705c2084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / GAWS-0.10.3-py3-none-any.whl

Download URL GAWS-0.10.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fd795b2c88260df5d42dd1dffd04eb924177e4cb3b16599e109ead9401ad871
BLAKE2b-256 checksum
How to use checksums
e5fd7a58051ab0f2d5dafdacba72240f17c5fefe275e32d100da53c5cb079364
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for GAWS 0.10.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page