-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
vault: 0.6.5 -> 0.7.2 with service #26130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@katyucha, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pradeepchhetri, @edolstra and @offlinehacker to be potential reviewers. |
|
||
${if cfg.telemetry.extraConfig != "" then " | ||
telemetry { | ||
${if cfg.telemetry.disable_hostname then "disable_hostname = \"true\"" else ""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
telemetry.disable_hostname
only takes effect if telemetry.extraConfig
is set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of this parameter if you doesn't set telemetry destination in extraConfig like a statsd, circonus or statsite...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so this is self-hosted telemetry and not external. Thanks for the clarification!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks great! Just pointed out some changes that I think would improve things a bit.
}; | ||
|
||
tls_disable = mkOption { | ||
type = types.str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use types.bool
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
}; | ||
|
||
tls_min_version = mkOption { | ||
type = types.str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use something like types.enum [ "tls10" "tls11" "tls12" ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
}; | ||
|
||
cluster_address = mkOption { | ||
type = types.str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using ""
to denote an unset cluster_address
, I'd recommend making this types.nullOr types.str
, with default = null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all right, I'll write that for others string else " ''
}; | ||
|
||
tls_prefer_server_cipher_suites = mkOption { | ||
type = types.str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be something like types.nullOr (types.enum [ "tls10" "tls11" "tls12" ])
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. I note for TLS but for Cipher, it's a big list you can see here: https://golang.org/src/crypto/tls/cipher_suites.go . Is types.enum a little bit crazy for this case ?
}; | ||
|
||
tls_require_and_verify_client_cert = mkOption { | ||
type = types.str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be types.bool
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
|
||
${if cfg.listener.tls_prefer_server_cipher_suites then "tls_prefer_server_cipher_suites = \"true\"" else "tls_prefer_server_cipher_suites = \"false\"" } | ||
|
||
${if cfg.listener.tls_require_and_verify_client_cert then "tls_require_and_verify_client_cert = \"true\"" else "tls_require_and_verify_client_cert = \"false\"" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use:
tls_require_and_verify_client_cert = "${boolToString cfg.listener.tls_require_and_verify_client_cert}";
or even abstract it some more and use it on more places:
let boolOption = name: opt: "${name} = \"${boolToString opt}\"";
in ''
${boolOption "tls_prefer_server_cipher_suites" cfg.listener.tls_require_and_verify_client_cert}
'';
So you don't have to repeat yourself. Same with the string options. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated !
Is this ready to integrate? |
HashiCorp recommends NOT running as root:
However, if you do run as non-root, you either need to |
Some variation of |
Volt fork my MR ... no need of this now |
Motivation for this change
Updating vault and a service to run it !
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)