Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syslog TLS #1166

Merged
merged 5 commits into from
Sep 12, 2024
Merged

Add syslog TLS #1166

merged 5 commits into from
Sep 12, 2024

Conversation

dplore
Copy link
Member

@dplore dplore commented Aug 20, 2024

Change Scope

  • Add support for syslog over TLS
  • This change is backwards compatible

Tree view

We are at /system/logging

module: openconfig-system
[... snip ...]
         |  |  +--rw remote-servers
         |  |  |  +--rw remote-server* [host]
         |  |  |     +--rw host         -> ../config/host
         |  |  |     +--rw config
         |  |  |     |  +--rw host?               oc-inet:host
         |  |  |     |  +--rw source-address?     oc-inet:ip-address
         |  |  |     |  +--rw network-instance?   oc-ni:network-instance-ref
         |  |  |     |  +--rw remote-port?        oc-inet:port-number
         |  |  |     |  +--rw host?                 oc-inet:host
         |  |  |     |  +--rw source-address?       oc-inet:ip-address
         |  |  |     |  +--rw network-instance?     oc-ni:network-instance-ref
         |  |  |     |  +--rw remote-port?          oc-inet:port-number
+        |  |  |     |  +--rw transport-security?   boolean
+        |  |  |     |  +--rw tls-profile-id?       string
         |  |  |     +--ro state
         |  |  |     |  +--ro host?               oc-inet:host
         |  |  |     |  +--ro source-address?     oc-inet:ip-address
         |  |  |     |  +--ro network-instance?   oc-ni:network-instance-ref
         |  |  |     |  +--ro remote-port?        oc-inet:port-number
         |  |  |     |  +--ro host?                 oc-inet:host
         |  |  |     |  +--ro source-address?       oc-inet:ip-address
         |  |  |     |  +--ro network-instance?     oc-ni:network-instance-ref
         |  |  |     |  +--ro remote-port?          oc-inet:port-number
+        |  |  |     |  +--ro transport-security?   boolean
+        |  |  |     |  +--ro tls-profile-id?       string

Platform Implementations

configure
	management security
		ssl profile MYPROFILE
			trust certificate MYPROFILE-ca.crt
     logging host 10.1.1.1 6514 protocol tls ssl-profile MYPROFILE
 set security pki ca-profile myprofile ca-identity test
 set security pki ca-profile myprofile revocation-check disable
 
 set system syslog host 10.1.1.1 port 6514
 set system syslog host 10.1.1.1 transport tls
 set system syslog host 10.1.1.1 any any
 set system syslog host 10.1.1.1 tlsdetails trusted-ca-group abc ca-profiles myprofile
 set system syslog host 10.1.1.1 source-address 192.168.10.10
Router(config)#logging tls-server TEST
Router(config-logging-tls-peer)#severity debugging
Router(config-logging-tls-peer)#trustpoint mytlsprofile
Router(config-logging-tls-peer)#address ipv4 10.1.1.1
Router(config-logging-tls-peer)#commit

@dplore dplore requested a review from a team as a code owner August 20, 2024 19:59
@OpenConfigBot
Copy link

OpenConfigBot commented Aug 20, 2024

No major YANG version changes in commit 6fc0264

@@ -429,6 +435,22 @@ revision "2023-07-20" {
"Sets the destination port number for syslog UDP messages to
the server. The default for syslog is 514.";
}

leaf transport-security {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we are likely at a point where it makes sense to define a common structure that is imported/used across all services that have the option for TLS (or stage as such to slow transition previous definitions while using the new structure going fwd)

If we look across the model-set today, we have a variation in definition/behavior. Some reference to profiles (SSL/TLS nomenclature mixed), some reference to certificates, defaults and description differences.

Outside of that and a bit outside of this PR but related:

For the tie to gNSI, we already have a nomenclature mismatch that should be reconciled (should normalize everything to TLS and firm up the relationship). In addition are references towards gNOI cert services as well as gNSI cert services

Unfortunately anything outside of these services then is undefined behavior and ymmv for anyone not intending to use gNSI. Since there is no OC YANG schema covering the configuration of profiles, it is loosely implied to just match up this string with some native definition in the implementation (config or otherwise)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ebben, thanks for the thoughtful feedback. You are not wrong! The OC data models have not ever tried to define how to install and manage certificates. In practice, managing certs is "out-of-band" of gnmi. CLI and ssh, scp, gnsi.certz or some other magic needs to be used to get a certificate on a device and name those certs so that OC can reference them. I see this as an area for improvement, but not blocking this PR.

Thanks for pointing out the gnoi.Certificate service. We just removed it as that approach was never implemented (to my knowledge) and is obsoleted by gnsi.

I support moving to TLS nomenclature. My opinion is we should introduce new TLS entities named with TLS only. For the SSL things, we should create equivalent entities with TLS nomenclature and deprecate (but not delete) the SSL names.

@dplore dplore added the last-call PR that is in final review before merging. label Sep 6, 2024
@dplore
Copy link
Member Author

dplore commented Sep 6, 2024

Set last call to Sep 12, 2024

@dplore dplore merged commit 2e49acd into master Sep 12, 2024
14 checks passed
@dplore dplore deleted the dplore/logging-tls branch September 12, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call PR that is in final review before merging. non-breaking
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants