Rebrand user-visible CLI text; add legacy fallbacks for keyring, cache dir and version prefix
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4cb3bda43a
commit
ab4ed3c9e5
184 files changed
+934
-851
No files matched your search
+19
-15
@@ -72,16 +72,20 @@ const (
|
||||
// maxLineLength is the maximum width of any line.
|
||||
maxLineLength int = 78
|
||||
|
||||
envToken = "BOUNDARY_TOKEN"
|
||||
EnvTokenName = "BOUNDARY_TOKEN_NAME"
|
||||
EnvKeyringType = "BOUNDARY_KEYRING_TYPE"
|
||||
envRecoveryConfig = "BOUNDARY_RECOVERY_CONFIG"
|
||||
envSkipCacheDaemon = "BOUNDARY_SKIP_CACHE_DAEMON"
|
||||
envSkipClientAgent = "BOUNDARY_SKIP_CLIENT_AGENT"
|
||||
EnvClientAgentPort = "BOUNDARY_CLIENT_AGENT_LISTENING_PORT"
|
||||
EnvBoundaryClientAgentCliErrorOutput = "BOUNDARY_CLIENT_AGENT_CLI_ERROR_OUTPUT"
|
||||
envToken = "THRESHOLD_TOKEN"
|
||||
EnvTokenName = "THRESHOLD_TOKEN_NAME"
|
||||
EnvKeyringType = "THRESHOLD_KEYRING_TYPE"
|
||||
envRecoveryConfig = "THRESHOLD_RECOVERY_CONFIG"
|
||||
envSkipCacheDaemon = "THRESHOLD_SKIP_CACHE_DAEMON"
|
||||
envSkipClientAgent = "THRESHOLD_SKIP_CLIENT_AGENT"
|
||||
EnvClientAgentPort = "THRESHOLD_CLIENT_AGENT_LISTENING_PORT"
|
||||
EnvBoundaryClientAgentCliErrorOutput = "THRESHOLD_CLIENT_AGENT_CLI_ERROR_OUTPUT"
|
||||
|
||||
StoredTokenName = "HashiCorp Boundary Auth Token"
|
||||
// StoredTokenName is the name of the credential entry written to
|
||||
// wincred/keychain keyrings. LegacyStoredTokenName is the name used by
|
||||
// upstream HashiCorp Boundary; it is only read (and deleted on logout).
|
||||
StoredTokenName = "Threshold Auth Token"
|
||||
LegacyStoredTokenName = "HashiCorp Boundary Auth Token"
|
||||
)
|
||||
|
||||
// reRemoveWhitespace is a regular expression for stripping whitespace from
|
||||
@@ -340,8 +344,8 @@ func (c *Command) Client(opt ...Option) (*api.Client, error) {
|
||||
c.client.SetToken(token)
|
||||
|
||||
case api.Getenv(envToken) != "":
|
||||
// Backwards compat: allow reading from existing BOUNDARY_TOKEN env var
|
||||
c.UI.Warn(`Direct usage of BOUNDARY_TOKEN env var is deprecated; please use "-token env://<env var name>" format, e.g. "-token env://BOUNDARY_TOKEN" to specify an env var to use.`)
|
||||
// Backwards compat: allow reading from existing THRESHOLD_TOKEN env var
|
||||
c.UI.Warn(`Direct usage of THRESHOLD_TOKEN env var is deprecated; please use "-token env://<env var name>" format, e.g. "-token env://THRESHOLD_TOKEN" to specify an env var to use.`)
|
||||
c.client.SetToken(api.Getenv(envToken))
|
||||
|
||||
case c.client.Token() == "" && strings.ToLower(c.FlagKeyringType) != "none":
|
||||
@@ -393,7 +397,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets {
|
||||
Target: &c.FlagAddr,
|
||||
EnvVar: api.EnvBoundaryAddr,
|
||||
Completion: complete.PredictAnything,
|
||||
Usage: "Addr of the Boundary controller, as a complete URL (e.g. https://boundary.example.com:9200).",
|
||||
Usage: "Addr of the Threshold controller, as a complete URL (e.g. https://threshold.example.com:9200).",
|
||||
})
|
||||
|
||||
f.StringVar(&StringVar{
|
||||
@@ -421,7 +425,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets {
|
||||
EnvVar: api.EnvBoundaryClientCert,
|
||||
Completion: complete.PredictFiles("*"),
|
||||
Usage: "Path on the local disk to a single PEM-encoded CA " +
|
||||
"certificate to use for TLS authentication to the Boundary Controller. If " +
|
||||
"certificate to use for TLS authentication to the Threshold Controller. If " +
|
||||
"this flag is specified, -client-key is also required.",
|
||||
})
|
||||
|
||||
@@ -439,7 +443,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets {
|
||||
Target: &c.flagTLSServerName,
|
||||
EnvVar: api.EnvBoundaryTLSServerName,
|
||||
Completion: complete.PredictAnything,
|
||||
Usage: "Name to use as the SNI host when connecting to the Boundary " +
|
||||
Usage: "Name to use as the SNI host when connecting to the Threshold " +
|
||||
"server via TLS.",
|
||||
})
|
||||
|
||||
@@ -449,7 +453,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets {
|
||||
EnvVar: api.EnvBoundaryTLSInsecure,
|
||||
Usage: "Disable verification of TLS certificates. Using this option " +
|
||||
"is highly discouraged as it decreases the security of data " +
|
||||
"transmissions to and from the Boundary server.",
|
||||
"transmissions to and from the Threshold server.",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user