https://github.com/nizanrosh/okta-aws-cli
A dotnet open source which provides aws credentials using Okta
https://github.com/nizanrosh/okta-aws-cli
assume-role aws aws-cli cli okta sts
Last synced: 24 days ago
JSON representation
A dotnet open source which provides aws credentials using Okta
- Host: GitHub
- URL: https://github.com/nizanrosh/okta-aws-cli
- Owner: nizanrosh
- License: mit
- Created: 2022-02-05T16:59:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T11:23:32.000Z (over 1 year ago)
- Last Synced: 2024-08-29T12:42:32.142Z (over 1 year ago)
- Topics: assume-role, aws, aws-cli, cli, okta, sts
- Language: C#
- Homepage:
- Size: 2.55 MB
- Stars: 27
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# okta-aws-cli
[](https://github.com/nizanrosh/okta-aws-cli/actions/workflows/build.yml)
[](https://github.com/nizanrosh/okta-aws-cli/blob/main/LICENSE)
A dotnet open source which provides aws credentials using Okta
## :sunny: .NET Runtime
This project is built with DotNet 6.0 and is mandatory to install before using.
You can find and install it [here](https://dotnet.microsoft.com/en-us/download/dotnet/6.0).
Verify your dotnet version:

## :gift: Installation
The Installer publishes the code to the app directory and adds it to your system's path.
The installer can be found at the root folder under its own directory.
- ### Windows
- Run Installer.exe
- ### Linux (Ubuntu, etc) / macOS
- It will be easier to run the installer correctly with the following command, while in its directory:
```
dotnet Installer.dll
```
Open terminal / cmd and run:
```
oacli --version
```
If everything ran smoothly, you should see the following:

## :tada: Usage
```cmd
oacli
```
- `run` will run the cli app, follow the prompts accordingly.
- `configure` provides the option to configure your user settings in order to avoid prompting each time you run the cli.
You can skip configurations you wish to keep emtpy, I.E. - aws region.
The cli will prompt for mandatory parameters in case they are not in your user settings.
- `--version` will display the current version of the app.
- `whoami` will display the current configured user.
FYI - The CLI can be executed using the commands `oacli` or `okta-aws-cli`.
## :clipboard: User Settings
The user settings file can be found at the users home directory.
- Windows: `C:\Users\\.okta-aws-cli\usersettings.json`
- Linux (Ubuntu, etc) / macOS: `~/.okta-aws-cli/usersettings.json`
You can use `okta-aws-cli configure` to configure the user settings file or alternatively, fill it manually.
UserSettings example:
```json
{
"UserSettings": {
"OktaDomain": "YOUR_OKTA_DOMAIN", //https://ORGANIZATION.okta.com
"Username": "YOUR_OKTA_USER_NAME", //nizanrosh@github.com
"Password": "YOUR_PASSWORD",
"AppUrl": "YOUR_APP_URL", //If specified, extraction of the AppUrl will be skipped.
"MfaType": "YOUR_OKTA_MFA_TYPE",
"ProfileName": "YOUR_AWS_PROFILE_NAME", //The profile name you want your aws credentials to be under.
"Region": "YOUR_AWS_REGION"
}
}
```
## :books: Examples
### `run`

### `configure`

## License
This project is licensed under the [MIT License](https://github.com/nizanrosh/okta-aws-cli/blob/main/LICENSE).