ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
222 stars 38 forks source link

Use gsts without browser #76

Closed dcardellino closed 1 year ago

dcardellino commented 1 year ago

Hey there,

Hopefully just a simple question. Is it possible to use gsts on Ubuntu Server (no Desktop Environment). I work on a vm in a datacenter and have no browser.

ruimarinho commented 1 year ago

Well... in theory, you could copy over ssh the equivalent of ~/Library/Application Support/gsts/chromium in Linux and then have it run under headless mode using that persistent state storage.

You'd have to make sure that state directory is created using very similar (if not exactly the same) conditions, otherwise profile data won't load (e.g. Chromium version, OS type, etc).

As long as storage is kept "fresh", headless should keep working - that is, unless you have some organization policy requiring a login after a certain amount of time, independently of the user activity.

I don't see any other way without exposing your credentials in clear text on some remote server and removing 2FA altogether (which I obviously can't recommend).