Skip to content

Xnat 8577 1 - #13

Merged
mohana-xw merged 10 commits into
developfrom
XNAT-8577-1
Jul 29, 2026
Merged

Xnat 8577 1#13
mohana-xw merged 10 commits into
developfrom
XNAT-8577-1

Conversation

@mohana-xw

@mohana-xw mohana-xw commented Jul 29, 2026

Copy link
Copy Markdown

Changed the name of the alternate success handler.

Avoiding circular dependency

Spring starts creating SecurityConfig.
As part of that, it calls SecurityConfig.setXnatSecurityExtensions(...), which needs to construct OpenIdSecurityExtension.
That needs OpenIdConnectFilter, whose constructor runs right now, mid-construction of SecurityConfig.
Since no bean is qualified with ALTERNATE_SUCCESS_HANDLER, it falls back to XDAT.getContextService().getBean(OnXnatLogin.class).
But OnXnatLogin is a bean that SecurityConfig itself is supposed to produce — and SecurityConfig hasn't finished being built yet, so it hasn't reached the point of registering that bean. The lookup finds nothing and returns null.

It's a bootstrap-order circular dependency: SecurityConfig → OpenIdSecurityExtension → OpenIdConnectFilter → (needs) OnXnatLogin → (defined by) SecurityConfig. There's no ordering of bean creation that satisfies this as written, so it will fail deterministically every time no alternate handler is supplied.

@mohana-xw
mohana-xw requested review from karchie and rherrick July 29, 2026 10:37
Comment thread src/main/java/au/edu/qcif/xnat/auth/openid/OpenIdConnectFilter.java Outdated

@kathrynalpert kathrynalpert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending removal of unused method

Comment thread src/main/java/au/edu/qcif/xnat/auth/openid/OpenIdConnectFilter.java Outdated
@mohana-xw
mohana-xw merged commit cf0fd78 into develop Jul 29, 2026
1 check passed
@andylassiter andylassiter mentioned this pull request Aug 31, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants