From cfb996b820cac11870a3b458b01c7fdd5669fa94 Mon Sep 17 00:00:00 2001 From: David Kanenwisher Date: Mon, 2 Oct 2023 14:09:32 -0500 Subject: [PATCH] Add missing token attributes The context token supports NoVerifyCA and CACert. When it restored the values from a keychain it wasn't mapping the values from the token read to the token returned. This prevented zed client users from benefiting from stored --no-verify-ca and --certificate-path values. With a simple addition the values are passed from context and they no longer need to be manually set on the command line. Signed-off-by: David Kanenwisher --- internal/storage/config.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/storage/config.go b/internal/storage/config.go index 7493ceb1..ef379d07 100644 --- a/internal/storage/config.go +++ b/internal/storage/config.go @@ -49,10 +49,12 @@ func DefaultToken(overrideEndpoint, overrideAPIToken string, cs ConfigStore, ss } return Token{ - Name: token.Name, - Endpoint: stringz.DefaultEmpty(overrideEndpoint, token.Endpoint), - APIToken: stringz.DefaultEmpty(overrideAPIToken, token.APIToken), - Insecure: token.Insecure, + Name: token.Name, + Endpoint: stringz.DefaultEmpty(overrideEndpoint, token.Endpoint), + APIToken: stringz.DefaultEmpty(overrideAPIToken, token.APIToken), + Insecure: token.Insecure, + NoVerifyCA: token.NoVerifyCA, + CACert: token.CACert, }, nil }