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.
// 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'feature ntp vrf managementntp server 192.0.2.10 vrf managementntp server 192.0.2.11 vrf managementntp authenticate vrf managementntp authentication-key 123 md5 0x3b9d02e7c41f8a56 7 vrf managementntp trusted-key 123 vrf managementWhy: Authentication is on and key 123 is trusted. The key shown is made up.
ipv6 dns relayfeature ntp vrf managementfeature rsyslogWhy: 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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
// Password encryption is enabled (service password-encryption)#[must_match_regex]/^service password-encryption[ \t]*$/mtelemetry maximum-subscribe-paths 140!service password-encryption!Why: Password encryption is on. The lab router already had it.
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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
Related reference
- IP Infusion OcNOS policy templates: every rule in
ocnos-services.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.