Add infrastructure for exposing FIPS status (#14127)
In future Vault Enterprise versions, we'll be building Vault with FIPS-validated cryptography. To help operators understand their environment, we'll want to expose information about their FIPS status when they're running a FIPS version of Vault. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
This commit is contained in:
parent
797f11b0e5
commit
ec4deb12ef
|
@ -644,6 +644,12 @@ func (c *ServerCommand) runRecoveryMode() int {
|
|||
infoKeys = append(infoKeys, "go version")
|
||||
info["go version"] = runtime.Version()
|
||||
|
||||
fipsStatus := getFIPSInfoKey()
|
||||
if fipsStatus != "" {
|
||||
infoKeys = append(infoKeys, "fips")
|
||||
info["fips"] = fipsStatus
|
||||
}
|
||||
|
||||
// Server configuration output
|
||||
padding := 24
|
||||
|
||||
|
@ -1377,6 +1383,12 @@ func (c *ServerCommand) Run(args []string) int {
|
|||
infoKeys = append(infoKeys, "go version")
|
||||
info["go version"] = runtime.Version()
|
||||
|
||||
fipsStatus := getFIPSInfoKey()
|
||||
if fipsStatus != "" {
|
||||
infoKeys = append(infoKeys, "fips")
|
||||
info["fips"] = fipsStatus
|
||||
}
|
||||
|
||||
sort.Strings(infoKeys)
|
||||
c.UI.Output("==> Vault server configuration:\n")
|
||||
|
||||
|
@ -1800,6 +1812,12 @@ func (c *ServerCommand) enableThreeNodeDevCluster(base *vault.CoreConfig, info m
|
|||
infoKeys = append(infoKeys, "go version")
|
||||
info["go version"] = runtime.Version()
|
||||
|
||||
fipsStatus := getFIPSInfoKey()
|
||||
if fipsStatus != "" {
|
||||
infoKeys = append(infoKeys, "fips")
|
||||
info["fips"] = fipsStatus
|
||||
}
|
||||
|
||||
// Server configuration output
|
||||
padding := 24
|
||||
|
||||
|
|
|
@ -9,3 +9,9 @@ var adjustCoreConfigForEnt = adjustCoreConfigForEntNoop
|
|||
|
||||
func adjustCoreConfigForEntNoop(config *server.Config, coreConfig *vault.CoreConfig) {
|
||||
}
|
||||
|
||||
var getFIPSInfoKey = getFIPSInfoKeyNoop
|
||||
|
||||
func getFIPSInfoKeyNoop() string {
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue