# azure-aws-creds

> Electron app to update AWS credentials via Azure AD federation

Latest version **0.5.2** (published 2018-03-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install azure-aws-creds
pnpm add azure-aws-creds
yarn add azure-aws-creds
bun add azure-aws-creds
```

Provides the command `azure-aws-creds`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2018-03-28 |
| First published | 2018-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 220.3 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mark Olson |
| Maintainers | mr-olson |
| Keywords | Azure Active Directory, AWS, SAML, SSO, CLI, credentials |

## Links

- npm: https://www.npmjs.com/package/azure-aws-creds
- Repository: https://github.com/mr-olson/azure-aws-creds
- Issues: https://github.com/mr-olson/azure-aws-creds/issues
- npm.io page: https://npm.io/package/azure-aws-creds

## Dependencies (14)

- [ini](https://npm.io/package/ini.md) ^1.3.5
- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [jquery](https://npm.io/package/jquery.md) ^3.3.1
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.215.1
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [bootstrap](https://npm.io/package/bootstrap.md) ^4.0.0
- [popper.js](https://npm.io/package/popper.js.md) ^1.14.1
- [jwt-decode](https://npm.io/package/jwt-decode.md) ^2.2.0
- [datatables.net](https://npm.io/package/datatables.net.md) ^1.10.16
- [jquery-countdown](https://npm.io/package/jquery-countdown.md) ^2.2.0
- [datatables.net-dt](https://npm.io/package/datatables.net-dt.md) ^1.10.16
- [datatables.net-bs4](https://npm.io/package/datatables.net-bs4.md) ^1.10.16
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.4

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2018-03-28
- 0.5.1 — 2018-02-25

## README

# Introduction
This tool uses an [Electron](https://electronjs.org) window to kick off and shadow the [Azure Active Directory](https://azure.microsoft.com) login process for an AWS federation, extract the SAML token on success, use it to authenticate to the [AWS Security Token Service](https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html), and populate the AWS credentials file with the returned session credentials.

Once successfully logged in and a role is chosen, the tool will minimize to the system tray and wake up with 5 minutes remaining in the session token to prompt for a refresh. Multiple sessions can be active at the same time, and the primary Azure AD credentials remain active until the timeout configured by the administrator, so most session token refreshes are a relatively painless matter of choosing the profile to refresh and the relevant AWS role, rather than re-entering domain credentials and MFA (if configured) each time.

Inspiration for this project was found in https://github.com/dtjohnson/aws-azure-login (and the Azure initialization and SAML token parsing code remain). This project was initiated when an Azure UI change broke the code-driven navigation. The original project added support for Chrome puppeteer UI in parallel to this project adopting a similar approach with Electron, and the original still supports GUI-less logins, so it may be better suited to some users' use cases.

# Getting Started
## Dependencies
* [AWS CLI](http://docs.aws.amazon.com/cli/latest/userguide/installing.html)
* [Node.js](https://nodejs.org/)
* Ensure that you are able to log in to your organization's AWS federation using the web interface.
* Ubuntu 17.10 requires legacy icon support to allow for minimizing to the tray, at least until this [upstream Electron issue](https://github.com/electron/electron/issues/10887) is corrected. In the meantime, the [TopIcons](https://extensions.gnome.org/extension/495/topicons/) extension is known to work for Ubuntu 17.10.

## Configuration
To [configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html), run `aws --configure` and leave the AWS Access Key ID and AWS Secret Access Key fields blank.

To work with multiple roles and/or accounts, you can add and configure profiles using this tool, or [configure multiple, named profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html) with the AWS CLI, by running `aws --configure --profile my_profile`, again leaving the credentials fields blank.

1. On startup, the tool will provide a list of existing AWS profiles. Fully configured profiles will show as 'inactive' under the Expiration column, and unconfigured profiles 'n/a'.
2. Configure your profile with the Azure Tenant ID and App ID URI (see "Getting Your Tenant ID and App ID URI" below). The default Role ARN can be left blank.
3. Save, or Save & Log In.

## Using
1. Open the tool, select a profile to log in to, and authenticate with your Azure AD credentials.
2. On successful login, you will be prompted for a role choice. If desired, save your role choice as the default for future sessions.
3. Click Assume Role.
4. The tool will minimize to the system tray and remain active, counting down the 1 hour STS session timeout.
5. Click on the system tray icon to open the tool, to log in to other profiles or refresh active profiles.
6. With 5 minutes remaining in any active session, the main window will re-open to prompt for an authentication refresh.

## Getting Your Tenant ID and App ID URI

Your Azure AD system admin should be able to provide you with your Tenant ID and App ID URI. If you can't get it from them, you can scrape it from a login page from the myapps.microsoft.com page as described below.

1. Load the [myapps.microsoft.com](https://myapps.microsoft.com) page.
2. Click the chicklet for the login you want.
3. In the window the pops open quickly copy the login.microsoftonline.com URL. (If you miss it just try again. You can also open the developer console with nagivation preservation to capture the URL.)
4. The GUID right after login.microsoftonline.com/ is the tenant ID.
5. Copy the SAMLRequest URL param.
6. Paste it into a URL decoder ([like this one](https://www.samltool.com/url.php)) and decode.
7. Paste the decoded output into the a SAML deflated and encoded XML decoder ([like this one](https://www.samltool.com/decode.php)).
8. In the decoded XML output the value of the Issuer tag is the App ID URI.

# Develop
1. Installation process
* Check out the source code
* Run `npm start` in the root directory

2. Build and Test
* First run `npm install` or `npm start` to install NPM packages
* To debug the entire event loop and application using Visual Studio Code, configure Python for your system and start debugging (Debug -> Start or F5).
* To debug just the application UI, you can run `npm run debug`
* To run the application UI, you can run `npm start`


3. Package
* `npm run release` will build OS-specific packages in the dist directory. Ubuntu 17.10 and Windows have been confirmed to work as expected. Cross-compiling contributions welcome!

# Contribute
Pull requests are welcome for features or fixes.

# License
MIT

---
_Source: https://npm.io/package/azure-aws-creds · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
