mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-31 06:38:42 +00:00 
			
		
		
		
	Latest updates to namespace configuration.
This commit is contained in:
		
							parent
							
								
									28d04c1759
								
							
						
					
					
						commit
						d6fe97de43
					
				| @ -3,6 +3,14 @@ namespace beans = "http://www.springframework.org/schema/beans" | |||||||
| namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" | namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" | ||||||
| datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" | datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" | ||||||
| 
 | 
 | ||||||
|  | #default namespace = "http://www.springframework.org/schema/security" | ||||||
|  | 
 | ||||||
|  | path-type = | ||||||
|  |     ## Defines the type types of pattern used to specify URL paths. Defaults to "ant" | ||||||
|  |     [ a:defaultValue = "ant" ] attribute pathType {"regex" | "ant"} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| autoconfig =  | autoconfig =  | ||||||
|     ## Provides automatic security configration for a application |     ## Provides automatic security configration for a application | ||||||
|     element autoconfig {autoconfig.attlist, empty} |     element autoconfig {autoconfig.attlist, empty} | ||||||
| @ -39,25 +47,31 @@ protect.attlist &= | |||||||
| 
 | 
 | ||||||
| http = | http = | ||||||
|     ## Container element for HTTP security configuration |     ## Container element for HTTP security configuration | ||||||
|    element http {http.attlist, intercept-url+, form-login?, logout? } |    element http {http.attlist, intercept-url+, logout?, form-login?, http-basic? } | ||||||
| http.attlist &= | http.attlist &= | ||||||
|     ## Controls the eagerness with which an HTTP session is created. |     ## Controls the eagerness with which an HTTP session is created. | ||||||
|     [ a:defaultValue = "ifRequired" ] attribute createSession {"ifRequired" | "always" | "never" }? |     [ a:defaultValue = "ifRequired" ] attribute createSession {"ifRequired" | "always" | "never" }? | ||||||
| http.attlist &= | http.attlist &= | ||||||
|     ## Defines the type of path used to define URLs in child elements.  |     ## The path format used to define the paths used in child elements.  | ||||||
|     [ a:defaultValue = "ant" ] attribute pathType {"regex" | "ant"}? |     path-type? | ||||||
| http.attlist &= | http.attlist &= | ||||||
|     ## Whether test URLs should be converted to lower case prior to comparing with defined path patterns. |     ## Whether test URLs should be converted to lower case prior to comparing with defined path patterns. | ||||||
|     [ a:defaultValue = "true" ] attribute lowerCaseComparisons {"true" | "true"}? |     [ a:defaultValue = "true" ] attribute lowerCaseComparisons {"true" | "false"}? | ||||||
| 
 | 
 | ||||||
| intercept-url = | intercept-url = | ||||||
|  |     ## Specifies the access attributes and/or filter list for a particular set of URLs. | ||||||
|     element intercept-url {intercept-url.attlist, empty} |     element intercept-url {intercept-url.attlist, empty} | ||||||
| intercept-url.attlist &= | intercept-url.attlist &= | ||||||
|     attribute path {xsd:string}  |     ## The pattern which defines the URL path. The content will depend on the type set in the containing http element, so will | ||||||
|  |     ## default to ant path syntax.     | ||||||
|  |     attribute pattern {xsd:string}  | ||||||
| intercept-url.attlist &= | intercept-url.attlist &= | ||||||
|  |     ## The access configuration attributes that apply for the configured path. | ||||||
|     attribute access {xsd:string}? |     attribute access {xsd:string}? | ||||||
|  |     ## The filter list for the path. Currently can be set to "none" to remove a path from having any filters applied. | ||||||
|  |     ## The full filter stack (consisting of all defined filters, will be applied to any other paths). | ||||||
| intercept-url.attlist &= | intercept-url.attlist &= | ||||||
|     attribute filters {xsd:string}? |     attribute filters {"none"}? | ||||||
| 
 | 
 | ||||||
| logout = | logout = | ||||||
|     element logout {logout.attlist, empty} |     element logout {logout.attlist, empty} | ||||||
| @ -74,6 +88,40 @@ form-login = | |||||||
| form-login.attlist &= | form-login.attlist &= | ||||||
|     ## The URL that the form is submitted to |     ## The URL that the form is submitted to | ||||||
|     [ a:defaultValue = "/j_spring_security_check" ] attribute loginUrl {xsd:string}?    |     [ a:defaultValue = "/j_spring_security_check" ] attribute loginUrl {xsd:string}?    | ||||||
|  | form-login.attlist &= | ||||||
|  |     ## The URL for the login page | ||||||
|  |     attribute loginPage {xsd:string}?    | ||||||
|  | 
 | ||||||
|  | filter-chain-map =  | ||||||
|  |     ## Used to explicitly configure a FilterChainProxy instance with a FilterChainMap | ||||||
|  |     element filter-chain-map {filter-chain-map.attlist, filter-chain+} | ||||||
|  | filter-chain-map.attlist &= | ||||||
|  |     path-type     | ||||||
|  | 
 | ||||||
|  | filter-chain = | ||||||
|  |     ## Used within filter-chain-map to define a specific URL pattern and the list of filters  | ||||||
|  |     ## which apply to the URLs matching that pattern. When multiple filter-chain elements are used within a | ||||||
|  |     ## filter-chain-map element, the most specific patterns must be placed at the top of the list, with  | ||||||
|  |     ## most general ones at the bottom. | ||||||
|  |     element filter-chain {filter-chain.attlist, empty} | ||||||
|  | filter-chain.attlist &=  | ||||||
|  |     attribute pattern {xsd:string} | ||||||
|  | filter-chain.attlist &=  | ||||||
|  |     attribute filters {xsd:string} | ||||||
|  | 
 | ||||||
|  | http-basic = | ||||||
|  |     ## Adds support for basic authentication | ||||||
|  |     element http-basic {http-basic.attlist, empty} | ||||||
|  | http-basic.attlist &=  | ||||||
|  |     attribute realm {xsd:string} | ||||||
|  | 
 | ||||||
|  | concurrent-sessions = | ||||||
|  |     ## Adds support for concurrent session control, allowing limits to be placed on the number of sessions a | ||||||
|  |     ## user can have. | ||||||
|  |     element concurrent-sessions {concurrent-sessions.attlist, empty} | ||||||
|  | concurrent-sessions.attlist &= | ||||||
|  |     attribute maxSessions {xsd:positiveInteger}? | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| authentication-provider = | authentication-provider = | ||||||
|     element authentication-provider {authentication-provider.attlist, (user-service | jdbc-user-service)} |     element authentication-provider {authentication-provider.attlist, (user-service | jdbc-user-service)} | ||||||
|  | |||||||
| @ -1,9 +1,23 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <xs:schema xmlns="http://www.springframework.org/schema/security" | <xs:schema xmlns="http://www.springframework.org/schema/security" | ||||||
| 	xmlns:xs="http://www.w3.org/2001/XMLSchema" |   xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
| 	targetNamespace="http://www.springframework.org/schema/security" |   targetNamespace="http://www.springframework.org/schema/security" | ||||||
| 	xmlns:beans="http://www.springframework.org/schema/beans" |   xmlns:beans="http://www.springframework.org/schema/beans" | ||||||
| 	elementFormDefault="qualified" attributeFormDefault="unqualified"> |   elementFormDefault="qualified" attributeFormDefault="unqualified"> | ||||||
|  |   <!-- default namespace = "http://www.springframework.org/schema/security" --> | ||||||
|  |   <xs:attributeGroup name="path-type"> | ||||||
|  |     <xs:attribute name="pathType" use="required"> | ||||||
|  |       <xs:annotation> | ||||||
|  |         <xs:documentation>Defines the type types of pattern used to specify URL paths. Defaults to "ant"</xs:documentation> | ||||||
|  |       </xs:annotation> | ||||||
|  |       <xs:simpleType> | ||||||
|  |         <xs:restriction base="xs:token"> | ||||||
|  |           <xs:enumeration value="regex"/> | ||||||
|  |           <xs:enumeration value="ant"/> | ||||||
|  |         </xs:restriction> | ||||||
|  |       </xs:simpleType> | ||||||
|  |     </xs:attribute> | ||||||
|  |   </xs:attributeGroup> | ||||||
|   <xs:element name="autoconfig"> |   <xs:element name="autoconfig"> | ||||||
|     <xs:annotation> |     <xs:annotation> | ||||||
|       <xs:documentation>Provides automatic security configration for a application</xs:documentation> |       <xs:documentation>Provides automatic security configration for a application</xs:documentation> | ||||||
| @ -64,8 +78,9 @@ | |||||||
|     <xs:complexType> |     <xs:complexType> | ||||||
|       <xs:sequence> |       <xs:sequence> | ||||||
|         <xs:element maxOccurs="unbounded" ref="intercept-url"/> |         <xs:element maxOccurs="unbounded" ref="intercept-url"/> | ||||||
|         <xs:element minOccurs="0" ref="form-login"/> |  | ||||||
|         <xs:element minOccurs="0" ref="logout"/> |         <xs:element minOccurs="0" ref="logout"/> | ||||||
|  |         <xs:element minOccurs="0" ref="form-login"/> | ||||||
|  |         <xs:element minOccurs="0" ref="http-basic"/> | ||||||
|       </xs:sequence> |       </xs:sequence> | ||||||
|       <xs:attributeGroup ref="http.attlist"/> |       <xs:attributeGroup ref="http.attlist"/> | ||||||
|     </xs:complexType> |     </xs:complexType> | ||||||
| @ -83,9 +98,9 @@ | |||||||
|         </xs:restriction> |         </xs:restriction> | ||||||
|       </xs:simpleType> |       </xs:simpleType> | ||||||
|     </xs:attribute> |     </xs:attribute> | ||||||
|     <xs:attribute name="pathType" default="ant"> |     <xs:attribute name="pathType"> | ||||||
|       <xs:annotation> |       <xs:annotation> | ||||||
|         <xs:documentation>Defines the type of path used to define URLs in child elements. </xs:documentation> |         <xs:documentation>Defines the type types of pattern used to specify URL paths. Defaults to "ant"</xs:documentation> | ||||||
|       </xs:annotation> |       </xs:annotation> | ||||||
|       <xs:simpleType> |       <xs:simpleType> | ||||||
|         <xs:restriction base="xs:token"> |         <xs:restriction base="xs:token"> | ||||||
| @ -101,20 +116,33 @@ | |||||||
|       <xs:simpleType> |       <xs:simpleType> | ||||||
|         <xs:restriction base="xs:token"> |         <xs:restriction base="xs:token"> | ||||||
|           <xs:enumeration value="true"/> |           <xs:enumeration value="true"/> | ||||||
|           <xs:enumeration value="true"/> |           <xs:enumeration value="false"/> | ||||||
|         </xs:restriction> |         </xs:restriction> | ||||||
|       </xs:simpleType> |       </xs:simpleType> | ||||||
|     </xs:attribute> |     </xs:attribute> | ||||||
|   </xs:attributeGroup> |   </xs:attributeGroup> | ||||||
|   <xs:element name="intercept-url"> |   <xs:element name="intercept-url"> | ||||||
|  |     <xs:annotation> | ||||||
|  |       <xs:documentation>Specifies the access attributes and/or filter list for a particular set of URLs.</xs:documentation> | ||||||
|  |     </xs:annotation> | ||||||
|     <xs:complexType> |     <xs:complexType> | ||||||
|       <xs:attributeGroup ref="intercept-url.attlist"/> |       <xs:attributeGroup ref="intercept-url.attlist"/> | ||||||
|     </xs:complexType> |     </xs:complexType> | ||||||
|   </xs:element> |   </xs:element> | ||||||
|   <xs:attributeGroup name="intercept-url.attlist"> |   <xs:attributeGroup name="intercept-url.attlist"> | ||||||
|     <xs:attribute name="path" use="required" type="xs:string"/> |     <xs:attribute name="pattern" use="required" type="xs:string"/> | ||||||
|     <xs:attribute name="access" type="xs:string"/> |     <xs:attribute name="access" type="xs:string"> | ||||||
|     <xs:attribute name="filters" type="xs:string"/> |       <xs:annotation> | ||||||
|  |         <xs:documentation>The access configuration attributes that apply for the configured path.</xs:documentation> | ||||||
|  |       </xs:annotation> | ||||||
|  |     </xs:attribute> | ||||||
|  |     <xs:attribute name="filters"> | ||||||
|  |       <xs:simpleType> | ||||||
|  |         <xs:restriction base="xs:token"> | ||||||
|  |           <xs:enumeration value="none"/> | ||||||
|  |         </xs:restriction> | ||||||
|  |       </xs:simpleType> | ||||||
|  |     </xs:attribute> | ||||||
|   </xs:attributeGroup> |   </xs:attributeGroup> | ||||||
|   <xs:element name="logout"> |   <xs:element name="logout"> | ||||||
|     <xs:complexType> |     <xs:complexType> | ||||||
| @ -147,6 +175,53 @@ | |||||||
|         <xs:documentation>The URL that the form is submitted to</xs:documentation> |         <xs:documentation>The URL that the form is submitted to</xs:documentation> | ||||||
|       </xs:annotation> |       </xs:annotation> | ||||||
|     </xs:attribute> |     </xs:attribute> | ||||||
|  |     <xs:attribute name="loginPage" type="xs:string"> | ||||||
|  |       <xs:annotation> | ||||||
|  |         <xs:documentation>The URL for the login page</xs:documentation> | ||||||
|  |       </xs:annotation> | ||||||
|  |     </xs:attribute> | ||||||
|  |   </xs:attributeGroup> | ||||||
|  |   <xs:element name="filter-chain-map"> | ||||||
|  |     <xs:annotation> | ||||||
|  |       <xs:documentation>Used to explicitly configure a FilterChainProxy instance with a FilterChainMap</xs:documentation> | ||||||
|  |     </xs:annotation> | ||||||
|  |     <xs:complexType> | ||||||
|  |       <xs:sequence> | ||||||
|  |         <xs:element maxOccurs="unbounded" ref="filter-chain"/> | ||||||
|  |       </xs:sequence> | ||||||
|  |       <xs:attributeGroup ref="filter-chain-map.attlist"/> | ||||||
|  |     </xs:complexType> | ||||||
|  |   </xs:element> | ||||||
|  |   <xs:attributeGroup name="filter-chain-map.attlist"> | ||||||
|  |     <xs:attributeGroup ref="path-type"/> | ||||||
|  |   </xs:attributeGroup> | ||||||
|  |   <xs:element name="filter-chain"> | ||||||
|  |     <xs:complexType> | ||||||
|  |       <xs:attributeGroup ref="filter-chain.attlist"/> | ||||||
|  |     </xs:complexType> | ||||||
|  |   </xs:element> | ||||||
|  |   <xs:attributeGroup name="filter-chain.attlist"> | ||||||
|  |     <xs:attribute name="pattern" use="required" type="xs:string"/> | ||||||
|  |     <xs:attribute name="filters" use="required" type="xs:string"/> | ||||||
|  |   </xs:attributeGroup> | ||||||
|  |   <xs:element name="http-basic"> | ||||||
|  |     <xs:annotation> | ||||||
|  |       <xs:documentation>Adds support for basic authentication</xs:documentation> | ||||||
|  |     </xs:annotation> | ||||||
|  |     <xs:complexType> | ||||||
|  |       <xs:attributeGroup ref="http-basic.attlist"/> | ||||||
|  |     </xs:complexType> | ||||||
|  |   </xs:element> | ||||||
|  |   <xs:attributeGroup name="http-basic.attlist"> | ||||||
|  |     <xs:attribute name="realm" use="required" type="xs:string"/> | ||||||
|  |   </xs:attributeGroup> | ||||||
|  |   <xs:element name="concurrent-sessions"> | ||||||
|  |     <xs:complexType> | ||||||
|  |       <xs:attributeGroup ref="concurrent-sessions.attlist"/> | ||||||
|  |     </xs:complexType> | ||||||
|  |   </xs:element> | ||||||
|  |   <xs:attributeGroup name="concurrent-sessions.attlist"> | ||||||
|  |     <xs:attribute name="maxSessions" type="xs:positiveInteger"/> | ||||||
|   </xs:attributeGroup> |   </xs:attributeGroup> | ||||||
|   <xs:element name="authentication-provider"> |   <xs:element name="authentication-provider"> | ||||||
|     <xs:complexType> |     <xs:complexType> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user