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 new DefinedBy property to authenticator config. #5938

Closed
wants to merge 14 commits into from

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Sep 16, 2024

Issue:

With this following properties will be introduce to the authenticator configs and Application Authenticators.

  • DefinedBy - to indicate whether the authenticator is system-defined or user-defined.
  1. SYSTEM: Sytem defined authenticators, all the existing authenticators are this type.
  2. USER: User defined authenticators, all the custom authenticators of authentication extension come under this type.
  • AuthenticationType - To indicate whether authenticator is one of following
  1. IDENTIFICATION: This authenticator collects the identifier and authenticates user accounts.
  2. VERIFICATION_ONLY: This authenticator can only verify users in the second or subsequent steps of the login
    process.

With this PR following changes are added.

  1. Add new authenticator property DefinedBy
  2. Add new property for authenticator config objects to hold the authenticator definedBy type.
  3. Update the config creation and saving logic to accommodate this new property.

NOTE: These property values are hardcoded for now. Saving and retrieving with DBs will supported by a separate PR.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging

This comment was marked as outdated.

@jenkins-is-staging
Copy link

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10899466830
Status: failure

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-auth-prop branch 2 times, most recently from 9fc695e to 99f7c76 Compare September 17, 2024 14:03
@wso2 wso2 deleted a comment from jenkins-is-staging Sep 18, 2024
@wso2 wso2 deleted a comment from jenkins-is-staging Sep 18, 2024
@wso2 wso2 deleted a comment from jenkins-is-staging Sep 18, 2024
@jenkins-is-staging
Copy link

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10915346651
Status: failure

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-auth-prop branch 2 times, most recently from 038f4a3 to 10bba5c Compare September 19, 2024 06:04
@malithie
Copy link
Member

@Thisara-Welmilla please refer to the right issue in this PR

@jenkins-is-staging
Copy link

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11063069457
Status: failure

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11064117139
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11064117139

Comment on lines 5037 to 5039
// TODO: Read from database and set the DefinedBy and authenticationType properties to the authenticator.
returnData.put(ApplicationConstants.IDP_AUTHENTICATOR_DEFINED_BY_TYPE,
IdentityConstants.DefinedByType.SYSTEM.toString());
Copy link
Member

Choose a reason for hiding this comment

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

Let's fix this before merging

Comment on lines 174 to 176
saml2SSOResidentAuthenticatorConfig.setDefinedByType(IdentityConstants.DefinedByType.SYSTEM);
saml2SSOResidentAuthenticatorConfig.setAuthenticationType(
IdentityConstants.AuthenticationType.IDENTIFICATION);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't these test cases should be working without setting these properties explicitly ?

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-auth-prop branch 2 times, most recently from 2ac85c6 to f30a454 Compare October 4, 2024 01:23
@Thisara-Welmilla
Copy link
Contributor Author

Thisara-Welmilla commented Oct 4, 2024

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.

3 participants