-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for FTP and FTP over TLS (#4834)
Use Python's ftplib to connect to and read instance configurations from a remove server. Like the current http support, nocloud's configuration URI is defined via kernel command line or dmi product serial. Notes on FTP and FTP over TLS ============================= FTP is insecure, use at your own risk. The FTP over TLS implementation follows library best practices[1][2]. From the ssl documentation regarding create_default_context(): > It will load the system’s trusted CA certificates, enable certificate > validation and hostname checking, and try to choose reasonably secure > protocol and cipher settings. Test Changes ============ tests/i/util.py --------------- - new helper function verify_clean_boot() to verify cloud-init state - acquire override_kernel_cmdline() for reuse in other tests - acquire restart_cloud_init() for reuse in other tests tests/i/datasources/test_nocloud.py ----------------------------------- - new test class for FTP/FTPS uses pyftpdlib for server, mkcert for test certs - 2 test additions for FTP - 2 test additions for FTPS Implements via ftplib ===================== RFC 959 - File Transfer Protocol RFC 2640 - FTP Internationalization (UTF-8) RFC 4217 - FTP over TLS [1] https://docs.python.org/3/library/ftplib.html#ftp-tls-objects [2] https://docs.python.org/3/library/ssl.html#ssl-security
- Loading branch information
Showing
9 changed files
with
653 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.