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

CP-50789: Enable verified rpc to external host #6082

Merged

Conversation

gangj
Copy link
Contributor

@gangj gangj commented Oct 24, 2024

Now xapi supports setting up rpc to hosts in the pool and appliances, while for syncing updates from remote_pool type repository, we need to set up rpc to remote coordinator with its certificate verfieid.

Add util Helpers.make_external_host_verified_rpc, which will set up a secure connection to the external host(host outside the pool) with its host certificate verified.

ocaml/libs/stunnel/stunnel.ml Outdated Show resolved Hide resolved
@gangj gangj force-pushed the private/gangj/CP-50789 branch 2 times, most recently from 63e2fa2 to 2da4102 Compare October 24, 2024 14:39
@gangj gangj changed the title CP-50789: Enable verified rpc to remote host CP-50789: Enable verified rpc to external host Oct 24, 2024
let make_external_host_verified_rpc ~__context ext_host_address ext_host_cert
xml =
let@ temp_file, temp_out_ch =
with_temp_file "remote-pool-certificate" ".pem"
Copy link
Member

Choose a reason for hiding this comment

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

Would suggest remote-pool-certificate -> external-host-cert for consistency.

ocaml/xapi/helpers.ml Outdated Show resolved Hide resolved
Now xapi supports setting up rpc to hosts in the pool and appliances,
while for syncing updates from remote_pool type repository, we need to
set up rpc to remote coordinator with its certificate verfieid.

Add util Helpers.make_external_host_verified_rpc, which will set up a
secure connection to the external host(host outside the pool) with its
host certificate verified.

Signed-off-by: Gang Ji <[email protected]>
@gangj gangj force-pushed the private/gangj/CP-50789 branch from 2da4102 to 9d677cd Compare October 25, 2024 05:38
@psafont
Copy link
Member

psafont commented Oct 25, 2024

I'd like to see the design for the feature, it's not clear to me why is this new verification type needed.

Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

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

Key exchange needs to be understood before they are used in communications.

@gangj
Copy link
Contributor Author

gangj commented Oct 28, 2024

Key exchange needs to be understood before they are used in communications.

The client needs to get the remote pool coordinator's host certificate, and use the certificate to config the remote_pool repository, and then the certificate from the pool's enabled remote_pool repository will be used during pool.sync_updates to connect to the remote pool coordinator securely.

@psafont psafont self-requested a review October 29, 2024 16:02
@gangj gangj merged commit 559821d into xapi-project:feature/easier-pool-join Oct 30, 2024
15 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.

5 participants