SEC-1118: Added run-as-manager-ref attribute to global-method-security element. Also updated schema to use xsd:token in place of xsd:string where appropriate.
## A bean identifier, used for referring to the bean elsewhere in the context.
## A bean identifier, used for referring to the bean elsewhere in the context.
attribute id {xsd:ID}
attribute id {xsd:ID}
ref =
ref =
## Defines a reference to a Spring bean Id.
## Defines a reference to a Spring bean Id.
attribute ref {xsd:string}
attribute ref {xsd:token}
cache-ref =
cache-ref =
## Defines a reference to a cache for use with a UserDetailsService.
## Defines a reference to a cache for use with a UserDetailsService.
attribute cache-ref {xsd:string}
attribute cache-ref {xsd:token}
user-service-ref =
user-service-ref =
## A reference to a user-service (or UserDetailsService bean) Id
## A reference to a user-service (or UserDetailsService bean) Id
attribute user-service-ref {xsd:string}
attribute user-service-ref {xsd:token}
data-source-ref =
data-source-ref =
## A reference to a DataSource bean
## A reference to a DataSource bean
attribute data-source-ref {xsd:string}
attribute data-source-ref {xsd:token}
password-encoder =
password-encoder =
## element which defines a password encoding strategy. Used by an authentication provider to convert submitted passwords to hashed versions, for example.
## element which defines a password encoding strategy. Used by an authentication provider to convert submitted passwords to hashed versions, for example.
@ -50,16 +50,16 @@ salt-source =
element salt-source {user-property | system-wide | ref}
element salt-source {user-property | system-wide | ref}
user-property =
user-property =
## A property of the UserDetails object which will be used as salt by a password encoder. Typically something like "username" might be used.
## A property of the UserDetails object which will be used as salt by a password encoder. Typically something like "username" might be used.
attribute user-property {xsd:string}
attribute user-property {xsd:token}
system-wide =
system-wide =
## A single value that will be used as the salt for a password encoder.
## A single value that will be used as the salt for a password encoder.
attribute system-wide {xsd:string}
attribute system-wide {xsd:token}
boolean = "true" | "false"
boolean = "true" | "false"
role-prefix =
role-prefix =
## A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.
## A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.
attribute role-prefix {xsd:string}
attribute role-prefix {xsd:token}
use-expressions =
use-expressions =
## Enables the use of expressions in the 'access' attributes in <intercept-url> elements rather than the traditional list of configuration attributes. Defaults to 'false'. If enabled, each attribute should contain a single boolean expression. If the expression evaluates to 'true', access will be granted.
## Enables the use of expressions in the 'access' attributes in <intercept-url> elements rather than the traditional list of configuration attributes. Defaults to 'false'. If enabled, each attribute should contain a single boolean expression. If the expression evaluates to 'true', access will be granted.
@ -85,24 +85,24 @@ ldap-server.attlist &=
ldap-server-ref-attribute =
ldap-server-ref-attribute =
## The optional server to use. If omitted, and a default LDAP server is registered (using <ldap-server> with no Id), that server will be used.
## The optional server to use. If omitted, and a default LDAP server is registered (using <ldap-server> with no Id), that server will be used.
attribute server-ref {xsd:string}
attribute server-ref {xsd:token}
group-search-filter-attribute =
group-search-filter-attribute =
## Group search filter. Defaults to (uniqueMember={0}). The substituted parameter is the DN of the user.
## Group search filter. Defaults to (uniqueMember={0}). The substituted parameter is the DN of the user.
attribute group-search-filter {xsd:string}
attribute group-search-filter {xsd:token}
group-search-base-attribute =
group-search-base-attribute =
## Search base for group membership searches. Defaults to "" (searching from the root).
## Search base for group membership searches. Defaults to "" (searching from the root).
attribute group-search-base {xsd:string}
attribute group-search-base {xsd:token}
user-search-filter-attribute =
user-search-filter-attribute =
## The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.
## The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.
attribute user-search-filter {xsd:string}
attribute user-search-filter {xsd:token}
user-search-base-attribute =
user-search-base-attribute =
## Search base for user searches. Defaults to "". Only used with a 'user-search-filter'.
## Search base for user searches. Defaults to "". Only used with a 'user-search-filter'.
attribute user-search-base {xsd:string}
attribute user-search-base {xsd:token}
group-role-attribute-attribute =
group-role-attribute-attribute =
## The LDAP attribute name which contains the role name which will be used within Spring Security. Defaults to "cn".
## The LDAP attribute name which contains the role name which will be used within Spring Security. Defaults to "cn".
attribute group-role-attribute {xsd:string}
attribute group-role-attribute {xsd:token}
user-details-class-attribute =
user-details-class-attribute =
## Allows the objectClass of the user entry to be specified. If set, the framework will attempt to load standard attributes for the defined class into the returned UserDetails object
## Allows the objectClass of the user entry to be specified. If set, the framework will attempt to load standard attributes for the defined class into the returned UserDetails object
## A specific pattern used to build the user's DN, for example "uid={0},ou=people". The key "{0}" must be present and will be substituted with the username.
## A specific pattern used to build the user's DN, for example "uid={0},ou=people". The key "{0}" must be present and will be substituted with the username.
attribute user-dn-pattern {xsd:string}?
attribute user-dn-pattern {xsd:token}?
ldap-ap.attlist &=
ldap-ap.attlist &=
role-prefix?
role-prefix?
ldap-ap.attlist &=
ldap-ap.attlist &=
@ -159,7 +159,7 @@ password-compare-element =
password-compare.attlist &=
password-compare.attlist &=
## The attribute in the directory which contains the user password. Defaults to "userPassword".
## The attribute in the directory which contains the user password. Defaults to "userPassword".
attribute password-attribute {xsd:string}?
attribute password-attribute {xsd:token}?
password-compare.attlist &=
password-compare.attlist &=
hash?
hash?
@ -168,7 +168,7 @@ intercept-methods =
element intercept-methods {intercept-methods.attlist, protect+}
element intercept-methods {intercept-methods.attlist, protect+}
intercept-methods.attlist &=
intercept-methods.attlist &=
## Optional AccessDecisionManager bean ID to be used by the created method security interceptor.
## Optional AccessDecisionManager bean ID to be used by the created method security interceptor.
## Optional RunAsmanager implementation which will be used by the configured MethodSecurityInterceptor
attribute run-as-manager-ref {xsd:token}?
expression-handler =
expression-handler =
## Defines the SecurityExpressionHandler instance which will be used if expression-based access-control is enabled. A default implementation (with no ACL support) will be used if not supplied.
## Defines the SecurityExpressionHandler instance which will be used if expression-based access-control is enabled. A default implementation (with no ACL support) will be used if not supplied.
@ -214,7 +217,7 @@ protect-pointcut.attlist &=
attribute expression {xsd:string}
attribute expression {xsd:string}
protect-pointcut.attlist &=
protect-pointcut.attlist &=
## Access configuration attributes list that applies to all methods matching the pointcut, e.g. "ROLE_A,ROLE_B"
## Access configuration attributes list that applies to all methods matching the pointcut, e.g. "ROLE_A,ROLE_B"
## Optional attribute specifying the realm name that will be used for all authentication features that require a realm name (eg BASIC and Digest authentication). If unspecified, defaults to "Spring Security Application".
## Optional attribute specifying the realm name that will be used for all authentication features that require a realm name (eg BASIC and Digest authentication). If unspecified, defaults to "Spring Security Application".
attribute realm {xsd:string}?
attribute realm {xsd:token}?
http.attlist &=
http.attlist &=
## Indicates whether an existing session should be invalidated when a user authenticates and a new session started. If set to "none" no change will be made. "newSession" will create a new empty session. "migrateSession" will create a new session and copy the session attributes to the new session. Defaults to "migrateSession".
## Indicates whether an existing session should be invalidated when a user authenticates and a new session started. If set to "none" no change will be made. "newSession" will create a new empty session. "migrateSession" will create a new session and copy the session attributes to the new session. Defaults to "migrateSession".
## Specifies the URL that will cause a logout. Spring Security will initialize a filter that responds to this particular URL. Defaults to /j_spring_security_logout if unspecified.
## Specifies the URL that will cause a logout. Spring Security will initialize a filter that responds to this particular URL. Defaults to /j_spring_security_logout if unspecified.
attribute logout-url {xsd:string}?
attribute logout-url {xsd:token}?
logout.attlist &=
logout.attlist &=
## Specifies the URL to display once the user has logged out. If not specified, defaults to /.
## Specifies the URL to display once the user has logged out. If not specified, defaults to /.
attribute logout-success-url {xsd:string}?
attribute logout-success-url {xsd:token}?
logout.attlist &=
logout.attlist &=
## Specifies whether a logout also causes HttpSession invalidation, which is generally desirable. If unspecified, defaults to true.
## Specifies whether a logout also causes HttpSession invalidation, which is generally desirable. If unspecified, defaults to true.
attribute invalidate-session {boolean}?
attribute invalidate-session {boolean}?
@ -309,25 +312,25 @@ form-login =
element form-login {form-login.attlist, empty}
element form-login {form-login.attlist, empty}
form-login.attlist &=
form-login.attlist &=
## The URL that the login form is posted to. If unspecified, it defaults to /j_spring_security_check.
## The URL that the login form is posted to. If unspecified, it defaults to /j_spring_security_check.
attribute login-processing-url {xsd:string}?
attribute login-processing-url {xsd:token}?
form-login.attlist &=
form-login.attlist &=
## The URL that will be redirected to after successful authentication, if the user's previous action could not be resumed. This generally happens if the user visits a login page without having first requested a secured operation that triggers authentication. If unspecified, defaults to the root of the application.
## The URL that will be redirected to after successful authentication, if the user's previous action could not be resumed. This generally happens if the user visits a login page without having first requested a secured operation that triggers authentication. If unspecified, defaults to the root of the application.
attribute default-target-url {xsd:string}?
attribute default-target-url {xsd:token}?
form-login.attlist &=
form-login.attlist &=
## Whether the user should always be redirected to the default-target-url after login.
## Whether the user should always be redirected to the default-target-url after login.
attribute always-use-default-target {boolean}?
attribute always-use-default-target {boolean}?
form-login.attlist &=
form-login.attlist &=
## The URL for the login page. If no login URL is specified, Spring Security will automatically create a login URL at /spring_security_login and a corresponding filter to render that login URL when requested.
## The URL for the login page. If no login URL is specified, Spring Security will automatically create a login URL at /spring_security_login and a corresponding filter to render that login URL when requested.
attribute login-page {xsd:string}?
attribute login-page {xsd:token}?
form-login.attlist &=
form-login.attlist &=
## The URL for the login failure page. If no login failure URL is specified, Spring Security will automatically create a failure login URL at /spring_security_login?login_error and a corresponding filter to render that login failure URL when requested.
## The URL for the login failure page. If no login failure URL is specified, Spring Security will automatically create a failure login URL at /spring_security_login?login_error and a corresponding filter to render that login failure URL when requested.
## Reference to an AuthenticationSuccessHandler bean which should be used to handle a successful authentication request. Should not be used in combination with default-target-url (or always-use-default-target-url) as the implementation should always deal with navigation to the subsequent destination
## Reference to an AuthenticationSuccessHandler bean which should be used to handle a successful authentication request. Should not be used in combination with default-target-url (or always-use-default-target-url) as the implementation should always deal with navigation to the subsequent destination
## Reference to an AuthenticationFailureHandler bean which should be used to handle a failed authentication request. Should not be used in combination with authentication-failure-url as the implementation should always deal with navigation to the subsequent destination
## Reference to an AuthenticationFailureHandler bean which should be used to handle a failed authentication request. Should not be used in combination with authentication-failure-url as the implementation should always deal with navigation to the subsequent destination
## 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.
## 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}
element filter-chain {filter-chain.attlist, empty}
filter-chain.attlist &=
filter-chain.attlist &=
attribute pattern {xsd:string}
attribute pattern {xsd:token}
filter-chain.attlist &=
filter-chain.attlist &=
attribute filters {xsd:string}
attribute filters {xsd:token}
filter-invocation-definition-source =
filter-invocation-definition-source =
## Used to explicitly configure a FilterInvocationDefinitionSource bean for use with a FilterSecurityInterceptor. Usually only needed if you are configuring a FilterChainProxy explicitly, rather than using the <http> element. The intercept-url elements used should only contain pattern, method and access attributes. Any others will result in a configuration error.
## Used to explicitly configure a FilterInvocationDefinitionSource bean for use with a FilterSecurityInterceptor. Usually only needed if you are configuring a FilterChainProxy explicitly, rather than using the <http> element. The intercept-url elements used should only contain pattern, method and access attributes. Any others will result in a configuration error.
## The URL a user will be redirected to if they attempt to use a session which has been "expired" by the concurrent session controller because they have logged in again.
## The URL a user will be redirected to if they attempt to use a session which has been "expired" by the concurrent session controller because they have logged in again.
attribute expired-url {xsd:string}?
attribute expired-url {xsd:token}?
concurrent-sessions.attlist &=
concurrent-sessions.attlist &=
## Specifies that an exception should be raised when a user attempts to login when they already have the maximum configured sessions open. The default behaviour is to expire the original session.
## Specifies that an exception should be raised when a user attempts to login when they already have the maximum configured sessions open. The default behaviour is to expire the original session.
## Allows you to define an alias for the SessionRegistry bean in order to access it in your own configuration
## Allows you to define an alias for the SessionRegistry bean in order to access it in your own configuration
attribute session-registry-alias {xsd:string}?
attribute session-registry-alias {xsd:token}?
concurrent-sessions.attlist &=
concurrent-sessions.attlist &=
## A reference to an external SessionRegistry implementation which will be used in place of the standard one.
## A reference to an external SessionRegistry implementation which will be used in place of the standard one.
attribute session-registry-ref {xsd:string}?
attribute session-registry-ref {xsd:token}?
remember-me =
remember-me =
## Sets up remember-me authentication. If used with the "key" attribute (or no attributes) the cookie-only implementation will be used. Specifying "token-repository-ref" or "remember-me-data-source-ref" will use the more secure, persisten token approach.
## Sets up remember-me authentication. If used with the "key" attribute (or no attributes) the cookie-only implementation will be used. Specifying "token-repository-ref" or "remember-me-data-source-ref" will use the more secure, persisten token approach.
element remember-me {remember-me.attlist}
element remember-me {remember-me.attlist}
remember-me.attlist &=
remember-me.attlist &=
## The "key" used to identify cookies from a specific token-based remember-me application. You should set this to a unique value for your application.
## The "key" used to identify cookies from a specific token-based remember-me application. You should set this to a unique value for your application.
## Reference to a PersistentTokenRepository bean for use with the persistent token remember-me implementation.
## Reference to a PersistentTokenRepository bean for use with the persistent token remember-me implementation.
attribute token-repository-ref {xsd:string}
attribute token-repository-ref {xsd:token}
remember-me-services-ref =
remember-me-services-ref =
## Allows a custom implementation of RememberMeServices to be used. Note that this implementation should return RememberMeAuthenticationToken instances with the same "key" value as specified in the remember-me element. Alternatively it should register its own AuthenticationProvider.
## Allows a custom implementation of RememberMeServices to be used. Note that this implementation should return RememberMeAuthenticationToken instances with the same "key" value as specified in the remember-me element. Alternatively it should register its own AuthenticationProvider.
attribute services-ref {xsd:string}?
attribute services-ref {xsd:token}?
remember-me-data-source-ref =
remember-me-data-source-ref =
## DataSource bean for the database that contains the token repository schema.
## DataSource bean for the database that contains the token repository schema.
data-source-ref
data-source-ref
@ -419,13 +422,13 @@ anonymous =
element anonymous {anonymous.attlist}
element anonymous {anonymous.attlist}
anonymous.attlist &=
anonymous.attlist &=
## The key shared between the provider and filter. This generally does not need to be set. If unset, it will default to "doesNotMatter".
## The key shared between the provider and filter. This generally does not need to be set. If unset, it will default to "doesNotMatter".
attribute key {xsd:string}?
attribute key {xsd:token}?
anonymous.attlist &=
anonymous.attlist &=
## The username that should be assigned to the anonymous request. This allows the principal to be identified, which may be important for logging and auditing. if unset, defaults to "anonymousUser".
## The username that should be assigned to the anonymous request. This allows the principal to be identified, which may be important for logging and auditing. if unset, defaults to "anonymousUser".
attribute username {xsd:string}?
attribute username {xsd:token}?
anonymous.attlist &=
anonymous.attlist &=
## The granted authority that should be assigned to the anonymous request. Commonly this is used to assign the anonymous request particular roles, which can subsequently be used in authorization decisions. If unset, defaults to "ROLE_ANONYMOUS".
## The granted authority that should be assigned to the anonymous request. Commonly this is used to assign the anonymous request particular roles, which can subsequently be used in authorization decisions. If unset, defaults to "ROLE_ANONYMOUS".
attribute granted-authority {xsd:string}?
attribute granted-authority {xsd:token}?
port-mappings =
port-mappings =
## Defines the list of mappings between http and https ports for use in redirects
## Defines the list of mappings between http and https ports for use in redirects
@ -436,9 +439,9 @@ port-mappings.attlist &= empty
port-mapping =
port-mapping =
element port-mapping {http-port, https-port}
element port-mapping {http-port, https-port}
http-port = attribute http {xsd:string}
http-port = attribute http {xsd:token}
https-port = attribute https {xsd:string}
https-port = attribute https {xsd:token}
x509 =
x509 =
@ -446,7 +449,7 @@ x509 =
element x509 {x509.attlist}
element x509 {x509.attlist}
x509.attlist &=
x509.attlist &=
## The regular expression used to obtain the username from the certificate's subject. Defaults to matching on the common name using the pattern "CN=(.*?),".
## The regular expression used to obtain the username from the certificate's subject. Defaults to matching on the common name using the pattern "CN=(.*?),".
attribute subject-principal-regex {xsd:string}?
attribute subject-principal-regex {xsd:token}?
x509.attlist &=
x509.attlist &=
## Explicitly specifies which user-service should be used to load user data for X.509 authenticated clients. If ommitted, the default user-service will be used.
## Explicitly specifies which user-service should be used to load user data for X.509 authenticated clients. If ommitted, the default user-service will be used.
user-service-ref?
user-service-ref?
@ -459,7 +462,7 @@ authman.attlist &=
attribute alias {xsd:ID}
attribute alias {xsd:ID}
authman.attlist &=
authman.attlist &=
## Allows the session controller to be set on the internal AuthenticationManager. This should not be used with the <concurrent-session-control /> element
## Allows the session controller to be set on the internal AuthenticationManager. This should not be used with the <concurrent-session-control /> element
attribute session-controller-ref {xsd:string}?
attribute session-controller-ref {xsd:token}?
authentication-provider =
authentication-provider =
@ -478,20 +481,20 @@ user-service =
## Creates an in-memory UserDetailsService from a properties file or a list of "user" child elements.
## Creates an in-memory UserDetailsService from a properties file or a list of "user" child elements.
element user-service {id? & (properties-file | (user*))}
element user-service {id? & (properties-file | (user*))}
properties-file =
properties-file =
attribute properties {xsd:string}?
attribute properties {xsd:token}?
user =
user =
## Represents a user in the application.
## Represents a user in the application.
element user {user.attlist, empty}
element user {user.attlist, empty}
user.attlist &=
user.attlist &=
## The username assigned to the user.
## The username assigned to the user.
attribute name {xsd:string}
attribute name {xsd:token}
user.attlist &=
user.attlist &=
## The password assigned to the user. This may be hashed if the corresponding authentication provider supports hashing (remember to set the "hash" attribute of the "user-service" element).
## The password assigned to the user. This may be hashed if the corresponding authentication provider supports hashing (remember to set the "hash" attribute of the "user-service" element).
attribute password {xsd:string}
attribute password {xsd:string}
user.attlist &=
user.attlist &=
## One of more authorities granted to the user. Separate authorities with a comma (but no space). For example, "ROLE_USER,ROLE_ADMINISTRATOR"
## One of more authorities granted to the user. Separate authorities with a comma (but no space). For example, "ROLE_USER,ROLE_ADMINISTRATOR"
attribute authorities {xsd:string}
attribute authorities {xsd:token}
user.attlist &=
user.attlist &=
## Can be set to "true" to mark an account as locked and unusable.
## Can be set to "true" to mark an account as locked and unusable.
attribute locked {boolean}?
attribute locked {boolean}?
@ -504,18 +507,18 @@ jdbc-user-service =
element jdbc-user-service {id? & jdbc-user-service.attlist}
element jdbc-user-service {id? & jdbc-user-service.attlist}
jdbc-user-service.attlist &=
jdbc-user-service.attlist &=
## The bean ID of the DataSource which provides the required tables.
## The bean ID of the DataSource which provides the required tables.
attribute data-source-ref {xsd:string}
attribute data-source-ref {xsd:token}
jdbc-user-service.attlist &=
jdbc-user-service.attlist &=
cache-ref?
cache-ref?
jdbc-user-service.attlist &=
jdbc-user-service.attlist &=
## An SQL statement to query a username, password, and enabled status given a username
## An SQL statement to query a username, password, and enabled status given a username
attribute users-by-username-query {xsd:string}?
attribute users-by-username-query {xsd:token}?
jdbc-user-service.attlist &=
jdbc-user-service.attlist &=
## An SQL statement to query for a user's granted authorities given a username.
## An SQL statement to query for a user's granted authorities given a username.