diff --git a/README.md b/README.md index 71dd6c06c7d9322584c3a3cd4b267dcb25202e3d..8d2b5eb49e15723349831cbbbf5a42ccfaa728d4 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). - + ## Contributing diff --git a/config/configure-and-run-docker-playground.sh b/config/configure-and-run-docker-playground.sh index 67a6b310a004fa815d79f104e9c34742d512661e..dfcc87a781a1e1db3e46f749f150f3cbc3686d8f 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 5798168e0c4069eff52e1f4a0036357b5d7a8756..707ebc42dd73305ce8cecaff07f2be95aea3b09e 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 8b76cb8b04ec590f7ac286fc028902cbb5d1f4b7..a6fca31113991e8a2680a0deae204912b0f23622 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 4b8845e415b9951638912e384001f8eadc28a961..046b105608ae4fa5944237e10b98cd191254a226 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 7f07c0dbc05198c93cbf6dd96afdd8079670b997..76a5869916d34fab411b7b8c5f859dc06861bf14 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 dcb2b0b29c0b05864a6378140c424789f3263785..85a95e4bcaf812490174edef4670ac147f0ead66 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 36758d167531fabd854521e44505472a79513036..7e04c5832da9d211753cfc9ce72535d381fc512f 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 5baacdf0b8a09ead3567250f1c7e1f6a97c735e6..b6bcadaaea1545bf0b59e05fc74fca827b072aa3 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 1406bd287d603953406017faa2646fc505cb6c61..46bc8d838f07c5fc899d1eaf62882392f160871b 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 58e5b79b27a6c8344e37b84b19186968d9a9bd82..136bb8240842756f3eb7b5bd0d1dbd51ea268808 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 8db4b5fd8d6714850d0e8e07caef8d1885d72c16..cc0cdc0ecd327071f3d3b1e098c62c6875d33f45 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 fbd96212feef6ceca1fcf94c73b67a2900e41e69..47ffa2e8efd729721a71c48c8f1f2cc53f832ffc 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 98a4e7263d468e9d346a6ecc9346ae00ca70c1ff..ff1248a36b614b961c3d0b25f502437f14c7ad3e 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 9e37a8ea0c9672424902d23f460d43df168e09fe..9e9455f48894ce9e3c14c4a9dada776629166e55 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 51a851806962eae99a48ac7d048bf44d114896b7..c459a6f8182df454bd18af22c4e5861468232a40 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" ]