Skip to content
Guides & References

OcNOS services

Worked examples for the OcNOS services template: NTP authentication with a trusted key, and password encryption.

Policy LibraryUpdated
Platform
ip-infusion-ocnos
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

OcNOS services

Rules for two router services: NTP that checks its time source, and passwords stored encrypted in the config. They come from the ocnos-services policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 4 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.

All the rules come from ocnos-services.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The IP Infusion OcNOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
NTP authentication with a trusted key evaluate_block 8.3.0
Password encryption is enabled must_match_regex 8.0.0

NTP authentication with a trusted key

Without authentication, anyone who can reach the router can feed it a false time, which breaks log timelines and certificate checks. The rule needs both ntp authenticate and an ntp trusted-key line, with or without a vrf name.

Definition
// NTP authentication is enabled with a trusted key (ntp authenticate, ntp trusted-key)
#[evaluate_block]
all:
- regex: '/^ntp authenticate( vrf \S+)?[ \t]*$/m'
- regex: '/^ntp trusted-key \d+( vrf \S+)?[ \t]*$/m'
passPassing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample)
feature ntp vrf management
ntp server 192.0.2.10 vrf management
ntp server 192.0.2.11 vrf management
ntp authenticate vrf management
ntp authentication-key 123 md5 0x3b9d02e7c41f8a56 7 vrf management
ntp trusted-key 123 vrf management

Why: Authentication is on and key 123 is trusted. The key shown is made up.

failFailing config: S9510-28DC-B lab router sample (OcNOS-SP 7.0.0, sanitised)
ipv6 dns relay
feature ntp vrf management
feature rsyslog

Why: NTP is on, but there is no ntp authenticate or ntp trusted-key line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
ISO/IEC 27001:2022 Annex A A.8.17

Tested with: sample excerpts from OcNOS-SP 7.0.0. Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Password encryption is enabled

service password-encryption stores passwords in the config in an encrypted form, so they cannot be read over someone’s shoulder or from a backup. The rule looks for that exact line.

Definition
// Password encryption is enabled (service password-encryption)
#[must_match_regex]
/^service password-encryption[ \t]*$/m
passPassing config: S9510-28DC-B lab router sample (OcNOS-SP 7.0.0, sanitised)
telemetry maximum-subscribe-paths 140
!
service password-encryption
!

Why: Password encryption is on. The lab router already had it.

failFailing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample), changed: service password-encryption removed
telemetry maximum-subscribe-paths 140
!
!

Why: There is no service password-encryption line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 CM-6
ISO/IEC 27001:2022 Annex A A.5.17

Tested with: sample excerpts from OcNOS-SP 7.0.0. Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.