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

Make the whole RPC Connection on SSL #7

Merged
merged 15 commits into from Feb 8, 2017
Merged

Conversation

Belphemur
Copy link
Contributor

Everything now use SSL.

Antoine Aflalo added 7 commits January 31, 2017 14:41
Add warnings
Xenserver use self-signed certificates
Scripts only works in SSL mode now
Fix finding the reference of a SR/VM/...
Also add informations about tasks
@djamps
Copy link
Owner

djamps commented Feb 1, 2017

Hi,

Could you clarify exactly what was done with the subroutines in 58fb1ee ? I'm having a hard time following. Also, have you compared throughput between SSL/non-SSL? I am thinking it might be a good idea to be able to toggle SSL for those using local/secure networks for throughput reasons. Thanks.

Shouldn't have been deleted
@Belphemur
Copy link
Contributor Author

Belphemur commented Feb 1, 2017

Hello,

You're right, the subroutine shouldn't have been deleted. I re-added them.
What I had to change was the way the get_ref was working.

The get_record_by_XXX doesn't seem to work on Xen Server 6.2, it was always returning no result instead of the wanted VM.
I found the grep code in the latest version of the Xen::API lib you're using. I'm gathering all the records for the wanted resource, then filter it to only keep the wanted one where either the name_label matches or the uuid or the reference.

In this day and age, SSL should be the default, all the Xen are running the stunnel to provide SSL, the overhead is only for the connection and for this kind of application shouldn't influence the throughput.

@Belphemur
Copy link
Contributor Author

I disabled by default the use of SSL for the transfer itself, only use it for the RPC connection (which send the password).

This way, we gain some security for the credentials and basic commands, but keep the normal speed for the transfer itself.

it's the new -ssl flag that can be use to make the transfer use SSL.

@Belphemur
Copy link
Contributor Author

Belphemur commented Feb 7, 2017 via email

@djamps
Copy link
Owner

djamps commented Feb 7, 2017

Sounds good - let me know when you feel you are ready and I'll merge.

@Belphemur
Copy link
Contributor Author

It's ready for merging, we used it at my workplace in production, and it worked the way it's intended.

I would maybe advise adding a warning about doing the transfer in SSL; you can also grab the binary for 64bits on my repo (build on XenServer 7): https://github.com/Belphemur/migrate-vm/releases

Cheers

@djamps djamps merged commit 93f8cc6 into djamps:master Feb 8, 2017
@djamps
Copy link
Owner

djamps commented Feb 8, 2017

Thanks for the commits! They are now merged!

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.

None yet

2 participants