Add pass cred storage support (#731)
* Add `pass` cred storage support Make it the default on non-Windows/macOS Document the token storage behavior
This commit is contained in:
1 parent
bfa3edbbac
commit
09b865ab28
8 files changed
+326
-94
No files matched your search
@@ -27,6 +27,93 @@ If you want to install it manually, for Bash, the following line in a
|
||||
|
||||
`complete -C /path/to/boundary boundary`
|
||||
|
||||
## Keyring Token storage
|
||||
|
||||
Boundary uses various mechanisms, depending on platform, to allow for secure
|
||||
storage of authentication tokens for later use. Each platform has a
|
||||
platform-specific option (which on Windows and macOS are the default);
|
||||
[pass](https://www.passwordstore.org/) is also available on all platforms. On
|
||||
all platforms, setting `-keyring-type` to `none` (or setting it via
|
||||
`BOUNDARY_KEYRING_TYPE`) disables storage and retrieval of the token.
|
||||
|
||||
Additionally, more than one token can be stored or retrieved at once via the
|
||||
`-token-name` flag or `BOUNDARY_TOKEN_NAME` env var. This allows for storing
|
||||
tokens used by different Boundary installations, or other needs.
|
||||
|
||||
### Windows
|
||||
|
||||
On Windows, the Windows credential store (`wincred`) is used.
|
||||
|
||||
Available keyring types:
|
||||
|
||||
* `wincred` (default)
|
||||
* `pass`
|
||||
* `none`
|
||||
|
||||
### macOS
|
||||
|
||||
On macOS, Keychain is used via `/usr/bin/security`. (Using this binary allows us
|
||||
to keep the Boundary binary statically linked, which we prefer.)
|
||||
|
||||
Available keyring types:
|
||||
|
||||
* `keychain` (default)
|
||||
* `pass`
|
||||
* `none`
|
||||
|
||||
### Other platforms
|
||||
|
||||
On all other platforms, the default is `pass`. However, if an implementation of
|
||||
the [freedesktop.org secret
|
||||
service](https://specifications.freedesktop.org/secret-service/latest/) is
|
||||
available (via `gnome-keyring`, `kwallet`, or others) it can be used.
|
||||
|
||||
Available keyring types:
|
||||
|
||||
* `pass` (default)
|
||||
* `secret-service`
|
||||
* `none`
|
||||
|
||||
## Mapping to Collections and Sub-Types
|
||||
|
||||
Generally speaking, Boundary's CLI commands map to the collections they operate
|
||||
on. For instance, when operating on roles, the command will be `boundary roles
|
||||
...`.
|
||||
|
||||
As a result, the patterns for reading, deleting, and listing are predictable:
|
||||
|
||||
* `boundary <collection> read`
|
||||
* `boundary <collection> delete`
|
||||
* `boundary <collection> list`
|
||||
|
||||
`read` and `delete` will always operate on a particular resource identifier, so
|
||||
will always take in an `-id` parameter. `list` operates on collections so will
|
||||
either take a `-scope-id` parameter or, depending on type, a higher level
|
||||
resource identifier, e.g. `-auth-method-id`.
|
||||
|
||||
Creating and updating resources may take an extra parameter if the resource type
|
||||
is abstract, that is, if the type cannot be operated on directly but must be
|
||||
operated on through an implementation. As an example, a role is not an abstract
|
||||
type, and does not have various implementations of it. As a result, a role can
|
||||
be operated on directly:
|
||||
|
||||
* `boundary roles create`
|
||||
* `boundary roles update`.
|
||||
|
||||
However, a target can be one of many types of targets, and a concrete
|
||||
implementation of a target is a `tcp` type of target. Therefore an extra
|
||||
parameter is required when creating or updating a target:
|
||||
|
||||
* `boundary targets tcp create`
|
||||
* `boundary targets tcp update`
|
||||
|
||||
This allows the CLI to perform proper presentation and validation of parameters
|
||||
and functions for the given type.
|
||||
|
||||
Similar to `read`, `update` operates on an existing target so will always take
|
||||
an `-id` parameter. Similar to `list`, `create` operates on a collection so will
|
||||
either take a `-scope-id` parameter or a parameter defining the parent resource.
|
||||
|
||||
## Parameter Handling
|
||||
|
||||
All parameters specified on the CLI are specified as a Go-style flag with a
|
||||
@@ -99,43 +186,3 @@ the exact output from the controller. If using the output of the CLI in scripts
|
||||
or as parameters to other tools, _always_ use formatted output. The default text
|
||||
output is meant for human users and the formatting or the information included
|
||||
within that output from the original JSON may change at any time.
|
||||
|
||||
## Mapping to Collections and Sub-Types
|
||||
|
||||
Generally speaking, Boundary's CLI commands map to the collections they operate
|
||||
on. For instance, when operating on roles, the command will be `boundary roles
|
||||
...`.
|
||||
|
||||
As a result, the patterns for reading, deleting, and listing are predictable:
|
||||
|
||||
* `boundary <collection> read`
|
||||
* `boundary <collection> delete`
|
||||
* `boundary <collection> list`
|
||||
|
||||
`read` and `delete` will always operate on a particular resource identifier, so
|
||||
will always take in an `-id` parameter. `list` operates on collections so will
|
||||
either take a `-scope-id` parameter or, depending on type, a higher level
|
||||
resource identifier, e.g. `-auth-method-id`.
|
||||
|
||||
Creating and updating resources may take an extra parameter if the resource type
|
||||
is abstract, that is, if the type cannot be operated on directly but must be
|
||||
operated on through an implementation. As an example, a role is not an abstract
|
||||
type, and does not have various implementations of it. As a result, a role can
|
||||
be operated on directly:
|
||||
|
||||
* `boundary roles create`
|
||||
* `boundary roles update`.
|
||||
|
||||
However, a target can be one of many types of targets, and a concrete
|
||||
implementation of a target is a `tcp` type of target. Therefore an extra
|
||||
parameter is required when creating or updating a target:
|
||||
|
||||
* `boundary targets tcp create`
|
||||
* `boundary targets tcp update`
|
||||
|
||||
This allows the CLI to perform proper presentation and validation of parameters
|
||||
and functions for the given type.
|
||||
|
||||
Similar to `read`, `update` operates on an existing target so will always take
|
||||
an `-id` parameter. Similar to `list`, `create` operates on a collection so will
|
||||
either take a `-scope-id` parameter or a parameter defining the parent resource.
|
||||
Reference in new issue
Block a user