diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-11-16 21:07:20 -0600 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-06 22:08:16 +0000 |
commit | 2203bb650ce4730832cb9799be0ea1b855c07170 (patch) | |
tree | c0ae64bfe5ff9a39f95ab6cf86720316cf2885a2 /install/ui/test | |
parent | caa9d52666e5beb7321dc6c80820eeacca356077 (diff) | |
download | freeipa-2203bb650ce4730832cb9799be0ea1b855c07170.tar.gz freeipa-2203bb650ce4730832cb9799be0ea1b855c07170.tar.xz freeipa-2203bb650ce4730832cb9799be0ea1b855c07170.zip |
Added HBAC Test page.
This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.
Ticket #388
Diffstat (limited to 'install/ui/test')
-rw-r--r-- | install/ui/test/data/hbacrule_find_pkeys.json | 16 | ||||
-rw-r--r-- | install/ui/test/data/hbacrule_get_records.json | 83 | ||||
-rw-r--r-- | install/ui/test/data/hbacrule_show.json | 4 | ||||
-rw-r--r-- | install/ui/test/data/hbactest.json | 16 |
4 files changed, 114 insertions, 5 deletions
diff --git a/install/ui/test/data/hbacrule_find_pkeys.json b/install/ui/test/data/hbacrule_find_pkeys.json index 3c33573f0..9f3021b52 100644 --- a/install/ui/test/data/hbacrule_find_pkeys.json +++ b/install/ui/test/data/hbacrule_find_pkeys.json @@ -2,16 +2,28 @@ "error": null, "id": null, "result": { - "count": 1, + "count": 3, "result": [ { "cn": [ "allow_all" ], "dn": "ipauniqueid=ca842a42-a445-11e0-87ff-525400b55a47,cn=hbac,dc=dev,dc=example,dc=com" + }, + { + "cn": [ + "rule1" + ], + "dn": "ipauniqueid=4ed8b682-edf511df-b3f78f4b-11cc007b,cn=hbac,dc=dev,dc=example,dc=com" + }, + { + "cn": [ + "rule2" + ], + "dn": "ipauniqueid=12e2e4ba-120d-11e1-bbf7-525400e135d8,cn=hbac,dc=dev,dc=example,dc=com" } ], - "summary": "1 HBAC rule matched", + "summary": "3 HBAC rules matched", "truncated": false } } diff --git a/install/ui/test/data/hbacrule_get_records.json b/install/ui/test/data/hbacrule_get_records.json index feaf217f6..743885de8 100644 --- a/install/ui/test/data/hbacrule_get_records.json +++ b/install/ui/test/data/hbacrule_get_records.json @@ -2,7 +2,7 @@ "error": null, "id": null, "result": { - "count": 1, + "count": 3, "results": [ { "error": null, @@ -35,6 +35,87 @@ }, "summary": null, "value": "allow_all" + }, + { + "error": null, + "result": { + "accessruletype": [ + "allow" + ], + "cn": [ + "rule1" + ], + "description": [ + "Test Rule" + ], + "dn": "ipauniqueid=4ed8b682-edf511df-b3f78f4b-11cc007b,cn=hbac,dc=dev,dc=example,dc=com", + "ipaenabledflag": [ + "TRUE" + ], + "memberhost_host": [ + "dev.example.com" + ], + "memberhost_hostgroup": [ + "production" + ], + "memberservice_hbacsvc": [ + "ftp", + "sshd" + ], + "memberservice_hbacsvcgroup": [ + "sudo" + ], + "memberuser_group": [ + "editors" + ], + "memberuser_user": [ + "admin", + "test" + ], + "sourcehost_host": [ + "dev.example.com" + ], + "sourcehost_hostgroup": [ + "staging" + ] + }, + "summary": null, + "value": "rule1" + }, + { + "error": null, + "result": { + "accessruletype": [ + "allow" + ], + "cn": [ + "rule2" + ], + "description": [ + "Test Rule" + ], + "dn": "ipauniqueid=12e2e4ba-120d-11e1-bbf7-525400e135d8,cn=hbac,dc=dev,dc=example,dc=com", + "ipaenabledflag": [ + "FALSE" + ], + "memberhost_host": [ + "test.example.com" + ], + "memberhost_hostgroup": [ + "staging" + ], + "memberuser_group": [ + "ipausers" + ], + "servicecategory": [ + "all" + ], + "sourcehost_host": [ + "test.example.com" + ] + }, + "summary": null, + "value": "rule2" } ] } diff --git a/install/ui/test/data/hbacrule_show.json b/install/ui/test/data/hbacrule_show.json index 293ed0031..df4dcd783 100644 --- a/install/ui/test/data/hbacrule_show.json +++ b/install/ui/test/data/hbacrule_show.json @@ -30,7 +30,7 @@ "usercategory": "rscwo" }, "cn": [ - "test" + "rule1" ], "dn": "ipauniqueid=4ed8b682-edf511df-b3f78f4b-11cc007b,cn=hbac,dc=dev,dc=example,dc=com", "ipaenabledflag": [ @@ -71,6 +71,6 @@ ] }, "summary": null, - "value": "test" + "value": "rule1" } } diff --git a/install/ui/test/data/hbactest.json b/install/ui/test/data/hbactest.json new file mode 100644 index 000000000..38565eebf --- /dev/null +++ b/install/ui/test/data/hbactest.json @@ -0,0 +1,16 @@ +{ + "error": null, + "id": null, + "result": { + "error": null, + "matched": [ + "allow_all", + "rule1" + ], + "notmatched": [ + "rule2" + ], + "summary": "Access granted: True", + "value": true + } +}
\ No newline at end of file |