* internal/cmd/wrapper: add deprecation wrapper The deprecation wrapper can be used to display a warning to callers when a command is deprecated. * all: rename daemon to cache Rename the boundary daemon command to boundary cache. This avoids confusion with future client/daemons. * changes daemon to cache in nav --------- Co-authored-by: Robin Beck <stellarsquall@protonmail.ch>
75 lines
2.9 KiB
Plaintext
75 lines
2.9 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: cache add-token - Command
|
|
description: |-
|
|
The "cache add-token" command lets you add an auth token to a Boundary cache that is running.
|
|
---
|
|
|
|
# cache add-token
|
|
|
|
Command: `boundary cache add-token`
|
|
|
|
The `boundary cache add-token` command lets you add an auth token from your keyring to a Boundary cache that is running.
|
|
|
|
By default, the Boundary CLI tries to use a keyring to store and receive auth tokens.
|
|
Whenever you use an auth token to interact with Boundary, the client cache stores the auth token and syncs the data associated with it.
|
|
If you authenticate to multiple Boundary instances, the client cache stores multiple auth tokens and syncs the data associated with each token.
|
|
|
|
By adding auth tokens to your client cache, you can select which specific Boundary instance you want to search.
|
|
|
|
<Note>
|
|
|
|
The `search` operation only displays the resources that you have permissions to view.
|
|
You must have the `read` or `read:self` grant on the auth token to successfully add it.
|
|
If you are logged in as a user who does not have the permissions to view a resource, it does not display in the list of results.
|
|
|
|
For more information, refer to [Identity and access management (IAM)](/boundary/docs/concepts/iam).
|
|
|
|
</Note>
|
|
|
|
## Examples
|
|
|
|
The following command adds an auth token to the client cache from your keyring:
|
|
|
|
```shell-session
|
|
$ boundary cache add-token
|
|
```
|
|
|
|
The following command specifies the name of the keyring `development` from which you want to add the token:
|
|
|
|
```shell-session
|
|
$ boundary cache add-token -token-name development
|
|
```
|
|
|
|
## Usage
|
|
|
|
<CodeBlockConfig hideClipboard>
|
|
|
|
```shell-session
|
|
$ boundary cache add-token [options]
|
|
```
|
|
|
|
</CodeBlockConfig>
|
|
|
|
### Command options
|
|
|
|
- `keyring-type=<string>` - Specifies the type of keyring to use.
|
|
The default value is `auto` which uses the Windows credential manager, OS X keychain, or cross-platform password store, depending on your platform.
|
|
Use the value `none` to disable keyring functionality.
|
|
Depending on your platform, available values include:
|
|
- `wincred`
|
|
- `keychain`
|
|
- `pass`
|
|
- `secret-service`
|
|
|
|
You can also specify the keyring type using the **BOUNDARY_KEYRING_TYPE** environment variable.
|
|
- `output-curl-string` - Specifies that Boundary should print an equivalent cURL command string and exit, instead of executing the request.
|
|
The default value is `false`.
|
|
- `token` = A URL that points to a file on disk (file://) from which Boundary reads a token or an environment variable (env://) from which the token will be read.
|
|
If you set this parameter, it overrides the `token-name` parameter.
|
|
- `token-name` - If specified, Boundary uses the value in this parameter as the name when it stores the token in the system credential store.
|
|
You can use this value to switch user identities for different commands.
|
|
You can also specify a token name using the **BOUNDARY_TOKEN_NAME** environment variable.
|
|
|
|
@include 'cmd-option-note.mdx'
|