From acbfe23bd4666b52977f032c46db7b7bed56e92b Mon Sep 17 00:00:00 2001
From: Neil-Jocelyn Schark <neil.schark@h-da.de>
Date: Thu, 25 Apr 2024 15:51:19 +0000
Subject: [PATCH] renamed with regewx (risky!!!)

---
 README.md                                           |   2 +-
 config/configure-and-run-docker-playground.sh       |  12 ++++++------
 config/goKMS/example01.yaml                         |  10 +++++-----
 config/goKMS/example02.yaml                         |  10 +++++-----
 config/goKMS/example03.yaml                         |  10 +++++-----
 config/goKMS/example04.yaml                         |  10 +++++-----
 config/goKMS/generate-kms-certs.sh                  |  10 +++++-----
 config/goKMS/tlsConfigs/ekms01ReqConfig.txt         |   4 ++--
 config/goKMS/tlsConfigs/ekms02ReqConfig.txt         |   4 ++--
 config/goKMS/tlsConfigs/ekms03ReqConfig.txt         |   4 ++--
 config/goKMS/tlsConfigs/ekms04ReqConfig.txt         |   4 ++--
 debug_configs/config/kms/generate-debug-certs.sh    |   8 ++++----
 debug_configs/config/kms/kms_1.yaml                 |   4 ++--
 debug_configs/config/kms/kms_2.yaml                 |   4 ++--
 etsi014/buf.gen.yaml                                |   2 +-
 ...gosdn-ekms-example.mp4 => gosdn-kms-example.mp4} | Bin
 goKMS/Dockerfile.debug                              |   6 +++---
 17 files changed, 52 insertions(+), 52 deletions(-)
 rename figures/{gosdn-ekms-example.mp4 => gosdn-kms-example.mp4} (100%)

diff --git a/README.md b/README.md
index 71dd6c06..8d2b5eb4 100644
--- a/README.md
+++ b/README.md
@@ -214,7 +214,7 @@ configure goKMS. Therefore a small lab is provided.
 Below is a short demo video of this setup in combination with the
 [goSDN-Controller](https://code.fbi.h-da.de/danet/gosdn).
 
-![](figures/gosdn-ekms-example.mp4)
+![](figures/gosdn-kms-example.mp4)
 
 ## Contributing
 
diff --git a/config/configure-and-run-docker-playground.sh b/config/configure-and-run-docker-playground.sh
index 67a6b310..dfcc87a7 100755
--- a/config/configure-and-run-docker-playground.sh
+++ b/config/configure-and-run-docker-playground.sh
@@ -1,14 +1,14 @@
 #! /bin/sh
 
 sleep 2
-gnmic -a "172.100.20.13:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/ekms03-a.json
-gnmic -a "172.100.20.12:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/ekms02-a.json
-gnmic -a "172.100.20.10:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/ekms01-a.json
+gnmic -a "172.100.20.13:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/kms03-a.json
+gnmic -a "172.100.20.12:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/kms02-a.json
+gnmic -a "172.100.20.10:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]' --update-file ./config/kms01-a.json
 
 sleep 2
-gnmic -a "172.100.20.13:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/ekms03-b.json
-gnmic -a "172.100.20.11:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/ekms02-b.json
-gnmic -a "172.100.20.10:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/ekms01-b.json
+gnmic -a "172.100.20.13:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/kms03-b.json
+gnmic -a "172.100.20.11:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/kms02-b.json
+gnmic -a "172.100.20.10:7030" -u admin -p admin --insecure -e JSON_IETF set --update-path 'key-routing-sessions/routing-sessions[path-id=f6a575e5-c7f9-4765-8890-134ae5b8f451]' --update-file ./config/kms01-b.json
 
 
 sleep 2
diff --git a/config/goKMS/example01.yaml b/config/goKMS/example01.yaml
index 5798168e..707ebc42 100644
--- a/config/goKMS/example01.yaml
+++ b/config/goKMS/example01.yaml
@@ -1,5 +1,5 @@
 Id: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
-Name: ekms01
+Name: kms01
 InterComAddr: 172.100.20.10:50910
 QuantumAddr: 172.100.20.10:50911
 GRPCAddr: 172.100.20.10:50900
@@ -8,10 +8,10 @@ AkmsCkmsServerPort: "9696"
 TLS: true
 ETSI14TLS: true
 CAFile: "ssl/ca.crt"
-CertFile: "ssl/ekms/ekms1-selfsigned.crt"
-KeyFile: "ssl/ekms/ekms1-selfsigned.key"
+CertFile: "ssl/kms/kms1-selfsigned.crt"
+KeyFile: "ssl/kms/kms1-selfsigned.key"
 Peers:
-  # peer to ekms02
+  # peer to kms02
   - PeerId: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
     PeerInterComAddr: 172.100.20.11:50910
     Sync: true
@@ -20,7 +20,7 @@ Peers:
     QuantumModule:
       Type: emulated
       Address: 172.100.20.14
-  # peer to ekms03
+  # peer to kms03
   - PeerId: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
     PeerInterComAddr: 172.100.20.12:50910
     Sync: false
diff --git a/config/goKMS/example02.yaml b/config/goKMS/example02.yaml
index 8b76cb8b..a6fca311 100644
--- a/config/goKMS/example02.yaml
+++ b/config/goKMS/example02.yaml
@@ -1,15 +1,15 @@
 Id: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
-Name: ekms02
+Name: kms02
 InterComAddr: 172.100.20.11:50910
 QuantumAddr: 172.100.20.11:50911
 GRPCAddr: 172.100.20.11:50900
 TLS: true
 ETSI14TLS: true
 CAFile: "ssl/ca.crt"
-CertFile: "ssl/ekms/ekms2-selfsigned.crt"
-KeyFile: "ssl/ekms/ekms2-selfsigned.key"
+CertFile: "ssl/kms/kms2-selfsigned.crt"
+KeyFile: "ssl/kms/kms2-selfsigned.key"
 Peers:
-  # peer to ekms01
+  # peer to kms01
   - PeerId: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
     PeerInterComAddr: 172.100.20.10:50910
     Sync: false
@@ -18,7 +18,7 @@ Peers:
     QuantumModule:
       Type: emulated
       Address: 172.100.20.15
-  # peer to ekms04
+  # peer to kms04
   - PeerId: "968fd594-b0e7-41f0-ba4b-de259047a933"
     PeerInterComAddr: 172.100.20.13:50910
     Sync: true
diff --git a/config/goKMS/example03.yaml b/config/goKMS/example03.yaml
index 4b8845e4..046b1056 100644
--- a/config/goKMS/example03.yaml
+++ b/config/goKMS/example03.yaml
@@ -1,15 +1,15 @@
 Id: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
-Name: ekms03
+Name: kms03
 InterComAddr: 172.100.20.12:50910
 QuantumAddr: 172.100.20.12:50911
 GRPCAddr: 172.100.20.12:50900
 TLS: true
 ETSI14TLS: true
 CAFile: "ssl/ca.crt"
-CertFile: "ssl/ekms/ekms3-selfsigned.crt"
-KeyFile: "ssl/ekms/ekms3-selfsigned.key"
+CertFile: "ssl/kms/kms3-selfsigned.crt"
+KeyFile: "ssl/kms/kms3-selfsigned.key"
 Peers:
-  # peer to ekms01
+  # peer to kms01
   - PeerId: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
     PeerInterComAddr: 172.100.20.10:50910
     Sync: true
@@ -18,7 +18,7 @@ Peers:
     QuantumModule:
       Type: emulated
       Address: 172.100.20.19
-  # peer to ekms04
+  # peer to kms04
   - PeerId: "968fd594-b0e7-41f0-ba4b-de259047a933"
     PeerInterComAddr: 172.100.20.13:50910
     Sync: true
diff --git a/config/goKMS/example04.yaml b/config/goKMS/example04.yaml
index 7f07c0db..76a58699 100644
--- a/config/goKMS/example04.yaml
+++ b/config/goKMS/example04.yaml
@@ -1,5 +1,5 @@
 Id: "968fd594-b0e7-41f0-ba4b-de259047a933"
-Name: ekms04
+Name: kms04
 InterComAddr: 172.100.20.13:50910
 QuantumAddr: 172.100.20.13:50911
 GRPCAddr: 172.100.20.13:50900
@@ -8,10 +8,10 @@ AkmsCkmsServerPort: "9696"
 TLS: true
 ETSI14TLS: true
 CAFile: "ssl/ca.crt"
-CertFile: "ssl/ekms/ekms4-selfsigned.crt"
-KeyFile: "ssl/ekms/ekms4-selfsigned.key"
+CertFile: "ssl/kms/kms4-selfsigned.crt"
+KeyFile: "ssl/kms/kms4-selfsigned.key"
 Peers:
-  # peer to ekms02
+  # peer to kms02
   - PeerId: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
     PeerInterComAddr: 172.100.20.11:50910
     Sync: false
@@ -20,7 +20,7 @@ Peers:
     QuantumModule:
       Type: emulated
       Address: 172.100.20.17
-  # peer to ekms03
+  # peer to kms03
   - PeerId: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
     PeerInterComAddr: 172.100.20.12:50910
     Sync: false
diff --git a/config/goKMS/generate-kms-certs.sh b/config/goKMS/generate-kms-certs.sh
index dcb2b0b2..85a95e4b 100755
--- a/config/goKMS/generate-kms-certs.sh
+++ b/config/goKMS/generate-kms-certs.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 dirPath="artifacts/ssl"
 
-if [ ! -d "${dirPath}/ekms" ]; then
-        mkdir $dirPath/ekms
+if [ ! -d "${dirPath}/kms" ]; then
+        mkdir $dirPath/kms
         counter=1
-		for FILE in ./config/ekms/tlsConfigs/*.txt;
+		for FILE in ./config/kms/tlsConfigs/*.txt;
             	do	openssl req -x509 -nodes -days 365 -newkey rsa:4096 -config $FILE \
 		        -CA $dirPath/ca.crt -CAkey $dirPath/ca.key \
-		        -keyout "$dirPath/ekms/ekms$counter-selfsigned.key" -out "$dirPath/ekms/ekms$counter-selfsigned.crt"; \
-                openssl x509 -in "$dirPath/ekms/ekms$counter-selfsigned.crt" -noout -text
+		        -keyout "$dirPath/kms/kms$counter-selfsigned.key" -out "$dirPath/kms/kms$counter-selfsigned.crt"; \
+                openssl x509 -in "$dirPath/kms/kms$counter-selfsigned.crt" -noout -text
                 counter=$((counter+1));
         done
 	fi
diff --git a/config/goKMS/tlsConfigs/ekms01ReqConfig.txt b/config/goKMS/tlsConfigs/ekms01ReqConfig.txt
index 36758d16..7e04c583 100644
--- a/config/goKMS/tlsConfigs/ekms01ReqConfig.txt
+++ b/config/goKMS/tlsConfigs/ekms01ReqConfig.txt
@@ -7,12 +7,12 @@ prompt = no
 [req_distinguished_name]
 C = DE
 O = H_DA
-CN = ekms01
+CN = kms01
 [v3_req]
 keyUsage = keyEncipherment, dataEncipherment
 extendedKeyUsage = serverAuth, clientAuth
 subjectAltName = @alt_names
 [alt_names]
 IP.1 = 172.100.20.10
-DNS.1 = ekms01
+DNS.1 = kms01
 DNS.2 = kms_1
diff --git a/config/goKMS/tlsConfigs/ekms02ReqConfig.txt b/config/goKMS/tlsConfigs/ekms02ReqConfig.txt
index 5baacdf0..b6bcadaa 100644
--- a/config/goKMS/tlsConfigs/ekms02ReqConfig.txt
+++ b/config/goKMS/tlsConfigs/ekms02ReqConfig.txt
@@ -7,12 +7,12 @@ prompt = no
 [req_distinguished_name]
 C = DE
 O = H_DA
-CN = ekms02
+CN = kms02
 [v3_req]
 keyUsage = keyEncipherment, dataEncipherment
 extendedKeyUsage = serverAuth, clientAuth
 subjectAltName = @alt_names
 [alt_names]
 IP.1 = 172.100.20.11
-DNS.1 = ekms02
+DNS.1 = kms02
 DNS.2 = kms_2
diff --git a/config/goKMS/tlsConfigs/ekms03ReqConfig.txt b/config/goKMS/tlsConfigs/ekms03ReqConfig.txt
index 1406bd28..46bc8d83 100644
--- a/config/goKMS/tlsConfigs/ekms03ReqConfig.txt
+++ b/config/goKMS/tlsConfigs/ekms03ReqConfig.txt
@@ -7,12 +7,12 @@ prompt = no
 [req_distinguished_name]
 C = DE
 O = H_DA
-CN = ekms03
+CN = kms03
 [v3_req]
 keyUsage = keyEncipherment, dataEncipherment
 extendedKeyUsage = serverAuth, clientAuth
 subjectAltName = @alt_names
 [alt_names]
 IP.1 = 172.100.20.12
-DNS.1 = ekms03
+DNS.1 = kms03
 DNS.2 = kms_3
diff --git a/config/goKMS/tlsConfigs/ekms04ReqConfig.txt b/config/goKMS/tlsConfigs/ekms04ReqConfig.txt
index 58e5b79b..136bb824 100644
--- a/config/goKMS/tlsConfigs/ekms04ReqConfig.txt
+++ b/config/goKMS/tlsConfigs/ekms04ReqConfig.txt
@@ -7,12 +7,12 @@ prompt = no
 [req_distinguished_name]
 C = DE
 O = H_DA
-CN = ekms04
+CN = kms04
 [v3_req]
 keyUsage = keyEncipherment, dataEncipherment
 extendedKeyUsage = serverAuth, clientAuth
 subjectAltName = @alt_names
 [alt_names]
 IP.1 = 172.100.20.13
-DNS.1 = ekms04
+DNS.1 = kms04
 DNS.2 = kms_4
diff --git a/debug_configs/config/kms/generate-debug-certs.sh b/debug_configs/config/kms/generate-debug-certs.sh
index 8db4b5fd..cc0cdc0e 100755
--- a/debug_configs/config/kms/generate-debug-certs.sh
+++ b/debug_configs/config/kms/generate-debug-certs.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 dirPath="artifacts/ssl"
 
-if [ ! -d "${dirPath}/debug-ekms" ]; then
-        mkdir $dirPath/debug-ekms
+if [ ! -d "${dirPath}/debug-kms" ]; then
+        mkdir $dirPath/debug-kms
         counter=1
 		for FILE in ./debug_configs/config/kms/tlsConfigs/*.txt;
             	do	openssl req -x509 -nodes -days 365 -newkey rsa:4096 -config $FILE \
 		        -CA $dirPath/ca.crt -CAkey $dirPath/ca.key \
-		        -keyout "$dirPath/debug-ekms/ekms$counter-selfsigned.key" -out "$dirPath/debug-ekms/ekms$counter-selfsigned.crt"; \
-                openssl x509 -in "$dirPath/debug-ekms/ekms$counter-selfsigned.crt" -noout -text
+		        -keyout "$dirPath/debug-kms/kms$counter-selfsigned.key" -out "$dirPath/debug-kms/kms$counter-selfsigned.crt"; \
+                openssl x509 -in "$dirPath/debug-kms/kms$counter-selfsigned.crt" -noout -text
                 counter=$((counter+1));
         done
 	fi
diff --git a/debug_configs/config/kms/kms_1.yaml b/debug_configs/config/kms/kms_1.yaml
index fbd96212..47ffa2e8 100644
--- a/debug_configs/config/kms/kms_1.yaml
+++ b/debug_configs/config/kms/kms_1.yaml
@@ -7,8 +7,8 @@ AkmsURL: "http://127.0.0.1:4444/api/v1/keys/push_ksa_key"
 AkmsCkmsServerPort: "9696"
 TLS: true
 CAFile: "../artifacts/ssl/ca.crt"
-CertFile: "../artifacts/ssl/debug-ekms/ekms1-selfsigned.crt"
-KeyFile: "../artifacts/ssl/debug-ekms/ekms1-selfsigned.key"
+CertFile: "../artifacts/ssl/debug-kms/kms1-selfsigned.crt"
+KeyFile: "../artifacts/ssl/debug-kms/kms1-selfsigned.key"
 Peers:
     # peer to kms_2
     - PeerId: '5e41c291-6121-4335-84f6-41e04b8bdaa2'
diff --git a/debug_configs/config/kms/kms_2.yaml b/debug_configs/config/kms/kms_2.yaml
index 98a4e726..ff1248a3 100644
--- a/debug_configs/config/kms/kms_2.yaml
+++ b/debug_configs/config/kms/kms_2.yaml
@@ -7,8 +7,8 @@ AkmsURL: "http://akms-simulator_2:4444/api/v1/keys/push_ksa_key"
 AkmsCkmsServerPort: "9696"
 TLS: true
 CAFile: "ssl/ca.crt"
-CertFile: "ssl/debug-ekms/ekms2-selfsigned.crt"
-KeyFile: "ssl/debug-ekms/ekms2-selfsigned.key"
+CertFile: "ssl/debug-kms/kms2-selfsigned.crt"
+KeyFile: "ssl/debug-kms/kms2-selfsigned.key"
 Peers:
     # peer to kms_1
     - PeerId: '0ff33c82-7fe1-482b-a0ca-67565806ee4b'
diff --git a/etsi014/buf.gen.yaml b/etsi014/buf.gen.yaml
index 9e37a8ea..9e9455f4 100644
--- a/etsi014/buf.gen.yaml
+++ b/etsi014/buf.gen.yaml
@@ -12,7 +12,7 @@ plugins:
     out: openapiv2
     opt:
       - allow_merge=true
-      - merge_file_name=ekms_etsi14
+      - merge_file_name=kms_etsi14
 #      - generate_unbound_methods=true
 #      - include_package_in_tags=false
   # dependencies
diff --git a/figures/gosdn-ekms-example.mp4 b/figures/gosdn-kms-example.mp4
similarity index 100%
rename from figures/gosdn-ekms-example.mp4
rename to figures/gosdn-kms-example.mp4
diff --git a/goKMS/Dockerfile.debug b/goKMS/Dockerfile.debug
index 51a85180..c459a6f8 100644
--- a/goKMS/Dockerfile.debug
+++ b/goKMS/Dockerfile.debug
@@ -10,7 +10,7 @@ COPY . .
 RUN --mount=type=cache,target=/root/go/pkg/mod \
     --mount=type=cache,target=/root/.cache/go-build
 RUN go install github.com/go-delve/delve/cmd/dlv@v1.20.2
-RUN make ekms-build-debug
+RUN make kms-build-debug
 
 FROM debian:12 as debian
 EXPOSE 7030
@@ -21,5 +21,5 @@ RUN apt-get install -y iputils-ping
 RUN apt-get install -y openssh-client openssh-server
 RUN apt-get install -y libssl-dev
 COPY --from=builder /go/bin/dlv /debug/
-COPY --from=builder /app/artifacts/ekms /debug/
-CMD [ "/debug/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/debug/ekms", "start" ]
+COPY --from=builder /app/artifacts/kms /debug/
+CMD [ "/debug/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/debug/kms", "start" ]
-- 
GitLab