From 9afef4a580c15519ea7cddb15b895e30e84d85ca Mon Sep 17 00:00:00 2001 From: erjxsrn Date: Tue, 18 Nov 2025 14:37:16 +0000 Subject: [PATCH 1/5] Removed unused environmental variables --- .../templates/deployment/deployment.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/charts/eric-oss-hello-world-python-app/templates/deployment/deployment.yaml b/charts/eric-oss-hello-world-python-app/templates/deployment/deployment.yaml index a50b737..5eb87d6 100644 --- a/charts/eric-oss-hello-world-python-app/templates/deployment/deployment.yaml +++ b/charts/eric-oss-hello-world-python-app/templates/deployment/deployment.yaml @@ -111,10 +111,6 @@ spec: mountPath: {{ index .Values "clientCredsMountPath" | default .Values.instantiationDefaults.clientCredsMountPath | quote }} readOnly: true env: - - name: IAM_CLIENT_ID - value: {{ index .Values "clientId" | quote }} - - name: IAM_CLIENT_SECRET - value: {{ index .Values "clientSecret" | quote }} - name: EIC_HOST_URL value: {{ index .Values "eicHostUrl" | quote }} - name: LOG_ENDPOINT From 0fd7aa0d3f4686b1fc544fe9fbc313f6ef6c55a9 Mon Sep 17 00:00:00 2001 From: erjxsrn Date: Tue, 18 Nov 2025 14:50:49 +0000 Subject: [PATCH 2/5] Modified testcases and the config file --- eric-oss-hello-world-python-app/config.py | 4 ---- eric-oss-hello-world-python-app/tests/conftest.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/eric-oss-hello-world-python-app/config.py b/eric-oss-hello-world-python-app/config.py index 5122923..39a7e9a 100644 --- a/eric-oss-hello-world-python-app/config.py +++ b/eric-oss-hello-world-python-app/config.py @@ -5,8 +5,6 @@ def get_config(): """get env and return config with all env vals required""" - iam_client_id = get_os_env_string("IAM_CLIENT_ID", "") - iam_client_secret = get_os_env_string("IAM_CLIENT_SECRET", "") eic_host_url = get_os_env_string("EIC_HOST_URL", "") ca_cert_file_name = get_os_env_string("CA_CERT_FILE_NAME", "") ca_cert_file_path = get_os_env_string("CA_CERT_FILE_PATH", "") @@ -19,8 +17,6 @@ def get_config(): client_id_file_name = get_os_env_string("CLIENT_ID_FILE_NAME", "") config = { - "iam_client_id": iam_client_id, - "iam_client_secret": iam_client_secret, "eic_host_url": eic_host_url, "ca_cert_file_name": ca_cert_file_name, "ca_cert_file_path": ca_cert_file_path, diff --git a/eric-oss-hello-world-python-app/tests/conftest.py b/eric-oss-hello-world-python-app/tests/conftest.py index 372472a..93ada77 100644 --- a/eric-oss-hello-world-python-app/tests/conftest.py +++ b/eric-oss-hello-world-python-app/tests/conftest.py @@ -27,7 +27,6 @@ def match_request_data(request): for parameter in [ "grant_type=client_credentials", "tenant_id=master", - "client_id=IAM_CLIENT_ID", ] ] ) @@ -37,8 +36,6 @@ def match_request_data(request): for parameter in [ "grant_type=client_credentials", "tenant_id=master", - "client_id=IAM_CLIENT_ID", - "client_secret=IAM_CLIENT_SECRET", ] ] ) @@ -109,8 +106,6 @@ def no_log_certs(): def populate_environment_variables(): - os.environ["IAM_CLIENT_ID"] = "IAM_CLIENT_ID" - os.environ["IAM_CLIENT_SECRET"] = "IAM_CLIENT_SECRET" os.environ["EIC_HOST_URL"] = "https://www.eic-host-url.com" os.environ["CA_CERT_FILE_NAME"] = "CA_CERT_FILE_NAME" os.environ["CA_CERT_FILE_PATH"] = "CA_CERT_MOUNT_PATH" From ded03c16e9f5db73585a302808860f58380dfafd Mon Sep 17 00:00:00 2001 From: erjxsrn Date: Tue, 18 Nov 2025 15:41:07 +0000 Subject: [PATCH 3/5] Reverted test files --- eric-oss-hello-world-python-app/tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eric-oss-hello-world-python-app/tests/conftest.py b/eric-oss-hello-world-python-app/tests/conftest.py index 93ada77..372472a 100644 --- a/eric-oss-hello-world-python-app/tests/conftest.py +++ b/eric-oss-hello-world-python-app/tests/conftest.py @@ -27,6 +27,7 @@ def match_request_data(request): for parameter in [ "grant_type=client_credentials", "tenant_id=master", + "client_id=IAM_CLIENT_ID", ] ] ) @@ -36,6 +37,8 @@ def match_request_data(request): for parameter in [ "grant_type=client_credentials", "tenant_id=master", + "client_id=IAM_CLIENT_ID", + "client_secret=IAM_CLIENT_SECRET", ] ] ) @@ -106,6 +109,8 @@ def no_log_certs(): def populate_environment_variables(): + os.environ["IAM_CLIENT_ID"] = "IAM_CLIENT_ID" + os.environ["IAM_CLIENT_SECRET"] = "IAM_CLIENT_SECRET" os.environ["EIC_HOST_URL"] = "https://www.eic-host-url.com" os.environ["CA_CERT_FILE_NAME"] = "CA_CERT_FILE_NAME" os.environ["CA_CERT_FILE_PATH"] = "CA_CERT_MOUNT_PATH" From f5b438d51a52a7175c704add518ad8af217885bb Mon Sep 17 00:00:00 2001 From: erjxsrn Date: Wed, 19 Nov 2025 14:56:50 +0000 Subject: [PATCH 4/5] Removed unused testcase Signed-off-by: erjxsrn --- eric-oss-hello-world-python-app/tests/conftest.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/eric-oss-hello-world-python-app/tests/conftest.py b/eric-oss-hello-world-python-app/tests/conftest.py index 372472a..02038ff 100644 --- a/eric-oss-hello-world-python-app/tests/conftest.py +++ b/eric-oss-hello-world-python-app/tests/conftest.py @@ -31,18 +31,7 @@ def match_request_data(request): ] ] ) - uses_legacy = all( - [ - parameter in request.text - for parameter in [ - "grant_type=client_credentials", - "tenant_id=master", - "client_id=IAM_CLIENT_ID", - "client_secret=IAM_CLIENT_SECRET", - ] - ] - ) - return uses_x509 or uses_legacy + return uses_x509 @pytest.fixture(name="mock_login_api") From 89ebc5a477312d6a970ace648a7fb8485e437250 Mon Sep 17 00:00:00 2001 From: erjxsrn Date: Thu, 20 Nov 2025 13:20:59 +0000 Subject: [PATCH 5/5] Removed unused code --- eric-oss-hello-world-python-app/tests/conftest.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/eric-oss-hello-world-python-app/tests/conftest.py b/eric-oss-hello-world-python-app/tests/conftest.py index 02038ff..d0b60bb 100644 --- a/eric-oss-hello-world-python-app/tests/conftest.py +++ b/eric-oss-hello-world-python-app/tests/conftest.py @@ -98,8 +98,6 @@ def no_log_certs(): def populate_environment_variables(): - os.environ["IAM_CLIENT_ID"] = "IAM_CLIENT_ID" - os.environ["IAM_CLIENT_SECRET"] = "IAM_CLIENT_SECRET" os.environ["EIC_HOST_URL"] = "https://www.eic-host-url.com" os.environ["CA_CERT_FILE_NAME"] = "CA_CERT_FILE_NAME" os.environ["CA_CERT_FILE_PATH"] = "CA_CERT_MOUNT_PATH"