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

Add Functionality to Verify whether a Given IdP is a Trusted Token Issuer #16981

Closed
dhaura opened this issue Oct 16, 2023 · 1 comment
Closed

Comments

@dhaura
Copy link
Contributor

dhaura commented Oct 16, 2023

Is your feature request related to a problem?

  • With the effort on enabling API Based authentication [1], there is a need to check whether a given IdP is a trusted token issuer in order to distinguish between the following modes under federation flows.
    • Mode 1: External IDP is configured in IS and the authentication is handled through IS by redirecting to the external IDP.
    • Mode 2: The app uses the IdP SDK for a social login option, for example, Google; and federating to Google directly from the app.
  • Here, Mode 2 flow will be executed, if the IdP is a trusted token issuer.
  • Hence, it is necessary to implement a verification mechanism for ascertaining whether the provided IdP is a trusted token issuer.

Describe the solution you would prefer

  • Introduce a new method within the IdentityProviderManagementService [2] class that facilitates the verification of a provided IdP as a trusted token issuer.

[1] - #15684
[2] - https://github.com/wso2/carbon-identity-framework/blob/master/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManagementService.java

@dhaura
Copy link
Contributor Author

dhaura commented Oct 17, 2023

Solution Update

  • Since AuthenticationContext object contains the ExternalIdPConfig object, which in turns contains the IdentityProvider object with its relevant IdP properties, there is no need to create a new method within the IdentityProviderManagementService [1] class that facilitates the verification of a provided IdP as a trusted token issuer.
  • Therefore, the verification mechanism for ascertaining whether the provided IdP is a trusted token issuer will be done in place at the OpenIDConnectAuthenticator[2] class using the IdP object retrieved through Authentication Context object.

[1] - https://github.com/wso2/carbon-identity-framework/blob/master/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManagementService.java
[2] - https://github.com/wso2-extensions/identity-outbound-auth-oidc/blob/master/components/org.wso2.carbon.identity.application.authenticator.oidc/src/main/java/org/wso2/carbon/identity/application/authenticator/oidc/OpenIDConnectAuthenticator.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants