Skip to content

Commit

Permalink
server config UPDATE dynamic endpt references
Browse files Browse the repository at this point in the history
Get endpoint references dynamically based on referenced endpt name.
Also some tls fixes.
  • Loading branch information
roman committed Nov 2, 2023
1 parent 0ed3459 commit 3b61983
Show file tree
Hide file tree
Showing 8 changed files with 329 additions and 168 deletions.
21 changes: 8 additions & 13 deletions modules/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ module libnetconf2-netconf-server {
}
}

grouping endpoint-auth-reference-grouping {
grouping endpoint-reference-grouping {
description
"Reference to another endpoint. The purpose is to use the referenced endpoint's authentication mechanisms.
If a connection occurs on an endpoint, the connecting user will be tried to be authenticated
Expand All @@ -290,14 +290,9 @@ module libnetconf2-netconf-server {
using the referenced endpoint's mechanisms. The references can be
multiple, however there must not be a cycle.";

leaf endpoint-client-auth {
type union {
type leafref {
path "/ncs:netconf-server/ncs:listen/ncs:endpoint/ncs:name";
}
type leafref {
path "/ncs:netconf-server/ncs:call-home/ncs:netconf-client/ncs:endpoints/ncs:endpoint/ncs:name";
}
leaf endpoint-reference {
type leafref {
path "/ncs:netconf-server/ncs:listen/ncs:endpoint/ncs:name";
}
}
}
Expand Down Expand Up @@ -403,19 +398,19 @@ module libnetconf2-netconf-server {
}

augment "/ncs:netconf-server/ncs:listen/ncs:endpoint/ncs:transport/ncs:ssh/ncs:ssh/ncs:ssh-server-parameters/ncs:client-authentication" {
uses endpoint-auth-reference-grouping;
uses endpoint-reference-grouping;
}

augment "/ncs:netconf-server/ncs:call-home/ncs:netconf-client/ncs:endpoints/ncs:endpoint/ncs:transport/ncs:ssh/ncs:ssh/ncs:ssh-server-parameters/ncs:client-authentication" {
uses endpoint-auth-reference-grouping;
uses endpoint-reference-grouping;
}

augment "/ncs:netconf-server/ncs:listen/ncs:endpoint/ncs:transport/ncs:tls/ncs:tls/ncs:tls-server-parameters/ncs:client-authentication" {
uses endpoint-auth-reference-grouping;
uses endpoint-reference-grouping;
}

augment "/ncs:netconf-server/ncs:call-home/ncs:netconf-client/ncs:endpoints/ncs:endpoint/ncs:transport/ncs:tls/ncs:tls/ncs:tls-server-parameters/ncs:client-authentication" {
uses endpoint-auth-reference-grouping;
uses endpoint-reference-grouping;
}

augment "/ncs:netconf-server/ncs:listen/ncs:endpoint/ncs:transport/ncs:tls/ncs:tls/ncs:tls-server-parameters/ncs:client-authentication" {
Expand Down
Loading

0 comments on commit 3b61983

Please sign in to comment.