mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
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:
@@ -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 ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user