From 33a358e25220b59a11c9a97180173ac62400f9c1 Mon Sep 17 00:00:00 2001 From: Louis Royer Date: Wed, 10 Jul 2024 14:15:39 +0200 Subject: [PATCH] Add certs to UDR --- README.md | 3 +++ udr/template-script.sh | 6 ++++++ udr/template-udr.yaml | 6 +++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30af3e0..1546e12 100644 --- a/README.md +++ b/README.md @@ -448,6 +448,9 @@ environment: SBI_BINDING_IP: "198.51.100.8" # use only an IP address in this field SBI_BINDING_PORT: "8000" # default: "8000" NRF: "nrf.sbi:8000" + NRF_PEM: cert/nrf.pem + UDR_PEM: cert/udr.pem + UDR_KEY: cert/udr.key ``` ### UPF diff --git a/udr/template-script.sh b/udr/template-script.sh index 899d291..b04c4f4 100755 --- a/udr/template-script.sh +++ b/udr/template-script.sh @@ -32,6 +32,9 @@ awk \ -v SBI_BINDING_IP="${SBI_BINDING_IP}" \ -v SBI_BINDING_PORT="${SBI_BINDING_PORT:-8000}" \ -v NRF="${NRF}" \ + -v NRF_PEM="${NRF_PEM:-cert/nrf.pem}" \ + -v UDR_PEM="${UDR_PEM:-cert/udr.pem}" \ + -v UDR_KEY="${UDR_KEY:-cert/udr.key}" \ '{ sub(/%MONGO_HOST/, MONGO_HOST); sub(/%MONGO_PORT/, MONGO_PORT); @@ -40,6 +43,9 @@ awk \ sub(/%SBI_BINDING_IP/, SBI_BINDING_IP); sub(/%SBI_BINDING_PORT/, SBI_BINDING_PORT); sub(/%NRF/, NRF); + sub(/%NRF_PEM/, NRF_PEM); + sub(/%UDR_PEM/, UDR_PEM); + sub(/%UDR_KEY/, UDR_KEY); print; }' \ "${CONFIG_TEMPLATE}" > "${CONFIG_FILE}" diff --git a/udr/template-udr.yaml b/udr/template-udr.yaml index 4cf1460..1a51f36 100644 --- a/udr/template-udr.yaml +++ b/udr/template-udr.yaml @@ -9,14 +9,14 @@ configuration: bindingIPv4: %SBI_BINDING_IP # IP used to bind the service port: %SBI_BINDING_PORT # port used to bind the service tls: # the local path of TLS key - pem: cert/udr.pem # UDR TLS Certificate - key: cert/udr.key # UDR TLS Private key + pem: %UDR_PEM # UDR TLS Certificate + key: %UDR_KEY # UDR TLS Private key dbConnectorType: mongodb mongodb: name: %MONGO_NAME # Database name in MongoDB url: mongodb://%MONGO_HOST:%MONGO_PORT # URL of MongoDB nrfUri: http://%NRF # a valid URI of NRF - nrfCertPem: cert/nrf.pem # NRF Certificate + nrfCertPem: %NRF_PEM # NRF Certificate logger: # log output setting enable: true # true or false