Skip to content

Commit

Permalink
Add warning about EA in FIPS mode (#15858)
Browse files Browse the repository at this point in the history
* Add warning about EA in FIPS mode

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
  • Loading branch information
cipherboy committed Jun 8, 2022
1 parent 8eff5a1 commit 2355af4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/15858.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:change
core/fips: Disable and warn about entropy augmentation in FIPS 140-2 Inside mode
```
7 changes: 7 additions & 0 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
config2 "github.com/hashicorp/vault/command/config"
"github.com/hashicorp/vault/command/server"
"github.com/hashicorp/vault/helper/builtinplugins"
"github.com/hashicorp/vault/helper/constants"
"github.com/hashicorp/vault/helper/metricsutil"
"github.com/hashicorp/vault/helper/namespace"
vaulthttp "github.com/hashicorp/vault/http"
Expand Down Expand Up @@ -424,6 +425,12 @@ func (c *ServerCommand) parseConfig() (*server.Config, []configutil.ConfigError,
config = config.Merge(current)
}
}

if config.Entropy != nil && config.Entropy.Mode == configutil.EntropyAugmentation && constants.IsFIPS() {
c.UI.Warn("WARNING: Entropy Augmentation is not supported in FIPS 140-2 Inside mode; disabling from server configuration!\n")
config.Entropy = nil
}

return config, configErrors, nil
}

Expand Down

0 comments on commit 2355af4

Please sign in to comment.