Files
test/config/security/objects/security_config.py
Thomas Sunil c3c5c1fb23 Add HTTPS and HTTP ingress routing tests with cert validation
- Added tests for HTTP and HTTPS ingress routing with path-based rules
    - HTTPS test includes TLS cert creation, secret setup, and issuer validation
    - Introduced supporting keywords for secrets, namespaces, and OpenSSL operations

Change-Id: I2f22ebdc3cce709d31d7fbc266ef00e12647a9ec
Signed-off-by: Thomas Sunil <sunil.thomas@windriver.com>
2025-05-08 12:56:51 -04:00

48 lines
1.1 KiB
Python

import json5
class SecurityConfig:
"""
Class to hold configuration for Security tests
"""
def __init__(self, config):
try:
json_data = open(config)
except FileNotFoundError:
print(f"Could not find the security config file: {config}")
raise
security_dict = json5.load(json_data)
self.dns_name = security_dict["dns_name"]
self.stepca_server_url = security_dict["stepca_server_url"]
self.stepca_server_issuer = security_dict["stepca_server_issuer"]
def get_dns_name(self) -> str:
"""
Getter for the dns name
Returns:
str: the dns name
"""
return self.dns_name
def get_stepca_server_url(self) -> str:
"""
Getter for the stepca server url
Returns:
str: stepca server url
"""
return self.stepca_server_url
def get_stepca_server_issuer(self) -> str:
"""
Getter for the stepca server issuer
Returns:
str: stepca server url
"""
return self.stepca_server_issuer