Repository navigation
CP-312485: Pool-admin permissions and trusted CAs for client certificate auth #7360
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
base: master
Are you sure you want to change the base?
Changes from all commits
27b0a66
41856b0
d8b1b3f
02c8d3a
7a92a72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |||||
| title: Trusted certificates for identity validation in TLS connections | ||||||
| layout: default | ||||||
| design_doc: true | ||||||
| revision: 2 | ||||||
| status: released (26.13.0) | ||||||
| revision: 3 | ||||||
| status: released (26.13.0), with proposed changes for releases after 26.23.0 | ||||||
| --- | ||||||
|
|
||||||
| # Overview | ||||||
|
|
@@ -37,6 +37,8 @@ By introducing a "purpose" attribute, certificates can be organized by their int | |||||
| # Use Cases | ||||||
| * An XAPI client establishes a TLS connection to an XAPI service. | ||||||
| This case is outside the scope of trusted certificates managed by XAPI and is included here only for completeness. | ||||||
| * An XAPI client logs in to an XAPI service with a TLS client certificate. | ||||||
| This case is supported by a new purpose in this design, see [Client certificate authentication](#client-certificate-authentication). | ||||||
| * An XAPI process on one host initiates a TLS connection to an XAPI process on another host within the same pool. | ||||||
| This case is covered in the base design and is listed here for completeness. | ||||||
| * An XAPI process initiates a TLS connection to an external service, such as an appliance. | ||||||
|
|
@@ -244,3 +246,25 @@ The endpoint to validate the peer's identity must unambiguously choose only one | |||||
| No more attempts on remaining bundles when validation with the selected one fails (the server certificate is not trusted by the selected bundle). | ||||||
|
|
||||||
| For example, if "Peer Bundle" doesn't exist and the "CA Bundle" (if not empty) is selected to do the validation, the endpoint should not try with "General Bundle" even when the validation with "CA Bundle" failed. | ||||||
|
|
||||||
| ## Client certificate authentication | ||||||
| A new purpose "client_certificate_auth" is added for the trusted certificates used to verify TLS client certificates. | ||||||
| When "pool.enable_client_certificate_auth" is called, stunnel on the pool coordinator verifies the client certificate with the "CA Bundle" of this purpose. | ||||||
| It also checks that the name in the client certificate matches "pool.client_certificate_auth_name". | ||||||
| If the check passes, the client can log in without a password. Otherwise, the regular authentication is used. | ||||||
|
|
||||||
| The client certificate is only checked on the coordinator. A pool member tells the client to contact the coordinator. | ||||||
| The trusted certificates are copied to all hosts in the pool, so a new coordinator has the same bundle when the coordinator is changed. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Only root CA certificates can be installed for this purpose, because stunnel is configured to verify the certificate chain. | ||||||
| A self-signed client certificate can be installed as a root CA. | ||||||
|
|
||||||
| Client certificate logins used to get the "client-cert" role. | ||||||
| This role is removed, because a client that manages a pool this way needs the same access as pool-admin. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear what
Suggested change
|
||||||
| These logins now get the permissions of pool-admin, so only pool-admin can install certificates for this purpose. | ||||||
|
|
||||||
| The "Default Bundle" is not used for client certificate authentication any more. | ||||||
| The CA certificates installed by "pool.install_ca_certificate" can't be used for client certificate login. | ||||||
|
|
||||||
| stunnel only reads the bundle when it starts or reloads. The coordinator reloads stunnel when the bundle is changed. | ||||||
| If the bundle is empty, client certificate authentication is not configured in stunnel. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8891,22 +8891,10 @@ let http_actions = | |
| , (Get, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []) | ||
| ) | ||
| ; ( "post_services_xenops" | ||
| , ( Post | ||
| , Constants.xenops_uri | ||
| , false | ||
| , [] | ||
| , _R_VM_POWER_ADMIN ++ _R_CLIENT_CERT | ||
| , [] | ||
| ) | ||
| , (Post, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like just a format change, why is this required?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not only formatting: the old code had _R_VM_POWER_ADMIN ++ _R_CLIENT_CERT, and this commit drops ++ _R_CLIENT_CERT because the client-cert role is removed. |
||
| ) | ||
| ; ( "put_services_xenops" | ||
| , ( Put | ||
| , Constants.xenops_uri | ||
| , false | ||
| , [] | ||
| , _R_VM_POWER_ADMIN ++ _R_CLIENT_CERT | ||
| , [] | ||
| ) | ||
| , (Put, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []) | ||
| ) | ||
| ; ( "get_services_sm" | ||
| , (Get, Constants.sm_uri, false, [], _R_VM_POWER_ADMIN, []) | ||
|
|
@@ -9179,32 +9167,12 @@ let http_actions = | |
| , (Get, Constants.get_repository_uri, false, [], _R_LOCAL_ROOT_ONLY, []) | ||
| ) | ||
| ; ( "get_enabled_repository" | ||
| , ( Get | ||
| , Constants.get_enabled_repository_uri | ||
| , false | ||
| , [] | ||
| , _R_POOL_OP ++ _R_CLIENT_CERT | ||
| , [] | ||
| ) | ||
| , (Get, Constants.get_enabled_repository_uri, false, [], _R_POOL_OP, []) | ||
| ) | ||
| ; ( "get_host_updates" | ||
| , ( Get | ||
| , Constants.get_host_updates_uri | ||
| , false | ||
| , [] | ||
| , _R_POOL_OP ++ _R_CLIENT_CERT | ||
| , [] | ||
| ) | ||
| ) | ||
| ; ( "get_updates" | ||
| , ( Get | ||
| , Constants.get_updates_uri | ||
| , true | ||
| , [] | ||
| , _R_POOL_OP ++ _R_CLIENT_CERT | ||
| , [] | ||
| ) | ||
| , (Get, Constants.get_host_updates_uri, false, [], _R_POOL_OP, []) | ||
| ) | ||
| ; ("get_updates", (Get, Constants.get_updates_uri, true, [], _R_POOL_OP, [])) | ||
| ; ("put_bundle", (Put, Constants.put_bundle_uri, true, [], _R_POOL_OP, [])) | ||
| ] | ||
|
|
||
|
|
@@ -9243,6 +9211,8 @@ let extra_permissions = | |
| [ | ||
| (Task.extra_permission_task_destroy_any, _R_POOL_OP) | ||
| (* only POOL_OP can destroy any tasks *) | ||
| ; (Datamodel_pool.extra_permission_client_certificate_auth, _R_POOL_ADMIN) | ||
| (* client certificates trusted for this purpose log in as pool-admin *) | ||
| ] | ||
|
|
||
| module StringMap = Map.Make (String) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,10 @@ let certificate_purpose = | |
| , "Trusted certificates that are for LDAPS connections to external \ | ||
| authentication services." | ||
| ) | ||
| ; ( "client_certificate_auth" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The context is already for trusted certificate, so it can be |
||
| , "Trusted root CA certificates that are for authenticating XAPI \ | ||
| clients by TLS client certificates." | ||
| ) | ||
| ] | ||
| ) | ||
|
|
||
|
|
||
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 would reword this as: