{"id":29735932,"url":"https://github.com/bug3/aws-saml-cli","last_synced_at":"2026-05-15T12:32:31.352Z","repository":{"id":305180911,"uuid":"1022056561","full_name":"bug3/aws-saml-cli","owner":"bug3","description":"A CLI tool to fetch AWS credentials using SAML authentication","archived":false,"fork":false,"pushed_at":"2025-07-18T15:32:31.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-18T19:52:29.818Z","etag":null,"topics":["authentication","automation","aws","cli","credentials","identity-provider","saml","sts"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bug3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T11:32:16.000Z","updated_at":"2025-07-18T15:32:34.000Z","dependencies_parsed_at":"2025-07-18T19:52:31.752Z","dependency_job_id":"3940e177-7737-4392-bab0-507e4da02835","html_url":"https://github.com/bug3/aws-saml-cli","commit_stats":null,"previous_names":["bug3/aws-saml-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bug3/aws-saml-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug3%2Faws-saml-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug3%2Faws-saml-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug3%2Faws-saml-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug3%2Faws-saml-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bug3","download_url":"https://codeload.github.com/bug3/aws-saml-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug3%2Faws-saml-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267015579,"owners_count":24021570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","automation","aws","cli","credentials","identity-provider","saml","sts"],"created_at":"2025-07-25T14:01:21.615Z","updated_at":"2026-05-15T12:32:26.329Z","avatar_url":"https://github.com/bug3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-saml-cli \u0026middot; [![npm version](https://img.shields.io/npm/v/aws-saml-cli.svg)](https://www.npmjs.com/package/aws-saml-cli) [![CLI tool](https://img.shields.io/badge/type-cli-blue)](https://www.npmjs.com/package/aws-saml-cli) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bug3/aws-saml-cli/blob/master/LICENSE)\n\nCLI tool for SAML-based AWS authentication via your Identity Provider (IdP).  \nSecurely saves your login session, captures the SAML response, parses the assertion, and assumes your AWS role with STS.\n\n## Features\n\n- Interactive login via browser\n- Saves session state encrypted with [uniquenv](https://github.com/bug3/uniquenv)\n- Intercepts SAML response and extracts role information\n- Assumes AWS role and writes credentials to `~/.aws/credentials`\n- Optional AWS region override via `--region`\n\n---\n\n## Installation\n\n```bash\nnpm install -g aws-saml-cli\n```\n\n\u003e Installs the CLI globally as the `aws-saml-cli` command.\n\n---\n\n## Usage\n\n### Save SAML session\n\n```bash\naws-saml-cli save-session \"\u003csaml-login-url\u003e\"\n```\n\n- Opens a browser to the given SAML login URL\n- Login manually and press F8 or the Resume button in the browser\n- Encrypted session is saved to `~/.aws-saml-cli/session.uniquenv`\n\n---\n\n### Capture SAML and assume AWS role\n\n```bash\naws-saml-cli capture [--region \u003caws-region\u003e]\n```\n\n- Loads the encrypted session\n- Navigates to the previously stored login URL\n- Intercepts the SAML `POST` request\n- Parses the `SAMLResponse`, extracts the role and principal ARNs\n- Sends `AssumeRoleWithSAML` to STS\n- Writes credentials to `~/.aws/credentials` under `[default]`\n\n---\n\n## Configuration\n\n- Region can be provided via `--region`, otherwise resolved via:\n  - `AWS_REGION` or `AWS_DEFAULT_REGION` environment variable\n  - `~/.aws/config` profile\n\n---\n\n## Example Workflow\n\n```bash\naws-saml-cli save-session \"https://your-idp.example.com/sso/initiate\"\n```\n\n```bash\naws-saml-cli capture\n```\n\n```bash\naws sts get-caller-identity\n```\n\n---\n\n## Session File\n\nSession is stored at:\n\n```\n~/.aws-saml-cli/session.uniquenv\n```\n\nEncrypted using your device-specific key with [uniquenv](https://github.com/bug3/uniquenv). Cannot be decrypted on other machines.\n\n---\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbug3%2Faws-saml-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbug3%2Faws-saml-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbug3%2Faws-saml-cli/lists"}