{"id":21878309,"url":"https://github.com/pepabo/oneaws","last_synced_at":"2025-04-15T03:04:32.866Z","repository":{"id":56886714,"uuid":"241583620","full_name":"pepabo/oneaws","owner":"pepabo","description":"AWS STS using OneLogin","archived":false,"fork":false,"pushed_at":"2023-11-24T07:40:43.000Z","size":36,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-25T04:20:46.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/pepabo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2020-02-19T09:38:11.000Z","updated_at":"2024-01-12T05:55:57.000Z","dependencies_parsed_at":"2023-11-24T02:40:45.330Z","dependency_job_id":"47178b54-f7e6-48ed-9232-b138b59bb368","html_url":"https://github.com/pepabo/oneaws","commit_stats":{"total_commits":21,"total_committers":6,"mean_commits":3.5,"dds":0.5714285714285714,"last_synced_commit":"7beeb68874b3f04b11b1ec4185ee295f6d08648d"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Foneaws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Foneaws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Foneaws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Foneaws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepabo","download_url":"https://codeload.github.com/pepabo/oneaws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997083,"owners_count":21195798,"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","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":[],"created_at":"2024-11-28T08:12:16.763Z","updated_at":"2025-04-15T03:04:32.861Z","avatar_url":"https://github.com/pepabo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oneaws\n\nOneLoginとAWS STSを使って、一時的なセキュリティ情報を取得します。\n\n## Usage\n\n事前に環境変数を設定します。\n\n```\n# bash\nexport ONELOGIN_CLIENT_ID=\u003cyour onelogin client id\u003e\nexport ONELOGIN_CLIENT_SECRET=\u003cyour onelogin client secret\u003e\nexport ONELOGIN_USERNAME=\u003cyour onelogin username\u003e\nexport ONELOGIN_PASSWORD=\u003cyour onelogin password\u003e\nexport ONELOGIN_APP_ID=\u003cyour onelogin app_id\u003e\nexport ONELOGIN_SUBDOMAIN=\u003cyour onelogin subdomain\u003e\nexport AWS_ROLE_ARN=\u003cyour aws role arn\u003e\nexport AWS_PRINCIPAL_ARN=\u003cyour aws idp arn\u003e\nexport DURATION_SECONDS=\u003ctoken duration(sec)\u003e # Option: default 3600\n\n# fish\nset -x ONELOGIN_CLIENT_ID \u003cyour onelogin client id\u003e\nset -x ONELOGIN_CLIENT_SECRET \u003cyour onelogin client secret\u003e\nset -x ONELOGIN_USERNAME \u003cyour onelogin username\u003e\nset -x ONELOGIN_PASSWORD \u003cyour onelogin password\u003e\nset -x ONELOGIN_APP_ID \u003cyour onelogin app_id\u003e\nset -x ONELOGIN_SUBDOMAIN \u003cyour onelogin subdomain\u003e\nset -x AWS_ROLE_ARN \u003cyour aws role arn\u003e\nset -x AWS_PRINCIPAL_ARN \u003cyour aws idp arn\u003e\nset -x DURATION_SECONDS \u003ctoken duration(sec)\u003e # Option: default 3600\n```\n\n環境変数を設定したら実行します。\n\n```\noneaws\n```\n\n`-u` オプションをつけていると `~/.aws/credentials` に追記されます(default: true)。\n\n### ONEAWS_MFA_DEVICE\n\nMFA デバイスを複数登録している場合、以下のようにデバイスの選択を求められます。\n\n```\nAvailable MFA devices:\n1. OneLogin Protect (ID: ***)\n2. OneLogin Auth (ID: ***)\n\nSelect MFA device (1-2):\n```\n\nデバイスの選択が面倒な場合は、環境変数 `ONEAWS_MFA_DEVICE` を指定することで、指定した番号のデバイスを自動で選択できます。上記を例にすると、`1. OneLogin Protect` を選ぶ場合は `ONEAWS_MFA_DEVICE=1` と指定します。\n\nワンタイムパスワードが必要なデバイスを選択した場合、 `--otp` オプションでワンタイムパスワードを指定することができます。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Foneaws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepabo%2Foneaws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Foneaws/lists"}