acex-driver-juniper-junoscli 2.2.0__tar.gz → 2.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/PKG-INFO +2 -2
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/pyproject.toml +2 -2
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/changelog.json +15 -0
- acex_driver_juniper_junoscli-2.2.2/src/acex_driver_juniper_junos_cli/normalizer.py +46 -0
- acex_driver_juniper_junoscli-2.2.0/src/acex_driver_juniper_junos_cli/normalizer.py +0 -31
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/__init__.py +0 -0
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/augment_renderers.py +0 -0
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/junos_cli.py +0 -0
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/renderer.py +0 -0
- {acex_driver_juniper_junoscli-2.2.0 → acex_driver_juniper_junoscli-2.2.2}/src/acex_driver_juniper_junos_cli/template.j2 +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: acex-driver-juniper-junoscli
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: ACE-X Driver: Juniper Junos CLI
|
|
5
5
|
License: AGPL-3.0
|
|
6
6
|
Author: Johan Lahti
|
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.14
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.15
|
|
14
|
-
Requires-Dist: acex-devkit (>=
|
|
14
|
+
Requires-Dist: acex-devkit (>=4,<5)
|
|
15
15
|
Requires-Dist: jinja2 (>=3.1.6)
|
|
16
16
|
Requires-Dist: netmiko (>=4.6.0)
|
|
17
17
|
Project-URL: Homepage, https://github.com/acex-labs/acex
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "acex-driver-juniper-junoscli"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.2"
|
|
4
4
|
description = "ACE-X Driver: Juniper Junos CLI"
|
|
5
5
|
authors = ["Johan Lahti <johan.lahti@acebit.se>"]
|
|
6
6
|
license = "AGPL-3.0"
|
|
@@ -14,7 +14,7 @@ packages = [
|
|
|
14
14
|
[tool.poetry.dependencies]
|
|
15
15
|
python = "^3.13"
|
|
16
16
|
netmiko = ">=4.6.0"
|
|
17
|
-
acex-devkit = "^
|
|
17
|
+
acex-devkit = "^4"
|
|
18
18
|
jinja2 = ">=3.1.6"
|
|
19
19
|
|
|
20
20
|
[build-system]
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
"component": "acex-driver-juniper-junoscli",
|
|
4
4
|
"name": "Juniper Junos CLI driver",
|
|
5
5
|
"releases": [
|
|
6
|
+
{
|
|
7
|
+
"version": "2.2.2",
|
|
8
|
+
"date": "2026-12-03",
|
|
9
|
+
"entries": [
|
|
10
|
+
{
|
|
11
|
+
"id": "20261203-reversible-secrets-are-masked",
|
|
12
|
+
"kind": "fixed",
|
|
13
|
+
"title": "Reversible secrets are masked in Junos configurations",
|
|
14
|
+
"description": "Some secrets were stored and returned as the device printed them, among them SNMPv3 keys and passwords, the password of the configuration archive and the value of an NTP key. They are now masked, and so is any `$9$` or `$8$` value wherever it stands.\n\nConfigurations stored before the upgrade are not changed, so change the secrets that could be read there. A node with such a line is stored as a new version at its first collection after the upgrade.",
|
|
15
|
+
"breaking": false,
|
|
16
|
+
"audience": "admin",
|
|
17
|
+
"refs": []
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
6
21
|
{
|
|
7
22
|
"version": "2.2.0",
|
|
8
23
|
"date": "2026-11-24",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Junos normalizer for `show configuration | display set` output — vendor-specific rules only."""
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
from acex_devkit.normalizer import BaseNormalizer, LineRule, RewriteRule
|
|
6
|
+
|
|
7
|
+
# A Junos value: a quoted string or a single token.
|
|
8
|
+
VALUE = r'("[^"]*"|\S+)'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class JunosNormalizer(BaseNormalizer):
|
|
12
|
+
line_rules = [
|
|
13
|
+
LineRule("last_commit", re.compile(r"^##\s*Last (commit|changed)")),
|
|
14
|
+
LineRule("version", re.compile(r"^set version\s+")),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
rewrite_rules = [
|
|
18
|
+
# `$9$` is scrambling that anyone can reverse, and `$8$` opens with the device's master password. Either is
|
|
19
|
+
# masked wherever it stands, whatever the keyword before it. First, because a line is rewritten by one rule.
|
|
20
|
+
RewriteRule(
|
|
21
|
+
"reversible_secret",
|
|
22
|
+
re.compile(r'"\$[89]\$[^"]*"|(?<!\S)\$[89]\$[^\s;"]+'),
|
|
23
|
+
'"<REDACTED>"',
|
|
24
|
+
),
|
|
25
|
+
# The value of an NTP key comes after its number and type: `authentication-key 1 type md5 value ...`.
|
|
26
|
+
RewriteRule(
|
|
27
|
+
"ntp_key_value",
|
|
28
|
+
re.compile(rf"^(set system ntp authentication-key \d+ type \S+ value)\s+{VALUE}(.*)$"),
|
|
29
|
+
r'\1 "<REDACTED>"\3',
|
|
30
|
+
),
|
|
31
|
+
RewriteRule(
|
|
32
|
+
"secret_value",
|
|
33
|
+
re.compile(
|
|
34
|
+
rf"^(set .*\b(?:encrypted-password|secret|authentication-key(?! \d+ type\b)|md5 \d+ key|"
|
|
35
|
+
rf"pre-shared-key (?:ascii-text|hexadecimal)|authentication-password|privacy-password|"
|
|
36
|
+
rf"privacy-key|plain-text-password-value|"
|
|
37
|
+
rf"archive-sites \S+ password|community-name))\s+{VALUE}(.*)$"
|
|
38
|
+
),
|
|
39
|
+
r'\1 "<REDACTED>"\3',
|
|
40
|
+
),
|
|
41
|
+
RewriteRule(
|
|
42
|
+
"snmp_community",
|
|
43
|
+
re.compile(rf"^(set snmp community)\s+{VALUE}(.*)$"),
|
|
44
|
+
r'\1 "<REDACTED>"\3',
|
|
45
|
+
),
|
|
46
|
+
]
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"""Junos normalizer for `show configuration | display set` output — vendor-specific rules only."""
|
|
2
|
-
|
|
3
|
-
import re
|
|
4
|
-
|
|
5
|
-
from acex_devkit.normalizer import BaseNormalizer, LineRule, RewriteRule
|
|
6
|
-
|
|
7
|
-
# A Junos value: a quoted string or a single token.
|
|
8
|
-
VALUE = r'("[^"]*"|\S+)'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class JunosNormalizer(BaseNormalizer):
|
|
12
|
-
line_rules = [
|
|
13
|
-
LineRule("last_commit", re.compile(r"^##\s*Last (commit|changed)")),
|
|
14
|
-
LineRule("version", re.compile(r"^set version\s+")),
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
rewrite_rules = [
|
|
18
|
-
RewriteRule(
|
|
19
|
-
"secret_value",
|
|
20
|
-
re.compile(
|
|
21
|
-
rf"^(set .*\b(?:encrypted-password|secret|authentication-key|md5 \d+ key|"
|
|
22
|
-
rf"pre-shared-key (?:ascii-text|hexadecimal)))\s+{VALUE}(.*)$"
|
|
23
|
-
),
|
|
24
|
-
r'\1 "<REDACTED>"\3',
|
|
25
|
-
),
|
|
26
|
-
RewriteRule(
|
|
27
|
-
"snmp_community",
|
|
28
|
-
re.compile(rf"^(set snmp community)\s+{VALUE}(.*)$"),
|
|
29
|
-
r'\1 "<REDACTED>"\3',
|
|
30
|
-
),
|
|
31
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|