Skip to content

Security configurations causing StackOverflowError #7768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arahlf opened this issue Dec 23, 2019 · 1 comment
Closed

Security configurations causing StackOverflowError #7768

arahlf opened this issue Dec 23, 2019 · 1 comment
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@arahlf
Copy link

arahlf commented Dec 23, 2019

Using Spring to configure a server application with a PreAuthenticatedAuthenticationProvider, but when running it I end up with a StackOverflowError. An example project that reproduces the issue (run the tests) is here: https://github.com/arahlf/StackOverflowErrorExample

The end of the stack trace looks like:

java.lang.StackOverflowError: null
	at java.lang.Exception.<init>(Exception.java:102) ~[na:1.8.0_172]
	at java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:89) ~[na:1.8.0_172]
	at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72) ~[na:1.8.0_172]
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205) ~[spring-aop-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at com.sun.proxy.$Proxy79.authenticate(Unknown Source) ~[na:na]
	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:195) ~[spring-security-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter$AuthenticationManagerDelegator.authenticate(WebSecurityConfigurerAdapter.java:501) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205) ~[spring-aop-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at com.sun.proxy.$Proxy79.authenticate(Unknown Source) ~[na:na]
	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:195) ~[spring-security-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]

I posted this initially over on the Spring Boot project, but was told to move the issue to here. Any ideas? Did I just configure something incorrectly?

Thanks

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 23, 2019
@jzheaux jzheaux self-assigned this Dec 24, 2019
@jzheaux jzheaux assigned jzheaux and unassigned jzheaux Apr 14, 2020
@jzheaux
Copy link
Contributor

jzheaux commented Apr 17, 2020

I think this is probably a duplicate of #8369

@jzheaux jzheaux closed this as completed Apr 17, 2020
@jzheaux jzheaux added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants