Skip to content
Guides & References

EOS services

Worked example for the Arista EOS services template: the eAPI serves HTTPS, not plain HTTP.

Policy LibraryUpdated
Platform
arista-eos
Minimum version
rConfig 8.0.2
Editions
Pro, Vector, Enterprise
On this page

EOS services

A rule for the services the switch runs. The eAPI (management api http-commands) takes commands over the web, so it should never use plain HTTP. It comes from the eos-services policy template.

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

Each of the 2 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.

All the rules come from eos-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 Arista EOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
eAPI does not serve plain HTTP must_not_match_regex 8.0.2

eAPI does not serve plain HTTP

Plain HTTP sends the eAPI login and every command in clear text. This rule fails on an indented protocol http line, with or without a port. protocol https passes.

Definition
// The eAPI does not serve plain HTTP (fails on protocol http under management api http-commands)
#[must_not_match_regex]
/^[ \t]+protocol http( port \d+)?$/m
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!

Why: The eAPI uses HTTPS.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
management api http-commands
protocol http
no shutdown
!
vrf MGMT
no shutdown
!

Why: The eAPI uses plain HTTP.

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-7
ISO/IEC 27001:2022 Annex A A.8.9

Tested with: sample excerpts from EOS 4.32.2F (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.