yandrey321 commented on PR #12114:
URL: https://github.com/apache/ozone/pull/12114#issuecomment-7105874428
Thanks @ss77892, if we want RFC conformance we need to use some stable name
to use in CN instead of the hostname. I checked couple of open source products
that do the same, and it seems like the options are:
1. Leave CN empty if <user>@<FQDN> exceeds 64 character
2. Trim FQDN + hash of the full <user>@<FQDN>
3. Use the hash of FQDN if <user>@<FQDN> exceeds 64 characters
So I reworked the PR so that every CN stays within 64 characters:
- **Usual CN when it fits:** `<user>@<FQDN>`, unchanged, so no existing
cluster with normal host names sees any difference.
- **Longer than 64:** `<prefix>@<UUID>` using the service's existing ID:
`dn@<datanode UUID>`, `om@<OM UUID>`, `recon@<Recon ID>`, `scm-sub@<SCM ID>`,
`scm@<SCM ID>`.
I didn't shorten the host name itself, because pods in a StatefulSet
differ only at the end of the name (`...-0`, `...-1`) and would get the same
CN. The UUID is unique and also survives a pod being rescheduled. The host name
stays in the subjectAltName, which is what TLS checks.
- **SCM applies the same rule** when it signs a request from a client that
doesn't have this change yet. Rolling upgrades still end up with conformant
certificates, and a new client also works with an older SCM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]