vault icon indicating copy to clipboard operation
vault copied to clipboard

useless warning pollutes every CLI invocation `Warnf OS does not support credentials cache`

Open dch opened this issue 6 months ago • 2 comments

Describe the bug

new credentials cache warning interferes with CLI usage.

To Reproduce

Query a vault server for a key/value lookup on FreeBSD, see unwanted warning on every invocation:

 vault read secret/test
WARN[0000]log.go:204 gosnowflake.(*defaultLogger).Warnf OS freebsd does not support credentials cache
Key                 Value
---                 -----
refresh_interval    72h
...

Expected behavior

This warning should never be shown to the user.

Environment:

$ vault status
WARN[0000]log.go:204 gosnowflake.(*defaultLogger).Warnf OS freebsd does not support credentials cache
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
Total Shares    6
Threshold       3
Version         1.19.5
Build Date      2025-06-12T04:04:53Z
Storage Type    file
Cluster Name    vault-cluster-decc334d
Cluster ID      d765c2e9-2fe7-917e-51d5-eaedacd2cadd
HA Enabled      false

$ vault version
WARN[0000]log.go:204 gosnowflake.(*defaultLogger).Warnf OS freebsd does not support credentials cache
Vault v1.19.5 (7010adf2c67686681908f04ec8e9357f19066f4f), built 2025-06-12T04:04:53Z (cgo)

$ uname  -a
FreeBSD wintermute  15.0-CURRENT FreeBSD 15.0-CURRENT main-n277972-c2834a53b919 GENERIC-NODEBUG amd64

Vault server configuration file(s):

n/a

Additional context

warning is new in last release.

dch avatar Jul 07 '25 06:07 dch

This message is emitted by gosnowflake library, so probably something worthwhile to fix upstream: the library prints a debug message on Linux if there is a failure while a warning if not supported.

That kind of fixes have already occured in the past, e.g. https://github.com/snowflakedb/gosnowflake/issues/1182

Upstream references:

  • bug report: https://github.com/snowflakedb/gosnowflake/issues/1572 / SNOW-2331330
  • code review: https://github.com/snowflakedb/gosnowflake/pull/1573/files

dereckson avatar Sep 10 '25 20:09 dereckson

Code has been merged upstream.

Next step: gosnowflake release

dereckson avatar Oct 20 '25 23:10 dereckson

released with gosnowflake v1.17.1

New gosnowflake library has been released with my fix to decrease the verbosity of the error message from warning to debug.

If you bump Vault to use 1.17.1+, this issue will be solved.

dereckson avatar Dec 06 '25 09:12 dereckson