-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quote identity types, adds validator
- Loading branch information
Showing
62 changed files
with
2,273 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
t/venom/test_suites/wired_dot1x_eap_teap/00_enable_node_cleanup_task.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Enable node_cleanup maintenance task and change the delete_window | ||
testcases: | ||
- name: get_login_token | ||
steps: | ||
- type: get_login_token | ||
|
||
- name: enable_node_cleanup_task | ||
steps: | ||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/maintenance_task/node_cleanup' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"status": "enabled" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
|
||
- name: change_delete_window | ||
steps: | ||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/maintenance_task/node_cleanup' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"delete_window": { | ||
"interval": "{{.node_cleanup.delete_window.interval}}", | ||
"unit": "{{.node_cleanup.delete_window.unit}}" | ||
} | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 |
6 changes: 6 additions & 0 deletions
6
t/venom/test_suites/wired_dot1x_eap_teap/02_restart_pfcron_service.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: Restart pfcron service | ||
testcases: | ||
- name: restart_pfcron_service | ||
steps: | ||
- type: pf_api_service_restart_async | ||
service: 'pfcron' |
71 changes: 71 additions & 0 deletions
71
t/venom/test_suites/wired_dot1x_eap_teap/06_join_domain.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Join domain | ||
vars: | ||
# temp, workaround for https://github.com/ovh/venom/issues/445 | ||
# pf only accepts hostname with less than 14 characters | ||
random_server_name: "{{ randAlpha 13 }}" | ||
random_ad_domain_id: "{{ randAlpha 7 }}" | ||
random_machine_account_password: "{{ randAlpha 16 }}" | ||
testcases: | ||
- name: get_login_token | ||
steps: | ||
- type: get_login_token | ||
|
||
- name: create_domain | ||
steps: | ||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/domains' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"ad_fqdn": "ad.example.lan", | ||
"ad_server": "{{.ad_mgmt_ip}}", | ||
"bind_dn": "{{.ad_domain_admin_user}}", | ||
"bind_pass": "{{.ad_domain_admin_password}}", | ||
"dns_name": "{{.ad_dns_domain}}", | ||
"dns_servers": "{{.ad_mgmt_ip}}", | ||
"id": "{{.random_ad_domain_id}}", | ||
"ntlm_cache": null, | ||
"ntlm_cache_expiry": 3600, | ||
"ntlm_cache_source": null, | ||
"ntlmv2_only": null, | ||
"ou": "Computers", | ||
"registration": null, | ||
"server_name": "{{.random_server_name}}", | ||
"status": "enabled", | ||
"sticky_dc": "*", | ||
"workgroup": "{{.ad_domain_upper}}", | ||
"machine_account_password": "{{.random_machine_account_password}}" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 201 | ||
|
||
- name: start_ntlm_auth_api_service | ||
steps: | ||
- type: pf_api_service_start_async | ||
service: 'ntlm-auth-api' | ||
|
||
- name: sleep_some_time | ||
steps: | ||
- type: exec | ||
script: sleep 10 | ||
|
||
- name: test_machine_account | ||
steps: | ||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/ntlm/test' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"id": "{{.random_ad_domain_id}}", | ||
"machine_account_password": "{{.random_machine_account_password}}" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 |
116 changes: 116 additions & 0 deletions
116
t/venom/test_suites/wired_dot1x_eap_teap/07_create_realms.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Create and configure REALMS | ||
testcases: | ||
- name: get_login_token | ||
steps: | ||
- type: get_login_token | ||
|
||
- name: get_ad_domain_id | ||
steps: | ||
- type: http | ||
method: GET | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/domains' | ||
ignore_verify_ssl: true | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
vars: | ||
domain_id: | ||
from: result.bodyjson.items.items0.id | ||
|
||
- name: create_realms | ||
steps: | ||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/realms' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"admin_strip_username": "enabled", | ||
"domain": "{{.get_ad_domain_id.domain_id}}", | ||
"eduroam_options": null, | ||
"eduroam_radius_acct": null, | ||
"eduroam_radius_acct_proxy_type": "load-balance", | ||
"eduroam_radius_auth": null, | ||
"eduroam_radius_auth_compute_in_pf": "enabled", | ||
"eduroam_radius_auth_proxy_type": "keyed-balance", | ||
"id": "{{.ad_domain_upper}}", | ||
"ldap_source": null, | ||
"options": null, | ||
"permit_custom_attributes": "disabled", | ||
"portal_strip_username": "enabled", | ||
"radius_acct": null, | ||
"radius_acct_proxy_type": "load-balance", | ||
"radius_auth": null, | ||
"radius_auth_compute_in_pf": "enabled", | ||
"radius_auth_proxy_type": "keyed-balance", | ||
"radius_strip_username": "enabled" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 201 | ||
|
||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/realms' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"admin_strip_username": "enabled", | ||
"domain": "{{.get_ad_domain_id.domain_id}}", | ||
"eduroam_options": null, | ||
"eduroam_radius_acct": null, | ||
"eduroam_radius_acct_proxy_type": "load-balance", | ||
"eduroam_radius_auth": null, | ||
"eduroam_radius_auth_compute_in_pf": "enabled", | ||
"eduroam_radius_auth_proxy_type": "keyed-balance", | ||
"id": "{{.ad_dns_domain}}", | ||
"ldap_source": null, | ||
"options": null, | ||
"permit_custom_attributes": "disabled", | ||
"portal_strip_username": "enabled", | ||
"radius_acct": null, | ||
"radius_acct_proxy_type": "load-balance", | ||
"radius_auth": null, | ||
"radius_auth_compute_in_pf": "enabled", | ||
"radius_auth_proxy_type": "keyed-balance", | ||
"radius_strip_username": "enabled" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 201 | ||
|
||
- name: modify_builtin_realms | ||
steps: | ||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/realm/DEFAULT' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"domain": "{{.get_ad_domain_id.domain_id}}" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
|
||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/realm/NULL' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"domain": "{{.get_ad_domain_id.domain_id}}" | ||
} | ||
headers: | ||
"Authorization": "{{.get_login_token.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 |
9 changes: 9 additions & 0 deletions
9
t/venom/test_suites/wired_dot1x_eap_teap/10_restart_radius_services.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Restart RADIUS services | ||
testcases: | ||
- name: restart_radius_services | ||
steps: | ||
- type: pf_api_service_restart_async | ||
service: 'radiusd-auth' | ||
|
||
- type: pf_api_service_restart_async | ||
service: 'pfacct' |
Oops, something went wrong.