Skip to content
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

java.lang.IllegalArgumentException: Null callback handler! after migration to 3.0 #354

Open
sergey-morenets opened this issue Mar 27, 2023 · 0 comments

Comments

@sergey-morenets
Copy link

Hi

We tried to migrate from Soteria 2.0 to 3.0 and got an exception after successful authentication in our UI:

java.lang.IllegalArgumentException: Null callback handler!
	org.glassfish.soteria.mechanisms.jaspic.Jaspic.handleCallbacks(Jaspic.java:165)
	org.glassfish.soteria.mechanisms.jaspic.Jaspic.notifyContainerAboutLogin(Jaspic.java:157)
	org.glassfish.soteria.mechanisms.HttpMessageContextImpl.doNothing(HttpMessageContextImpl.java:235)	org.glassfish.soteria.mechanisms.CustomFormAuthenticationMechanism.validateRequest(CustomFormAuthenticationMechanism.java:59)	org.glassfish.soteria.mechanisms.CustomFormAuthenticationMechanism$Proxy$_$$_WeldSubclass.validateRequest$$super(Unknown Source)

We have no idea why it happens. We register our module the same way it's done in your SamRegistrationInstaller:

            CDIPerRequestInitializer cdiPerRequestInitializer = null;

            if (!isEmpty(System.getProperty("wlp.server.name"))) {
                // Hardcode server check for now. TODO: design/implement proper service loader/SPI for this
                cdiPerRequestInitializer = new LibertyCDIPerRequestInitializer();
                logger.log(INFO, "Running on Liberty - installing CDI request scope activator");
            }

            AuthConfigFactory
                .getFactory()
                .registerServerAuthModule(new HttpBridgeServerAuthModule(cdiPerRequestInitializer), ctx);

            // Add a listener so we can process the context destroyed event, which is needed
            // to de-register the SAM correctly.
            ctx.addListener(this);

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

No branches or pull requests

1 participant