vault/command/server
Ryan Cragun 012cd5a42a
VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228)
USGv6[0] requires implementing §4.1.1 of the NISTv6-r1 profile[1] for
IPv6-Only capabilities. This section requires that whenever Vault
displays IPv6 addresses (including CLI output, Web UI, logs, etc.) that
_all_ IPv6 addresses must conform to RFC-5952 §4 text representation
recommendations[2].

These recommendations do not prevent us from accepting RFC-4241[3] IPv6
addresses, however, whenever these same addresses are displayed they
must conform to the strict RFC-5952 §4 guidelines.

This PR implements handling of IPv6 address conformance in our
`vault server` routine. We handle conformance normalization for all
server, http_proxy, listener, seal, storage and telemetry
configuration where an input could contain an IPv6 address, whether
configured via an HCL file or via corresponding environment variables.

The approach I've taken is to handle conformance normalization at
parse time to ensure that all log output and subsequent usage
inside of Vaults various subsystems always reference a conformant
address, that way we don't need concern ourselves with conformance
later. This approach ought to be backwards compatible to prior loose
address configuration requirements, with the understanding that
going forward all IPv6 representation will be strict regardless of
what has been configured.

In many cases I've updated our various parser functions to call the
new `configutil.NormalizeAddr()` to apply conformance normalization.
Others required no changes because they rely on standard library URL
string output, which always displays IPv6 URLs in a conformant way.

Not included in this changes is any other vault exec mode other than
server. Client, operator commands, agent mode, proxy mode, etc. will
be included in subsequent changes if necessary.

[0]: https://www.nist.gov/publications/usgv6-profile
[1]: https://www.nist.gov/publications/nist-ipv6-profile
[2]: https://www.rfc-editor.org/rfc/rfc5952.html#section-4
[3]: https://www.rfc-editor.org/rfc/rfc4291

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-27 14:14:28 -07:00
..
test-fixtures VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228) 2025-01-27 14:14:28 -07:00
config_custom_response_headers_test.go Prepare code base for Go 1.24 update. (#29412) 2025-01-27 14:34:07 -05:00
config_oss_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
config_oss.go Add a configuration flag for enabling multiseal (Seal HA), CE side (#25908) 2024-03-22 14:23:05 +00:00
config_telemetry_test.go [VAULT-17826] Remove mount point from rollback metrics (#22400) 2023-08-21 16:55:37 +02:00
config_test_helpers_stubs_oss.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
config_test_helpers.go VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228) 2025-01-27 14:14:28 -07:00
config_test.go VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228) 2025-01-27 14:14:28 -07:00
config_util_test.go Move Request Limiter to enterprise (#25615) 2024-02-27 16:24:06 -05:00
config_util.go Add a configuration flag for enabling multiseal (Seal HA), CE side (#25908) 2024-03-22 14:23:05 +00:00
config.go VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228) 2025-01-27 14:14:28 -07:00
hcp_link_config_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
listener_tcp_test.go VAULT-6803: fix listener issue if using proxy_protocol_behavior with deny_unauthorized for untrusted upstream connections (#27589) 2024-06-26 07:52:13 +00:00
listener_tcp.go Add support for forwarded Tls-Client-Cert (#17272) 2024-04-05 11:22:46 -05:00
listener_test.go VAULT-6803: fix listener issue if using proxy_protocol_behavior with deny_unauthorized for untrusted upstream connections (#27589) 2024-06-26 07:52:13 +00:00
listener_unix_test.go Switch from mitchellh/cli to hashicorp/cli (#24239) 2023-12-04 11:05:02 -08:00
listener_unix.go Switch from mitchellh/cli to hashicorp/cli (#24239) 2023-12-04 11:05:02 -08:00
listener.go add gosimport to make fmt and run it (#25383) 2024-02-13 14:07:02 -08:00
server_seal_transit_acc_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
server_stubs_oss.go Relplat 897 copywrite fixes for mutliple licenses (#23722) 2023-10-20 08:40:43 -07:00
tls_util_test.go Relplat 897 copywrite fixes for mutliple licenses (#23722) 2023-10-20 08:40:43 -07:00
tls_util.go Add -dev-tls-san flag (#22657) 2023-08-31 23:31:42 +01:00