aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/netconf-pnp-simulator/engine/templates
diff options
context:
space:
mode:
authorebo <eliezio.oliveira@est.tech>2020-04-03 15:24:15 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-04-08 08:52:09 +0000
commitf986059d04af9eafe85aafe467e3196e8400098c (patch)
treee42f20f8117d752498ba9d302878172280c98a1c /test/mocks/netconf-pnp-simulator/engine/templates
parent7a3199bf4a05ffe7148ab7139a73df863a659353 (diff)
netconf-pnp-simulator: convenient TLS and SSH configuration
- Simple SSH and TLS configuration. Instead of specific Netopeer2 XML configuration files, the user only needs to provide: For SSH: id_XXX.pub For TLS: server_key.pem, server_cert.pem, and ca.pem - SSH and TLS can be reconfigured at runtime by running /opt/bin/reconfigure-ssh.sh and /opt/bin/reconfigure-tls.sh respectively - Improved log readability by using zlog (on C applications) and loguru for Python See the updated documentation under ../docs for more information. Issue-ID: INT-1516 Change-Id: I21052d2524f0610c6197875a544113cce1a02787 Signed-off-by: ebo <eliezio.oliveira@est.tech>
Diffstat (limited to 'test/mocks/netconf-pnp-simulator/engine/templates')
-rw-r--r--test/mocks/netconf-pnp-simulator/engine/templates/load_auth_pubkey.xml12
-rw-r--r--test/mocks/netconf-pnp-simulator/engine/templates/load_server_certs.xml20
-rw-r--r--test/mocks/netconf-pnp-simulator/engine/templates/tls_listen.xml27
3 files changed, 59 insertions, 0 deletions
diff --git a/test/mocks/netconf-pnp-simulator/engine/templates/load_auth_pubkey.xml b/test/mocks/netconf-pnp-simulator/engine/templates/load_auth_pubkey.xml
new file mode 100644
index 000000000..93b662f02
--- /dev/null
+++ b/test/mocks/netconf-pnp-simulator/engine/templates/load_auth_pubkey.xml
@@ -0,0 +1,12 @@
+<system xmlns="urn:ietf:params:xml:ns:yang:ietf-system">
+ <authentication>
+ <user>
+ <name>netconf</name>
+ <authorized-key>
+ <name></name>
+ <algorithm></algorithm>
+ <key-data></key-data>
+ </authorized-key>
+ </user>
+ </authentication>
+</system>
diff --git a/test/mocks/netconf-pnp-simulator/engine/templates/load_server_certs.xml b/test/mocks/netconf-pnp-simulator/engine/templates/load_server_certs.xml
new file mode 100644
index 000000000..ef02dedef
--- /dev/null
+++ b/test/mocks/netconf-pnp-simulator/engine/templates/load_server_certs.xml
@@ -0,0 +1,20 @@
+<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore">
+ <private-keys>
+ <private-key>
+ <name>server_key</name>
+ <certificate-chains>
+ <certificate-chain>
+ <name>server_cert</name>
+ <certificate></certificate>
+ </certificate-chain>
+ </certificate-chains>
+ </private-key>
+ </private-keys>
+ <trusted-certificates>
+ <name>trusted_ca_list</name>
+ <trusted-certificate>
+ <name>ca</name>
+ <certificate></certificate>
+ </trusted-certificate>
+ </trusted-certificates>
+</keystore>
diff --git a/test/mocks/netconf-pnp-simulator/engine/templates/tls_listen.xml b/test/mocks/netconf-pnp-simulator/engine/templates/tls_listen.xml
new file mode 100644
index 000000000..a6b6bedb1
--- /dev/null
+++ b/test/mocks/netconf-pnp-simulator/engine/templates/tls_listen.xml
@@ -0,0 +1,27 @@
+<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
+ <listen>
+ <endpoint>
+ <name>tls_listen_endpt</name>
+ <tls>
+ <address>0.0.0.0</address>
+ <port>6513</port>
+ <certificates>
+ <certificate>
+ <name>server_cert</name>
+ </certificate>
+ </certificates>
+ <client-auth>
+ <trusted-ca-certs>trusted_ca_list</trusted-ca-certs>
+ <cert-maps>
+ <cert-to-name>
+ <id>1</id>
+ <fingerprint></fingerprint>
+ <map-type xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name">x509c2n:specified</map-type>
+ <name>netconf</name>
+ </cert-to-name>
+ </cert-maps>
+ </client-auth>
+ </tls>
+ </endpoint>
+ </listen>
+</netconf-server>