summaryrefslogtreecommitdiffstats
path: root/cts/cli/regression.access_render.exp
blob: d818b6559ee57acde6b4e3b44b01652c98b7cbd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Created new pacemaker configuration
A new shadow instance was created. To begin using it, enter the following into your shell:
	export CIB_shadow=cts-cli
=#=#=#= Begin test: Configure some ACLs =#=#=#=
=#=#=#= Current cib after: Configure some ACLs =#=#=#=
<cib epoch="2" num_updates="0" admin_epoch="0">
  <configuration>
    <crm_config/>
    <nodes/>
    <resources/>
    <constraints/>
    <acls>
      <acl_role id="role-deny-acls-write-resources">
        <acl_permission id="deny-acls" kind="deny" xpath="/cib/configuration/acls"/>
        <acl_permission id="write-resources" kind="write" xpath="/cib/configuration/resources"/>
        <acl_permission id="read-rest" kind="read" xpath="/cib"/>
      </acl_role>
      <acl_target id="tony">
        <role id="role-deny-acls-write-resources"/>
      </acl_target>
    </acls>
  </configuration>
  <status/>
</cib>
=#=#=#= End test: Configure some ACLs - OK (0) =#=#=#=
* Passed: cibadmin       - Configure some ACLs
=#=#=#= Begin test: Enable ACLs =#=#=#=
=#=#=#= Current cib after: Enable ACLs =#=#=#=
<cib epoch="3" num_updates="0" admin_epoch="0">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
      </cluster_property_set>
    </crm_config>
    <nodes/>
    <resources/>
    <constraints/>
    <acls>
      <acl_role id="role-deny-acls-write-resources">
        <acl_permission id="deny-acls" kind="deny" xpath="/cib/configuration/acls"/>
        <acl_permission id="write-resources" kind="write" xpath="/cib/configuration/resources"/>
        <acl_permission id="read-rest" kind="read" xpath="/cib"/>
      </acl_role>
      <acl_target id="tony">
        <role id="role-deny-acls-write-resources"/>
      </acl_target>
    </acls>
  </configuration>
  <status/>
</cib>
=#=#=#= End test: Enable ACLs - OK (0) =#=#=#=
* Passed: crm_attribute  - Enable ACLs
=#=#=#= Begin test: An instance of ACLs render (into color) =#=#=#=
<!-- ACLs as evaluated for user tony -->
\x1b[34m<cib epoch="3" num_updates="0" admin_epoch="0">
  \x1b[34m<configuration>
    \x1b[34m<crm_config>
      \x1b[34m<cluster_property_set id="cib-bootstrap-options">
        \x1b[34m<nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
      \x1b[34m</cluster_property_set>
    \x1b[34m</crm_config>
    \x1b[34m<nodes/>
    \x1b[32m<resources/>
    \x1b[34m<constraints/>
    \x1b[31m<acls>
      \x1b[31m<acl_role id="role-deny-acls-write-resources">
        \x1b[31m<acl_permission id="deny-acls" kind="deny" xpath="/cib/configuration/acls"/>
        \x1b[31m<acl_permission id="write-resources" kind="write" xpath="/cib/configuration/resources"/>
        \x1b[31m<acl_permission id="read-rest" kind="read" xpath="/cib"/>
      \x1b[31m</acl_role>
      \x1b[31m<acl_target id="tony">
        \x1b[31m<role id="role-deny-acls-write-resources"/>
      \x1b[31m</acl_target>
    \x1b[31m</acls>
  \x1b[34m</configuration>
  \x1b[34m<status/>
\x1b[34m</cib>
=#=#=#= End test: An instance of ACLs render (into color) - OK (0) =#=#=#=
* Passed: cibadmin       - An instance of ACLs render (into color)
=#=#=#= Begin test: An instance of ACLs render (into namespacing) =#=#=#=
<!-- ACLs as evaluated for user tony -->
<pcmk-access-readable:cib epoch="3" num_updates="0" admin_epoch="0" xmlns:pcmk-access-writable="http://clusterlabs.org/ns/pacemaker/access/writable" xmlns:pcmk-access-readable="http://clusterlabs.org/ns/pacemaker/access/readable" xmlns:pcmk-access-denied="http://clusterlabs.org/ns/pacemaker/access/denied">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
      </cluster_property_set>
    </crm_config>
    <nodes/>
    <pcmk-access-writable:resources/>
    <constraints/>
    <pcmk-access-denied:acls>
      <acl_role id="role-deny-acls-write-resources">
        <acl_permission id="deny-acls" kind="deny" xpath="/cib/configuration/acls"/>
        <acl_permission id="write-resources" kind="write" xpath="/cib/configuration/resources"/>
        <acl_permission id="read-rest" kind="read" xpath="/cib"/>
      </acl_role>
      <acl_target id="tony">
        <role id="role-deny-acls-write-resources"/>
      </acl_target>
    </pcmk-access-denied:acls>
  </configuration>
  <status/>
</pcmk-access-readable:cib>
=#=#=#= End test: An instance of ACLs render (into namespacing) - OK (0) =#=#=#=
* Passed: cibadmin       - An instance of ACLs render (into namespacing)
=#=#=#= Begin test: An instance of ACLs render (into text) =#=#=#=
<!-- ACLs as evaluated for user tony -->
vvv---[ READABLE ]---vvv
<cib epoch="3" num_updates="0" admin_epoch="0">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
      </cluster_property_set>
    </crm_config>
    <nodes/>
    
    vvv---[ WRITABLE ]---vvv
    <resources/>
    <constraints/>
    
    vvv---[ ~DENIED~ ]---vvv
    <acls>
      <acl_role id="role-deny-acls-write-resources">
        <acl_permission id="deny-acls" kind="deny" xpath="/cib/configuration/acls"/>
        <acl_permission id="write-resources" kind="write" xpath="/cib/configuration/resources"/>
        <acl_permission id="read-rest" kind="read" xpath="/cib"/>
      </acl_role>
      <acl_target id="tony">
        <role id="role-deny-acls-write-resources"/>
      </acl_target>
    </acls>
  </configuration>
  <status/>
</cib>
=#=#=#= End test: An instance of ACLs render (into text) - OK (0) =#=#=#=
* Passed: cibadmin       - An instance of ACLs render (into text)