Problem
You receive the below error when attempting to run Boundary authenticate using the CLI:
Error opening keyring: Specified keyring backend not available
Cause
This might be caused because the current system user account running Boundary CLI does not have access to a keystore on the system or a misconfiguration is preventing the Boundary process or system user account running the command from accessing it.
Solution (Workaround)
It is recommended when possible to avoid outputting the token to the terminal and storing it via environment variable or in a file, however, for situations where it cannot be avoided the following options are available.
You can add -keyring-type=none
to the authentication request and Boundary will return the token to the terminal instead of attempting to store in the local system's keyring backend.
❯ boundary authenticate password \
-auth-method-id=ampw_FiQGszPisB \
-login-name=hcpsupport -keyring-type=none
Please enter the password (it will be hidden):
Authentication information:
Account ID: acctpw_OT0KSsfBv0
Auth Method ID: ampw_FiQGszPisB
Expiration Time: Fri, 14 Oct 2022 10:27:43 CDT
User ID: u_xmhewfRcma
Storing the token in a keyring was disabled. The token is:
at_ddhcDEc0YS_s12C98773XbpzJheeDwcePDmAtGo9fNWcJQ5nfibxVgu4h5q8eMEMvHgTRsJGYsw6pZohBdvo1FxXMZxvksWWckRu6CWjd2Sa1pwsBDgQwdxftpjeeVejP3GRzCUKHs4t2PMLxk3
Please be sure to store it safely!
You can then pass the token into the CLI command
❯ boundary scopes create -name support env://BOUNDARY_TOKEN
Scope information:
ID: o_kGleG8JJut
Name: support
Authorized Actions:
no-op
You can also save the token to a file and reference it.
❯ boundary scopes create -name test -token=file:///Users/kash/boundary.token
Scope information:
Created Time: Fri, 07 Oct 2022 10:53:27 CDT
ID: o_rrG8JK8uKB
Name: test
Updated Time: Fri, 07 Oct 2022 10:53:27 CDT
Version: 1
Scope (parent):
ID: global
Name: global
Type: global
Authorized Actions:
no-op
read
update