Skip to content
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

Specify subject name when generating keypair #13817

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

masnax
Copy link
Contributor

@masnax masnax commented Jul 24, 2024

This is primarily for microcluster. From the discussions in Madrid about join token verification (the MITM discussions), we decided we would verify that the SAN of the server.crt of a joiner microcluster node must match the node name specified when creating the join token.

By default, LXD sets this to be the hostname of the system that generated the certificate. In microcluster, the node name does not necessarily always have to line up exactly with the hostname of the system, rather the name is supplied at the time we bootstrap or join a cluster. So we need to be able to set the name in the certificate ourselves.

Copy link
Contributor

@roosterfish roosterfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, only a few remarks about comments for clarification.

shared/cert.go Show resolved Hide resolved
shared/cert.go Show resolved Hide resolved
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
@masnax masnax force-pushed the cert-name branch 2 times, most recently from b13c290 to f7a0233 Compare July 25, 2024 14:55
@masnax masnax requested a review from tomponline July 25, 2024 14:55
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
@tomponline tomponline merged commit dd8bcf0 into canonical:main Jul 25, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants