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

Error occured with custom authenticator in B2B login flows #23317

Open
Thisara-Welmilla opened this issue Mar 1, 2025 · 0 comments
Open

Error occured with custom authenticator in B2B login flows #23317

Thisara-Welmilla opened this issue Mar 1, 2025 · 0 comments

Comments

@Thisara-Welmilla
Copy link
Contributor

Thisara-Welmilla commented Mar 1, 2025

Description

Feature issue:

For B2B scenarios, the context.subject() becomes null when comes to second step, even through there is a authenticated user from the previous step. Due to this, following errors occurred.

  1. In a sub organization, create a local authenticator and use it as a second step. Got following error,
TID: [25237] Tenant: [00bdf7be-f70c-46ad-9085-66c0ae23070a] [2025-02-27 06:00:30,820] [20250227T060030Z-167c755789djnhhnhC1SG1sch000000003cg000000003nzm] : iam-cloud-carbon : ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - Exception in Authentication Framework java.lang.NullPointerException: null| at org.wso2.carbon.identity.application.authentication.framework.AbstractApplicationAuthenticator.process(AbstractApplicationAuthenticator.java:117) ~[org.wso2.carbon.identity.application.authentication.framework_7.8.23.jar:?]| at org.wso2.carbon.identity.application.authenticator.adapter.internal.AbstractAuthenticatorAdapter.process(AbstractAuthenticatorAdapter.java:108) ~[?:?]| at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.doAuthentication(DefaultStepHandler.java:747) ~[org.wso2.carbon.identity.application.authentication.framework_7.8.23.jar:?]| at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handleResponse(DefaultStepHandler.java:702) ~[org.wso2.carbon.identity.application.authentication.framework_7.8.23.jar:?]| at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handle(DefaultStepHandler.java:252) ~[org.wso2.carbon.identity.application.authentication.framework_7.8.23.jar:?]| at org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:215) 
  1. In sub org login flow, when 2FA authenticator is engaged in the currently authenticated user details are not in request to the external authentication service.

{\n' +    "  actionType: 'AUTHENTICATION',\n" +    "  flowId: '587d6c07-29ec-4010-b196-3a06c329bf10',\n" +    '  event: {\n' +    "    tenant: { id: '25237', name: '00bdf7be-f70c-46ad-9085-66c0ae23070a' },\n" +    '    application: {\n' +    "      id: 'f632cc97-7d61-401e-a8f2-0e0149a9e20d',\n" +    "      name: 'oidcdebugger'\n" +    '    },\n' +    '    currentStepIndex: 2,\n' +    "    authenticatedSteps: [ { index: 1, name: 'BasicAuthenticator' } ]\n" +    '  },\n' +    "  allowedOperations: [ { op: 'redirect' } ]\n" +    '}'

Steps to Reproduce

Scenario 1:

  1. Create a internal custom authenticator and engage it in 2nd step of the B2B login flow.
  2. Try login, will get redirect to error page.

Scenario 2:

  1. Create a 2FA custom authenticator and engage it in 2nd step of the B2B login flow.
  2. The currently authenticated user details are not in request to the external authentication service.

Version

7.1.0

Environment Details (with versions)

No response

@Thisara-Welmilla Thisara-Welmilla self-assigned this Mar 1, 2025
@Thisara-Welmilla Thisara-Welmilla moved this to In Progress in Identity Server-7.2.0 Mar 1, 2025
@Thisara-Welmilla Thisara-Welmilla changed the title Error occured with custom authenticator in B2B login flows due to subject Error occured with custom authenticator in B2B login flows Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant