diff --git a/Makefile b/Makefile index 93e4420e..cdd39bbf 100644 --- a/Makefile +++ b/Makefile @@ -58,8 +58,8 @@ install_requirements: install_piptools requirements .PHONY: requirements requirements: install_piptools - pip-compile --resolver=backtracking requirements*.in -o requirements-all.txt - pip-compile --resolver=backtracking requirements.in + pip-compile --strip-extras --resolver=backtracking requirements*.in -o requirements-all.txt + pip-compile --strip-extras --resolver=backtracking requirements.in .PHONY: write_version write_version: diff --git a/buildpack/core/runtime.py b/buildpack/core/runtime.py index a1caf9b9..b2c5e367 100644 --- a/buildpack/core/runtime.py +++ b/buildpack/core/runtime.py @@ -41,14 +41,18 @@ def is_version_supported(version): def is_version_maintained(version): # LTS / MTS versions: https://docs.mendix.com/releasenotes/studio-pro/lts-mts - if version.major == 7 and version.minor == 23: - return True if version.major == 8 and version.minor == 18: return True if version.major == 9 and version.minor == 24: return True if version.major == 10 and version.minor == 6: return True + if version.major == 10 and version.minor == 12: + return True + if version.major == 10 and version.minor == 18: + return True + if version.major == 10 and version.minor == 21: + return True return False diff --git a/buildpack/util.py b/buildpack/util.py index 74f7e4ee..1c4cb6c1 100644 --- a/buildpack/util.py +++ b/buildpack/util.py @@ -581,7 +581,7 @@ def _upsert_config(config, key, value, overwrite=False, append=False): if not append and overwrite: config[key] = value else: - if append and type(config[key]) == type(value): + if append and type(config[key]) is type(value): if isinstance(value, list): config[key].extend(value) elif isinstance(value, (dict, set)): diff --git a/me-central-1-bundle.pem b/me-central-1-bundle.pem deleted file mode 100644 index c42437f1..00000000 --- a/me-central-1-bundle.pem +++ /dev/null @@ -1,76 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEBDCCAuygAwIBAgIQUfVbqapkLYpUqcLajpTJWzANBgkqhkiG9w0BAQsFADCB -mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu -Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB -bW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KIcXPqCoxIJ7lJbbzmuf73gQu5 ------END CERTIFICATE----- diff --git a/net-additions.diff b/net-additions.diff deleted file mode 100644 index c42437f1..00000000 --- a/net-additions.diff +++ /dev/null @@ -1,76 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEBDCCAuygAwIBAgIQUfVbqapkLYpUqcLajpTJWzANBgkqhkiG9w0BAQsFADCB -mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu -Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB -bWF6b24gUkRTIG1lLWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV -BAcMB1NlYXR0bGUwIBcNMjIwNTA2MjMyMDA5WhgPMjA2MjA1MDcwMDIwMDlaMIGa -MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j -LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt -YXpvbiBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE -BwwHU2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJIeovu3 -ewI9FVitXMQzvkh34aQ6WyI4NO3YepfJaePiv3cnyFGYHN2S1cR3UQcLWgypP5va -j6bfroqwGbCbZZcb+6cyOB4ceKO9Ws1UkcaGHnNDcy5gXR7aCW2OGTUfinUuhd2d -5bOGgV7JsPbpw0bwJ156+MwfOK40OLCWVbzy8B1kITs4RUPNa/ZJnvIbiMu9rdj4 -8y7GSFJLnKCjlOFUkNI5LcaYvI1+ybuNgphT3nuu5ZirvTswGakGUT/Q0J3dxP0J -pDfg5Sj/2G4gXiaM0LppVOoU5yEwVewhQ250l0eQAqSrwPqAkdTg9ng360zqCFPE -JPPcgI1tdGUgneECAwEAAa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zg+IHdi9Y3L7ziQnHWI6yjBazvnKD+oC71aRRlR8b5YXsYGUQxWzPLHN7EGPcSGv -bzA9SLG1KQYCJaQ0m9Eg/iGrwKWOgylbhVw0bCxoo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MB0GA1UdDgQWBBS4KsknsJXM9+QPEkBdZxUPaLr11zAOBgNVHQ8BAf8EBAMC -AYYwCgYIKoZIzj0EAwMDaAAwZQIxAJaRgrYIEfXQMZQQDxMTYS0azpyWSseQooXo -L3nYq4OHGBgYyQ9gVjvRYWU85PXbfgIwdi82DtANQFkCu+j+BU0JBY/uRKPEeYzo -JG92igKIcXPqCoxIJ7lJbbzmuf73gQu5 ------END CERTIFICATE----- diff --git a/requirements-dev.in b/requirements-dev.in index 5324adc6..22b7c061 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,11 +1,10 @@ click==8.1.7 -idna==3.7 -pytest==8.2.2 +idna==3.8 +pytest==8.3.3 pytest-timer==1.0.0 pytest-timeout==2.3.1 -pylint==3.2.3 -pyopenssl==24.0.0 +pylint==3.2.7 randomname==0.2.1 requests-mock==1.12.1 -ruff==0.4.8 +ruff==0.6.4 parameterized==0.9.0 diff --git a/requirements.in b/requirements.in index 2ee88aca..2da292b5 100644 --- a/requirements.in +++ b/requirements.in @@ -1,11 +1,11 @@ backoff==2.2.1 -certifi==2024.7.4 -cryptography==42.0.8 +certifi==2024.8.30 +cryptography==43.0.1 distro==1.9.0 httplib2==0.22.0 jinja2==3.1.4 omegaconf==2.3.0 psycopg2-binary==2.9.9 -pyyaml==6.0.1 +pyyaml==6.0.2 requests==2.32.3 -urllib3==2.2.1 +urllib3==2.2.3 diff --git a/requirements.txt b/requirements.txt index 315f0c32..02ceb37f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,13 +2,13 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile requirements.in +# pip-compile --strip-extras requirements.in # antlr4-python3-runtime==4.9.3 # via omegaconf backoff==2.2.1 # via -r requirements.in -certifi==2024.7.4 +certifi==2024.8.30 # via # -r requirements.in # requests @@ -16,7 +16,7 @@ cffi==1.14.4 # via cryptography charset-normalizer==2.0.3 # via requests -cryptography==42.0.8 +cryptography==43.0.1 # via -r requirements.in distro==1.9.0 # via -r requirements.in @@ -36,13 +36,13 @@ pycparser==2.20 # via cffi pyparsing==2.4.7 # via httplib2 -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements.in # omegaconf requests==2.32.3 # via -r requirements.in -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements.in # requests diff --git a/tests/integration/test_certificate_authorities.py b/tests/integration/test_certificate_authorities.py index 379e75a1..543ee96a 100644 --- a/tests/integration/test_certificate_authorities.py +++ b/tests/integration/test_certificate_authorities.py @@ -1,7 +1,11 @@ import base64 +from datetime import datetime, timedelta from socket import gethostname -from OpenSSL import crypto +from cryptography import x509 +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import rsa +from cryptography.x509.oid import NameOID from tests.integration import basetest @@ -15,28 +19,40 @@ def setUp(self): self.certificate = self._create_self_signed_cert() def _create_self_signed_cert(self): + # Generate a private key + private_key = rsa.generate_private_key( + public_exponent=65537, + key_size=2048, + ) + + # Create a self-signed certificate + subject = issuer = x509.Name([ + x509.NameAttribute(NameOID.COUNTRY_NAME, "NL"), + x509.NameAttribute(NameOID.STATE_OR_PROVINCE_NAME, "Rotterdam"), + x509.NameAttribute(NameOID.LOCALITY_NAME, "Rotterdam"), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, "Mendix"), + x509.NameAttribute(NameOID.ORGANIZATIONAL_UNIT_NAME, "Mendix"), + x509.NameAttribute(NameOID.COMMON_NAME, gethostname()), + ]) + cert = x509.CertificateBuilder().subject_name( + subject + ).issuer_name( + issuer + ).public_key( + private_key.public_key() + ).serial_number( + 1000 + ).not_valid_before( + datetime.utcnow() + ).not_valid_after( + datetime.utcnow() + timedelta(days=365*10) + ).add_extension( + x509.BasicConstraints(ca=True, path_length=None), critical=True, + ).sign(private_key, hashes.SHA256()) + + cert_pem = cert.public_bytes(serialization.Encoding.PEM) - # Create a key pair - k = crypto.PKey() - k.generate_key(crypto.TYPE_RSA, 1024) - - # Create a self-signed cert - cert = crypto.X509() - cert.get_subject().C = "NL" - cert.get_subject().ST = "Rotterdam" - cert.get_subject().L = "Rotterdam" - cert.get_subject().O = "Mendix" # noqa: E741 - cert.get_subject().OU = "Mendix" - cert.get_subject().CN = gethostname() - cert.set_serial_number(1000) - cert.gmtime_adj_notBefore(0) - cert.gmtime_adj_notAfter(10 * 365 * 24 * 60 * 60) - cert.set_issuer(cert.get_subject()) - cert.set_pubkey(k) - cert.sign(k, "sha1") - - # Return a .PEM certificate - return crypto.dump_certificate(crypto.FILETYPE_PEM, cert) + return cert_pem def test_certificate_authorities(self): self.stage_container( diff --git a/tests/unit/test_deprecations.py b/tests/unit/test_deprecations.py index 78940d31..03179d21 100644 --- a/tests/unit/test_deprecations.py +++ b/tests/unit/test_deprecations.py @@ -27,10 +27,8 @@ def test_mx7_supported(self): class TestCaseMxMaintained(TestCase): - def test_mx7_maintained(self): - assert runtime.is_version_maintained(MXVersion("7.23.1")) - def test_mx7_not_maintained(self): + assert not runtime.is_version_maintained(MXVersion("7.23.1")) assert not runtime.is_version_maintained(MXVersion("7.16")) def test_mx8_maintained(self): @@ -49,6 +47,9 @@ def test_mx9_not_maintained(self): def test_mx10_maintained(self): assert runtime.is_version_maintained(MXVersion("10.6.1")) + assert runtime.is_version_maintained(MXVersion("10.12.1")) + assert runtime.is_version_maintained(MXVersion("10.18.1")) + assert runtime.is_version_maintained(MXVersion("10.21.1")) def test_mx10_not_maintained(self): assert not runtime.is_version_maintained(MXVersion("10.5.1")) diff --git a/tests/unit/test_runtime_configuration.py b/tests/unit/test_runtime_configuration.py index 5288b4a6..bf8cacd3 100644 --- a/tests/unit/test_runtime_configuration.py +++ b/tests/unit/test_runtime_configuration.py @@ -1,13 +1,19 @@ import base64 import json import os +from datetime import datetime, timedelta from socket import gethostname from unittest import TestCase, mock +from cryptography import x509 +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import rsa +from cryptography.hazmat.primitives.serialization import pkcs12 +from cryptography.x509.oid import NameOID + from buildpack import util from buildpack.core import runtime, security from lib.m2ee.version import MXVersion -from OpenSSL import crypto class M2EEMock: @@ -87,34 +93,49 @@ def test_custom_runtime_setting_is_set(self): ) -def _create_self_signed_cert(): - # Create a key pair - k = crypto.PKey() - k.generate_key(crypto.TYPE_RSA, 1024) - - # Create a self-signed cert - cert = crypto.X509() - cert.get_subject().C = "NL" - cert.get_subject().ST = "Rotterdam" - cert.get_subject().L = "Rotterdam" - cert.get_subject().O = "Mendix" # noqa: E741 - cert.get_subject().OU = "Mendix" - cert.get_subject().CN = gethostname() - cert.set_serial_number(1000) - cert.gmtime_adj_notBefore(0) - cert.gmtime_adj_notAfter(10 * 365 * 24 * 60 * 60) - cert.set_issuer(cert.get_subject()) - cert.set_pubkey(k) - cert.sign(k, "sha1") - - # Create a P12 container - p12 = crypto.PKCS12() - p12.set_certificate(cert) - - return p12.export() +class TestClientCertificateConfiguration(TestCase): + def _create_self_signed_cert(): # pylint: disable=no-method-argument + # Generate a private key + private_key = rsa.generate_private_key( + public_exponent=65537, + key_size=2048, + ) + # Create a self-signed certificate + subject = issuer = x509.Name([ + x509.NameAttribute(NameOID.COUNTRY_NAME, "NL"), + x509.NameAttribute(NameOID.STATE_OR_PROVINCE_NAME, "Rotterdam"), + x509.NameAttribute(NameOID.LOCALITY_NAME, "Rotterdam"), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, "Mendix"), + x509.NameAttribute(NameOID.ORGANIZATIONAL_UNIT_NAME, "Mendix"), + x509.NameAttribute(NameOID.COMMON_NAME, gethostname()), + ]) + cert = x509.CertificateBuilder().subject_name( + subject + ).issuer_name( + issuer + ).public_key( + private_key.public_key() + ).serial_number( + 1000 + ).not_valid_before( + datetime.utcnow() + ).not_valid_after( + datetime.utcnow() + timedelta(days=365*10) + ).add_extension( + x509.BasicConstraints(ca=True, path_length=None), critical=True, + ).sign(private_key, hashes.SHA256()) + + # Serialize private key and certificate to a PKCS12 container + p12 = pkcs12.serialize_key_and_certificates( + name=b"selfsigned", + key=private_key, + cert=cert, + cas=None, + encryption_algorithm=serialization.NoEncryption() + ) -class TestClientCertificateConfiguration(TestCase): + return p12 CERTIFICATE_ENV = { "CLIENT_CERTIFICATES": json.dumps(