assume

saml-to assume

The assume command is the primary command that can be used to open a Web Browser to start the SAML authentication process for role assumption

If no arguments are provided, it will prompt for available roles to assume.

The list-roles command will also show available Service Providers for login.

Examples:

  • saml-to assume

    • Interactively display and allow selection of a Service Provider and roles for which to assume.

    • Then opens a browser window and begins the SAML authentication process.

  • saml-to assume arn:aws:iam::874599868815:role/iam-readonly

    • Opens a browser window and begins the SAML authentication process.

    • No interactive prompts and requires an exact match of a provider name.

Suffix Matching

As an added convenience, the suffix of a role can be provided instead of the full role name, if it is distinct.

For example:

List Roles:

➜  ~ saml-to list-roles
npx: installed 1 in 3.244s
┌─────────┬───────────────────────────────────────────────┬───────────┬───────────────────────┐
│ (index) │                     role                      │ provider  │          org          │
├─────────┼───────────────────────────────────────────────┼───────────┼───────────────────────┤
│    0    │    'arn:aws:iam::874599868815:role/admin'     │ 'aws-iam' │ 'stark-international' │
│    1    │ 'arn:aws:iam::874599868815:role/iam-readonly' │ 'aws-iam' │ 'stark-international' │
└─────────┴───────────────────────────────────────────────┴───────────┴───────────────────────┘

These commands are all functionally equivalent:

Headless

For some providers that have a SDK that allows for Token Generation on the command line, the saml-to cli is also featured to output access credentials to the command line for headless interaction.

The following providers support Headless mode:

To see the specific interaction with Headless mode, click the links in the aforementioned list.

Usage

Options

--org

In the event you're a member of multiple organizations, with providers of the same name, you can seed the command with a specific organization with this flag.

E.g. npx saml-to login aws --org stark-international

--headless

No prompts, and output vary based on the provider. See Headless above.

Example Output

Following these commands, a browser window would be opened to begin the SAML Authentication flow.

Last updated