Skip to content

Commit

Permalink
Add certs to UDR
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Jul 10, 2024
1 parent 4683da3 commit 33a358e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions udr/template-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}"
6 changes: 3 additions & 3 deletions udr/template-udr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33a358e

Please sign in to comment.