mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Add -dev-tls-san flag (#22657)
* Add -dev-tls-san flag This is helpful when wanting to set up a dev server with TLS in Kubernetes and any other situations where the dev server may not be the same machine as the Vault client (e.g. in combination with some /etc/hosts entries) * Automatically add (best-effort only) -dev-listen-address host to extraSANs
This commit is contained in:
@@ -176,13 +176,13 @@ ui = true
|
||||
}
|
||||
|
||||
// DevTLSConfig is a Config that is used for dev tls mode of Vault.
|
||||
func DevTLSConfig(storageType, certDir string) (*Config, error) {
|
||||
func DevTLSConfig(storageType, certDir string, extraSANs []string) (*Config, error) {
|
||||
ca, err := GenerateCA()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cert, key, err := GenerateCert(ca.Template, ca.Signer)
|
||||
cert, key, err := generateCert(ca.Template, ca.Signer, extraSANs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user