feat: WASM plugin for OpenText Network Automation integration #3325
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar#3325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem?
Need to create a new (WASM) plugin for an OpenText (formerly HP Network Automation, and then MicroMuse Network Automation) Network Automation integration.
NA has a REST API that lets us get information from a device, device details, diagnostics, configurations and also allows us to run command scripts or diagnostics.
Typically command scripts and diagnostics are already built in NA and you just call them with the arguments you want, NA executes the command script (change plan) on a device and returns the results. Diagnostics are similar, I believe in the newer versions you can also pass inputs as variables to diagnostics. The main difference between the two is that diagnostics save output and you can write policy checks against them for compliance.
Our v1/first pass of this plugin needs to include:
When we're running a command script or a diagnostic, we need to setup a polling loop to check the status, retrieve results (output and success/failure), and store them in SR.
If we're retrieving a configuration for a device, we need to capture the config and store it in the database.
This is a tall order since normally you would want to parse the config, and kind of put it into a structured schema. This could be a huge effort, so we have a couple of options:
Writing parsers for these 3 device types might not be that big of a deal, this is all we really need to support for this particular effort.
A 3rd option might be to do both, parse configs where we have parsers written, for everything else it gets stored as a blob and we could show the full config, wouldn't really be able to render it that well, but we could still be able to do BM25 text searches across it.
After digging into this a bit more, it seems like there is quite a lot of OSS config parsers we could borrow from that might be able to make this a bit easier.. the big challenge here is trying to come up with a schema that is generic enough that all of these different vendors/device types would fit into.
https://pypi.org/project/cisco-config-parser/
https://github.com/mpenning/ciscoconfparse2
https://www.pennington.net/py/ciscoconfparse2/
https://github.com/tdorssers/confparser
https://github.com/networktocode/netutils/blob/develop/netutils/config/parser.py
https://galaxy.ansible.com/ui/repo/published/community/network/content/module/aruba_config/ -- there are quite a few of other modules in here as well that we could examine
https://github.com/cidrblock/netcopa -- seems pretty decent
Almost all of these tools are written in python so I don't think we can use them directly, our backend is written in elixir, our agent is written in golang, and our WASM Plugin SDK supports go and rust.
I really don't want to pull in python/python dependencies either.
This feature should be broken up into the following feature parts:
The parsing engine should be easily extendable in the future to add support for new vendors/device types
At the end of the day, our main goal here is:
What we're trying to do is build in enough intelligence into SR and enough data into the database to use the ServiceRadar causal engine to help identify devices that may be having a problem because:
These last parts we need to figure out later but this is the foundation that we need in place before we can add in that stuff, we'll probably need some kind of compliance engine against configurations next where we can write a policy that basically defines what "Network Access Controls applied to a switch port" looks like, since they're different for each device type.
For the OpenText Network Automation API integration, we need to kind of make this generic enough that we could easily swap this out with some other NCM tool integration, maybe ansible, or who knows, it shouldn't really matter.. we need to come up with high level abstractions that get these things we need from an NCM tool. Most NCM tools will provide the ability to:
We can just assume at least for now, that this will always be unstructured data.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
This PRD outlines the development of a Network Configuration & Automation Integration for ServiceRadar, specifically targeting OpenText Network Automation (NA). This integration will leverage the ServiceRadar WASM-based architecture to collect, parse, and analyze network configurations to feed into the ServiceRadar causal engine.
PRD: ServiceRadar Network Automation Integration (OpenText NA)
Status: Draft
Author: ServiceRadar Engineering
Date: May 2024
Target Architecture: WASM (wazero), OCSF, Go/Elixir Pipeline
1. Problem Statement
ServiceRadar currently lacks deep visibility into the configuration state of network infrastructure. When an endpoint becomes unreachable or experiences issues, it is difficult to programmatically determine if the cause is a configuration change (e.g., Network Access Control/NAC applied to a switch port) or a global configuration error (e.g., RADIUS misconfiguration).
Manual retrieval of configs from OpenText NA is slow and siloed. We need an automated way to pull, parse, and store these configurations in a structured format while maintaining the ability to execute diagnostic scripts and command changes directly from ServiceRadar.
2. Goals & Objectives
3. Technical Architecture
3.1 Data Flow
wazero) written in Go.Agent -> Agent-Gateway -> Core-ELX (Elixir) -> Database (Postgres/ParadeDB).3.2 Integration Components
4. Functional Requirements
4.1 Configuration Retrieval (v1)
4.2 Command & Diagnostic Execution
stdout,stderr, and exit codes.4.3 Supported Vendors (v1 Parsing)
5. Data & Schema Definitions
5.1 OCSF Mapping
We will utilize the OCSF Inventory or Config State categories. Since OCSF is extensible, we will define a Network Configuration Profile:
device_hw: Metadata about the switch/router.config_raw: The BLOB of the full config.interfaces[]: An array of objects containing normalized port data.aaa_config: Global RADIUS/Security settings.5.2 Storage Strategy
6. Parsing Strategy (The "Go" Way)
Since we cannot use Python libraries (
ciscoconfparse), we will implement a lightweight Pattern-Match Parser in Go:Scannerapproach to read configs line-by-line.InterfaceBlockextractors for each vendor.7. UI/UX Requirements
8. Future Evolution: The Causal Engine
This integration provides the "Evidence" for the ServiceRadar Causal Engine:
10.0.0.5is unreachable (ICMP Fail).10.0.0.5sits. It seesdot1x port-control autois enabled but the Global RADIUS server is misconfigured or unreachable.9. Success Metrics
We will likely need to extend the agent/protobuf definitions to support the device configuration shape
Compliance Engine: Post-MVP, develop a policy engine to run "Audit" checks against the parsed data (e.g., "Alert if RADIUS is missing on any active switchport").
Configuration Diffing: Ability to compare two points in time to see exactly what changed in the raw text.
Causal Engine Hooks: Feeding the "NAC enabled" state as a node into the SR causal graph to automatically suppress/re-categorize reachability alerts.
No Python: All parsing logic must be written in Go (compiled to WASM) or handled in Elixir.
WASM Memory: Configurations can be large (1MB+ for some core switches). The WASM plugin must handle memory allocation efficiently within the wazero environment.
Vendor Generic: Avoid hardcoding OpenText specific logic outside of the na-provider module.
Found some golang based parsers:
https://github.com/tinyinput/confparser
I like the netcopa approach of writing yaml here for each section of the config:
https://github.com/cidrblock/netcopa/blob/master/parsers/cisco_ios/interface/main.yml
We could build a totally separate UI just for building out these yaml configs (future work), but worth considering.. something that would allow us to paste in a real config and then build yaml and test it out in real-time.
Maybe build this in rust using iced.rs