From c2673ee86a0d557f18d9f2e2118550204bbab286 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Wed, 7 Apr 2021 10:25:05 -0400 Subject: [PATCH] Move SanitizedConfig back to a shared-ent file. (#11291) --- vault/core.go | 10 ++++++++++ vault/core_util.go | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vault/core.go b/vault/core.go index 72b5f767f..74199979c 100644 --- a/vault/core.go +++ b/vault/core.go @@ -2614,6 +2614,16 @@ func (c *Core) SetConfig(conf *server.Config) { c.logger.Debug("set config", "sanitized config", string(bz)) } +// SanitizedConfig returns a sanitized version of the current config. +// See server.Config.Sanitized for specific values omitted. +func (c *Core) SanitizedConfig() map[string]interface{} { + conf := c.rawConfig.Load() + if conf == nil { + return nil + } + return conf.(*server.Config).Sanitized() +} + // LogFormat returns the log format current in use. func (c *Core) LogFormat() string { conf := c.rawConfig.Load() diff --git a/vault/core_util.go b/vault/core_util.go index 60123d11e..3a02f1c48 100644 --- a/vault/core_util.go +++ b/vault/core_util.go @@ -66,16 +66,6 @@ func (c *Core) GetCoreConfigInternal() *server.Config { return conf.(*server.Config) } -// SanitizedConfig returns a sanitized version of the current config. -// See server.Config.Sanitized for specific values omitted. -func (c *Core) SanitizedConfig() map[string]interface{} { - conf := c.rawConfig.Load() - if conf == nil { - return nil - } - return conf.(*server.Config).Sanitized() -} - func (c *Core) teardownReplicationResolverHandler() {} func createSecondaries(*Core, *CoreConfig) {}