mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-30 22:28:46 +00:00 
			
		
		
		
	SEC-788: x509 authentication does not work properly
http://jira.springframework.org/browse/SEC-788. Added check for X509 element when choosing entry point, if nothing else is available.
This commit is contained in:
		
							parent
							
								
									e12b6afefa
								
							
						
					
					
						commit
						1258fa854e
					
				| @ -408,15 +408,21 @@ public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser { | ||||
|         	return;        	 | ||||
|         } | ||||
|          | ||||
|         // Otherwise use OpenID | ||||
|         // Otherwise use OpenID if enabled | ||||
|         if (openIDFilter != null && formLoginFilter == null) { | ||||
|         	parserContext.getRegistry().registerAlias(BeanIds.OPEN_ID_ENTRY_POINT, BeanIds.MAIN_ENTRY_POINT); | ||||
|         	return;        	 | ||||
|         } | ||||
|          | ||||
|         parserContext.getReaderContext().error("No AuthenticationEntryPoint could be established. Please" + | ||||
|         		"make sure you have a login mechanism configured through the namespace (such as form-login) or" + | ||||
|         		"specify a custom AuthenticationEntryPoint with the custom-entry-point-ref  ",  | ||||
|         // If X.509 has been enabled, use the preauth entry point. | ||||
|         if (DomUtils.getChildElementByTagName(element, Elements.X509) != null) { | ||||
|             parserContext.getRegistry().registerAlias(BeanIds.PRE_AUTH_ENTRY_POINT, BeanIds.MAIN_ENTRY_POINT); | ||||
|             return; | ||||
|         } | ||||
|          | ||||
|         parserContext.getReaderContext().error("No AuthenticationEntryPoint could be established. Please " + | ||||
|         		"make sure you have a login mechanism configured through the namespace (such as form-login) or " + | ||||
|         		"specify a custom AuthenticationEntryPoint with the custom-entry-point-ref attribute ",  | ||||
|                 parserContext.extractSource(element)); | ||||
|     } | ||||
|      | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user