Skip to content

Commit

Permalink
Add missing token attributes
Browse files Browse the repository at this point in the history
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 <dkanenwisher@bushelpowered.com>
  • Loading branch information
prufrock committed Oct 2, 2023
1 parent e4f43e3 commit cfb996b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/storage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit cfb996b

Please sign in to comment.