3.0.1 • Published 1 year ago

saml-to v3.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

SAML.to Command Line Interface

GitHub release (latest by date) GitHub issues GitHub Workflow Status

Introduction

This is the CLI for SAML.to. It allows for command-line AWS role assumption.

saml-to [command]

Commands:
  saml-to list-roles        Show roles that are available to assume
  saml-to login [provider]  Login to a provider
  saml-to assume [role]     Assume a role

Options:
  --help     Show help  [boolean]
  --version  Show version number  [boolean]

Installation

Please make sure the following is installed:

  • NodeJS v16+
  • npm or yarn or npx avaliable on the $PATH
  • (MacOS Alternative) Homebrew available on the $PATH

Using npm or yarn or npx

npm:

npm install -g saml-to
saml-to assume

yarn:

yarn global add saml-to
saml-to assume

npx:

npx saml-to assume

Using Homebrew (MacOS)

brew tap saml-to/tap
brew install saml-to
saml-to assume

Getting Started

Once the CLI is installed, run the following commands to login and assume roles:

# Saves a GitHub token with a user:email scope to ~/.saml-to/github-token.json
saml-to login github
# List available roles to assume
saml-to list-roles

If no logins or roles are available, an administrator for an AWS account should complete the initial setup.

Add the --help flag to any command for available options.

Assuming Roles

Interactive prompt for roles to assume:

saml-to assume

Or, if the full role name is known:

saml-to assume arn:aws:iam::123456789012:role/some-role

Alternatively, use the shorthand:

# Any distinct part of the role names in from saml-to list-roles will match
saml-to assume some-role # match by the role name
saml-to assume 123456789012 # match by the account ID

Check out the documentation for assume.

Setting Environment Variables

The --headless flag will output an expression to update your shell environment with a role.

bash, zsh, etc...

Use a subshell ($(...)) to set AWS_* related environment variables:

$(saml-to assume some-role --headless)
aws s3api list-buckets # or any desired `aws` command

Powershell

Use Invoke-Expression (iex) to set AWS_* related environment variables:

iex (saml-to assume some-role --headless)
aws s3api list-buckets # or any desired `aws` command

Initial Setup

Visit SAML.to Install to get started by connecting a GitHub User or Organization to an AWS Account.

Reporting Issues

Please Open a New Issue in GitHub if an issue is found with this tool.

Maintainers

Usage Metrics Opt-Out

If you do not want to be included in Anonymous Usage Metrics, ensure an environment variable named SAML_TO_DNT is set:

SAML_TO_DNT=1 npx saml-to

License

Apache-2.0 License

3.0.1

1 year ago

3.0.0

1 year ago

2.2.0

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.0.4

2 years ago

2.1.0

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

1.0.39

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago