- Timestamp:
- 03/09/10 14:47:05 (11 years ago)
- Location:
- TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/config/authorisationservice/policy.xml
r7364 r7444 21 21 <!-- Pattern match all request URIs beginning with / --> 22 22 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 23 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/.*$</AttributeValue> 23 24 <ResourceAttributeDesignator 24 25 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 25 26 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 26 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/.*$</AttributeValue>27 27 </ResourceMatch> 28 28 </Resource> … … 48 48 <!-- Match the request URI --> 49 49 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> 50 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_200</AttributeValue> 50 51 <ResourceAttributeDesignator 51 52 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 52 53 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 53 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_200</AttributeValue>54 54 </ResourceMatch> 55 55 </Resource> … … 68 68 <!-- Match the request URI --> 69 69 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 70 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_40[13]</AttributeValue> 70 71 <ResourceAttributeDesignator 71 72 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 72 73 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 73 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_40[13]</AttributeValue>74 74 </ResourceMatch> 75 75 </Resource> … … 88 88 <!-- Pattern match the request URI --> 89 89 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 90 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/test_securedURI.*$</AttributeValue> 90 91 <ResourceAttributeDesignator 91 92 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 92 93 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 93 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/test_securedURI.*$</AttributeValue>94 94 </ResourceMatch> 95 95 </Resource> … … 98 98 <Action> 99 99 <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 100 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue> 100 101 <ActionAttributeDesignator 101 102 AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 102 103 DataType="http://www.w3.org/2001/XMLSchema#string"/> 103 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>104 104 </ActionMatch> 105 105 </Action> … … 117 117 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of"> 118 118 <SubjectAttributeDesignator 119 AttributeId="urn: siteA:security:authz:1.0:attr"119 AttributeId="urn:ndg:security:authz:1.0:attr" 120 120 DataType="http://www.w3.org/2001/XMLSchema#string"/> 121 121 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag"> … … 132 132 <Resource> 133 133 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> 134 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_accessGrantedToSecuredURI</AttributeValue> 134 135 <ResourceAttributeDesignator 135 136 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 136 137 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 137 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_accessGrantedToSecuredURI</AttributeValue>138 138 </ResourceMatch> 139 139 </Resource> … … 143 143 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of"> 144 144 <SubjectAttributeDesignator 145 AttributeId="urn: siteA:security:authz:1.0:attr"145 AttributeId="urn:ndg:security:authz:1.0:attr" 146 146 DataType="http://www.w3.org/2001/XMLSchema#string"/> 147 147 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag"> … … 159 159 --> 160 160 <Target> 161 <Subjects> 162 <Subject> 163 <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 164 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue> 165 <SubjectAttributeDesignator 166 AttributeId="urn:ndg:security:authz:1.0:attr" 167 DataType="http://www.w3.org/2001/XMLSchema#string"/> 168 </SubjectMatch> 169 </Subject> 170 </Subjects> 161 171 <Resources> 162 172 <Resource> 163 173 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> 174 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_accessGrantedToSecuredURI?admin=1</AttributeValue> 164 175 <ResourceAttributeDesignator 165 176 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 166 177 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 167 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost/test_accessGrantedToSecuredURI?admin=1</AttributeValue>168 178 </ResourceMatch> 169 179 </Resource> 170 180 </Resources> 171 <Subjects>172 <Subject>173 <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">174 <SubjectAttributeDesignator175 AttributeId="urn:siteA:security:authz:1.0:attr"176 DataType="http://www.w3.org/2001/XMLSchema#string"/>177 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>178 </SubjectMatch>179 </Subject>180 </Subjects>181 181 </Target> 182 182 </Rule> -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/full_system/policy.xml
r7414 r7444 21 21 <!-- Pattern match all request URIs beginning with / --> 22 22 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 23 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/.*$</AttributeValue> 23 24 <ResourceAttributeDesignator 24 25 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 25 26 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 26 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/.*$</AttributeValue>27 27 </ResourceMatch> 28 28 </Resource> … … 45 45 <Resource> 46 46 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 47 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/layout/</AttributeValue> 47 48 <ResourceAttributeDesignator 48 49 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 49 50 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 50 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/layout/</AttributeValue>51 51 </ResourceMatch> 52 52 </Resource> … … 66 66 <!-- Match the request URI --> 67 67 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 68 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/(test_401|test_403|test_logoutViaHttpReferrer|test_logoutWithReturn2QueryArg)?$</AttributeValue> 68 69 <ResourceAttributeDesignator 69 70 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 70 71 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 71 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/(test_401|test_403|test_logoutViaHttpReferrer|test_logoutWithReturn2QueryArg)?$</AttributeValue>72 72 </ResourceMatch> 73 73 </Resource> … … 82 82 --> 83 83 <Target> 84 <Subjects> 85 <Subject> 86 <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> 87 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">special-privileges</AttributeValue> 88 <SubjectAttributeDesignator 89 AttributeId="urn:siteA:security:authz:1.0:attr" 90 DataType="http://www.w3.org/2001/XMLSchema#string"/> 91 </SubjectMatch> 92 </Subject> 93 </Subjects> 84 94 <Resources> 85 95 <Resource> 86 96 <!-- Match the request URI --> 87 97 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 98 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/test_accessDeniedToSecuredURI</AttributeValue> 88 99 <ResourceAttributeDesignator 89 100 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 90 101 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 91 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost:7080/test_accessDeniedToSecuredURI</AttributeValue>92 102 </ResourceMatch> 93 103 </Resource> 94 104 </Resources> 95 <Subjects>96 <Subject>97 <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">98 <SubjectAttributeDesignator99 AttributeId="urn:siteA:security:authz:1.0:attr"100 DataType="http://www.w3.org/2001/XMLSchema#string"/>101 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">special-privileges</AttributeValue>102 </SubjectMatch>103 </Subject>104 </Subjects>105 105 </Target> 106 106 </Rule> … … 116 116 <!-- Match 'test_securedURI' --> 117 117 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> 118 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:7080/test_securedURI</AttributeValue> 118 119 <ResourceAttributeDesignator 119 120 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 120 121 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 121 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:7080/test_securedURI</AttributeValue>122 122 </ResourceMatch> 123 123 </Resource> -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/authz/xacml/test_saml_pip.py
r7358 r7444 164 164 try: 165 165 attributeValuesB2 = pipB.attributeQuery(ctx, designator) 166 self.fail("Expected URLError exception for call with no-caching set") 166 self.fail("Expected URLError exception for call with no-caching " 167 "set") 167 168 except URLError, e: 168 169 print("Pass: expected %r error for call with no-caching set" % e) -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/authz/test_authz.py
r7413 r7444 333 333 INI_FILE = 'pep-result-handler-test.ini' 334 334 AUTHZ_FILTER_SECTION = 'filter:AuthZFilter' 335 AUTHZ_RESULT_HANDLER_REDIRECT_URI_OPTNAME = 'authz.resultHandler.redirectURI' 335 AUTHZ_RESULT_HANDLER_REDIRECT_URI_OPTNAME = \ 336 'authz.resultHandler.redirectURI' 336 337 337 338 def __init__(self, *arg, **kw): -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/policy.xml
r7350 r7444 17 17 <!-- Pattern match all request URIs beginning with / --> 18 18 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 19 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/.*$</AttributeValue> 19 20 <ResourceAttributeDesignator 20 21 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 21 22 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 22 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/.*$</AttributeValue>23 23 </ResourceMatch> 24 24 </Resource> … … 42 42 <!-- Pattern match the request URI --> 43 43 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 44 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/dap/data/my.nc.dods\?time\[0:1:0\]&lat$</AttributeValue> 44 45 <ResourceAttributeDesignator 45 46 AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 46 47 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 47 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/dap/data/my.nc.dods\?time\[0:1:0\]&lat$</AttributeValue>48 48 </ResourceMatch> 49 49 </Resource> … … 76 76 <Resource> 77 77 <ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match"> 78 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/test_accessDeniedToSecuredURI$</AttributeValue> 78 79 <ResourceAttributeDesignator 79 80 AttributeId="urn:siteA:security:authz:1.0:attr:resourceURI" 80 81 DataType="http://www.w3.org/2001/XMLSchema#anyURI"/> 81 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">^http://localhost/test_accessDeniedToSecuredURI$</AttributeValue>82 82 </ResourceMatch> 83 83 </Resource>
Note: See TracChangeset
for help on using the changeset viewer.