Skip to content

Juniper #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 17, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@medium(
name='rule_6_1_1_ensure_accounting_destination_is_configured',
platform=['juniper_junos'],
commands=dict(chk_cmd='')
commands=dict(chk_cmd1='show configuration system accounting destination | match "server" | count')
)
def rule_6_1_1_ensure_accounting_destination_is_configured(commands, ref):
assert '' in commands.chk_cmd, ref
assert int(commands.chk_cmd1.strip()) >= 1, ref
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@medium(
name='rule_6_1_2_ensure_accounting_of_logins',
platform=['juniper_junos'],
commands=dict(chk_cmd='')
commands=dict(chk_cmd1='show configuration system accounting')
)
def rule_6_1_2_ensure_accounting_of_logins(commands, ref):
assert '' in commands.chk_cmd, ref
assert 'events login;' in commands.chk_cmd1, ref
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ defaults:

tests:
rule_1110_set_aaa_accounting_system:
- outcome: TESTS_FAILED
configuration: |
hostname not-interesting
no aaa new-model
- outcome: OK
configuration: |
aaa new-model
- outcome: OK
configuration: |
no aab new-model

- outcome: NO_TESTS_COLLECTED
devices:
- platform: juniperOS
ipaddress: 19
aaa accounting system
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ tests:
rule_111_enable_aaa_new_model:
- outcome: TESTS_FAILED
configuration: |
hostname not-interesting
no aaa new-model
- outcome: OK
configuration: |
aaa new-model
- outcome: OK
configuration: |
no aab new-model

- outcome: NO_TESTS_COLLECTED
devices:
- platform: juniperOS
ipaddress: 19
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ tests:
rule_112_enable_aaa_authentication_login:
- outcome: TESTS_FAILED
configuration: |
hostname not-interesting
no aaa new-model
- outcome: OK
configuration: |
aaa authentication login
- outcome: TESTS_FAILED
configuration: |
aaa authentication

- outcome: NO_TESTS_COLLECTED
devices:
- platform: juniperOS
ipaddress: 19
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ defaults:

tests:
rule_113_enable_aaa_authentication_enable_default:
- devices:
- platform: cisco_ios
- platform: cisco_xe
outcome: OK

- outcome: TESTS_FAILED
configuration: |
hostname not-interesting
Expand All @@ -14,5 +19,7 @@ tests:

- outcome: NO_TESTS_COLLECTED
devices:
- platform: juniperOS
ipaddress: 19
- platform: juniper_junos
- outcome: OK
devices:
- platform: cisco_ios
Loading