-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3d1ae46
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# OneLogin Auth CLI Tool | ||
|
||
## Usage | ||
|
||
### List all profiles: | ||
```bash | ||
onelogin-auth list | ||
``` | ||
|
||
### Configuration | ||
|
||
The onelogin auth CLI expects a file config.yaml: | ||
|
||
```yaml | ||
onelogin: | ||
clientID: clientID of API credential with "Authentication only" | ||
clientSecret: client Secret of API credential | ||
accountName: onelogin account name | ||
accounts: | ||
- name: myapp-prod | ||
appID: onelogin app id (e.g. 123456) | ||
accountID: AWS account ID | ||
profileName: AWS IAM profile to store credentials in (in ~/.aws/credentials) | ||
roles: | ||
- iam-role-1 # role that is configured in onelogin and IAM to use with the onelogin identity provider | ||
- iam-role-2 | ||
defaultRegion: us-east-1 | ||
``` | ||
### Login | ||
``` | ||
onelogin-auth login | ||
``` | ||
|
||
You can also list the roles and accounts | ||
|
||
Example: | ||
``` | ||
$ onelogin-auth list | ||
Roles: | ||
[0] admin | ||
[1] readonly | ||
Accounts: | ||
[0] myapp-prod | ||
$ onelogin-auth login 1 0 | ||
``` | ||
This example will make you login into the `myapp-prod` account with the `readonly` role. |