Repository navigation
docs: add authentication guide and fix install paths #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,136 @@ | ||
| # Authentication | ||
|
|
||
| The Tigris CLI supports multiple authentication methods. When more than one is configured, the CLI uses the first match in the following priority order: | ||
|
|
||
| | Priority | Method | How to set up | | ||
| |----------|--------|---------------| | ||
| | 1 | AWS Profile | `AWS_PROFILE` env var + `~/.aws/credentials` | | ||
| | 2 | Environment variables (AWS_) | `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` | | ||
| | 3 | Environment variables (TIGRIS_) | `TIGRIS_STORAGE_ACCESS_KEY_ID` + `TIGRIS_STORAGE_SECRET_ACCESS_KEY` | | ||
| | 4 | OAuth login | `tigris login` or `tigris login oauth` | | ||
| | 5 | Credentials login | `tigris login credentials` | | ||
| | 6 | Configured credentials | `tigris configure` | | ||
|
|
||
| Run `tigris whoami` to see which method is currently active. | ||
|
|
||
| ## OAuth Login | ||
|
|
||
| The recommended method for interactive use. Opens a browser for authentication via OAuth2 device flow. | ||
|
|
||
| ```sh | ||
| tigris login | ||
| # or explicitly: | ||
| tigris login oauth | ||
| ``` | ||
|
|
||
| OAuth sessions support organization management (`tigris orgs list`, `tigris orgs select`) and IAM operations (users, policies). Tokens are refreshed automatically. | ||
|
|
||
| ## Credentials Login | ||
|
|
||
| Creates a temporary session using an access key and secret. The session is cleared on `tigris logout`, but credentials saved via `tigris configure` are preserved. | ||
|
|
||
| ```sh | ||
| tigris login credentials --access-key tid_AaBb --access-secret tsec_XxYy | ||
| # or interactively: | ||
| tigris login credentials | ||
| ``` | ||
|
|
||
| ## Configured Credentials | ||
|
|
||
| Saves access key credentials permanently to `~/.tigris/config.json`. These persist across login/logout cycles and are used as a fallback when no other login method is active. | ||
|
|
||
| ```sh | ||
| tigris configure --access-key tid_AaBb --access-secret tsec_XxYy | ||
| ``` | ||
|
|
||
| You can optionally specify a custom endpoint: | ||
|
|
||
| ```sh | ||
| tigris configure --access-key tid_AaBb --access-secret tsec_XxYy --endpoint https://custom.endpoint.dev | ||
| ``` | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| Environment variables act as per-session overrides and take priority over stored login state. This is useful for CI/CD pipelines, scripts, and testing with different credentials without affecting your local config. | ||
|
|
||
| ### AWS-standard variables (highest priority) | ||
|
|
||
| ```sh | ||
| export AWS_ACCESS_KEY_ID=tid_AaBb | ||
| export AWS_SECRET_ACCESS_KEY=tsec_XxYy | ||
| # Optional: override the storage endpoint | ||
| export AWS_ENDPOINT_URL_S3=https://t3.storage.dev | ||
| ``` | ||
|
|
||
| ### Tigris-specific variables | ||
|
|
||
| ```sh | ||
| export TIGRIS_STORAGE_ACCESS_KEY_ID=tid_AaBb | ||
| export TIGRIS_STORAGE_SECRET_ACCESS_KEY=tsec_XxYy | ||
| # Optional: override the storage endpoint | ||
| export TIGRIS_STORAGE_ENDPOINT=https://t3.storage.dev | ||
| ``` | ||
|
|
||
| When both AWS_ and TIGRIS_ variables are set, AWS_ takes priority. | ||
|
|
||
| ### Endpoint variables | ||
|
|
||
| You can override service endpoints independently: | ||
|
|
||
| | Variable | Description | Default | | ||
| |----------|-------------|---------| | ||
| | `AWS_ENDPOINT_URL_S3` | Storage endpoint | `https://t3.storage.dev` | | ||
| | `AWS_ENDPOINT_URL_IAM` | IAM endpoint | `https://iam.storageapi.dev` | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not iam.storage.dev?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's what I use in CLI as default, same as web console. |
||
| | `TIGRIS_STORAGE_ENDPOINT` | Storage endpoint | `https://t3.storage.dev` | | ||
| | `TIGRIS_IAM_ENDPOINT` | IAM endpoint (fallback) | `https://iam.storageapi.dev` | | ||
|
|
||
| AWS_ endpoint variables take priority over TIGRIS_ endpoint variables. | ||
|
|
||
| ## AWS Profile | ||
|
|
||
| If you have Tigris credentials configured in `~/.aws/credentials`, the CLI picks them up automatically when `AWS_PROFILE` is set. | ||
|
|
||
| ```ini | ||
| # ~/.aws/credentials | ||
| [tigris] | ||
| aws_access_key_id = tid_AaBb | ||
| aws_secret_access_key = tsec_XxYy | ||
| ``` | ||
|
|
||
| ```ini | ||
| # ~/.aws/config | ||
| [profile tigris] | ||
| endpoint_url_s3 = https://t3.storage.dev | ||
| region = auto | ||
| ``` | ||
|
|
||
| ```sh | ||
| export AWS_PROFILE=tigris | ||
| tigris ls | ||
| ``` | ||
|
|
||
| ## Checking Auth Status | ||
|
|
||
| ```sh | ||
| tigris whoami | ||
| ``` | ||
|
|
||
| Displays the active authentication method, user info, and organization. For OAuth users, shows a list of organizations with the active one highlighted. | ||
|
|
||
| ```sh | ||
| tigris whoami --json | ||
| ``` | ||
|
|
||
| Returns machine-readable JSON output including `authMethod`, `email`, `userId`, and organization details. | ||
|
|
||
| ## Logout | ||
|
|
||
| ```sh | ||
| tigris logout | ||
| ``` | ||
|
|
||
| Clears the current login session (OAuth tokens and temporary credentials). Credentials saved via `tigris configure` are preserved. | ||
|
|
||
| ## Configuration File | ||
|
|
||
| Auth state is stored in `~/.tigris/config.json` with restrictive file permissions (600). The file is managed automatically by the CLI — you should not need to edit it directly. | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.