()
| 432 | } |
| 433 | |
| 434 | func (c *ServerCommand) parseConfig() (*server.Config, []configutil.ConfigError, error) { |
| 435 | var configErrors []configutil.ConfigError |
| 436 | // Load the configuration |
| 437 | var config *server.Config |
| 438 | for _, path := range c.flagConfigs { |
| 439 | // TODO (HCL_DUP_KEYS_DEPRECATION): return to server.LoadConfig once deprecation is done |
| 440 | current, duplicate, err := server.LoadConfigCheckDuplicate(path) |
| 441 | if err != nil { |
| 442 | return nil, nil, fmt.Errorf("error loading configuration from %s: %w", path, err) |
| 443 | } |
| 444 | if duplicate { |
| 445 | c.UI.Warn(fmt.Sprintf( |
| 446 | "WARNING: Duplicate keys found in the Vault server configuration file %q, duplicate keys in HCL files are deprecated and will be forbidden in a future release.", path)) |
| 447 | } |
| 448 | |
| 449 | configErrors = append(configErrors, current.Validate(path)...) |
| 450 | |
| 451 | if config == nil { |
| 452 | config = current |
| 453 | } else { |
| 454 | config = config.Merge(current) |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | if config != nil && config.Entropy != nil && config.Entropy.Mode == configutil.EntropyAugmentation && constants.IsFIPS() { |
| 459 | c.UI.Warn("WARNING: Entropy Augmentation is not supported in FIPS 140-3 Inside mode; disabling from server configuration!\n") |
| 460 | config.Entropy = nil |
| 461 | } |
| 462 | entCheckRequestLimiter(c, config) |
| 463 | |
| 464 | return config, configErrors, nil |
| 465 | } |
| 466 | |
| 467 | func (c *ServerCommand) runRecoveryMode() int { |
| 468 | config, configErrors, err := c.parseConfig() |
no test coverage detected