Skip to content

feat(jans-fido2) : added integration test cases for the device registration flow #11894

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

Merged
merged 20 commits into from
Aug 5, 2025

Conversation

imran-ishaq
Copy link
Contributor

@imran-ishaq imran-ishaq commented Aug 1, 2025

Description

Added the Integration tests for the complete flow of device Registration

Target issue

Currently, the Jans FIDO2 module lacks comprehensive integration testing for device registration workflows. This creates uncertainty about the reliability of FIDO2 device registration functionality in production environment

closes #11893

Implementation Details

Created structured test data for the FIDO2 integration flow
Configured the server dynamically during the test build process
Implemented test cases covering basic to advanced scenarios


Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with docs: to indicate documentation changes or if the below checklist is not selected.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

imran-ishaq and others added 16 commits August 1, 2025 08:45
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: Yuriy <Yuriy.Movchan@gmail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
Signed-off-by: Yuriy <Yuriy.Movchan@gmail.com>
Signed-off-by: Yuriy <Yuriy.Movchan@gmail.com>
Signed-off-by: Yuriy <Yuriy.Movchan@gmail.com>
Signed-off-by: imran <imranishaq7071@gmail.com>
…vice registration

Signed-off-by: imran <imranishaq7071@gmail.com>
@mo-auto
Copy link
Member

mo-auto commented Aug 1, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR comp-jans-casa Touching folder /jans-casa comp-jans-fido2 Component affected by issue or PR comp-jans-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Aug 1, 2025
@imran-ishaq imran-ishaq marked this pull request as ready for review August 1, 2025 17:10
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it is really necessary to remove those logging statements...

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @jgomer2001 We can keep log message and just specify right severity for them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I will add them

Copy link
Contributor

@yurem yurem left a comment

Choose a reason for hiding this comment

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

Please don't do code reformat. This makes review difficult

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @jgomer2001 We can keep log message and just specify right severity for them

@@ -0,0 +1 @@
test.server.name=imran-ishaq-capable-cobra.gluu.info
Copy link
Contributor

Choose a reason for hiding this comment

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

In default profile it's better to specify generic hostname

@@ -1,21 +1,3 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to put:

* Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2020, Janssen Project
 */

Copy link
Contributor

Choose a reason for hiding this comment

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

There is same question about log messages which @jgomer2001 raised in previous file

@@ -1,21 +1,3 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

There is same question about log messages which @jgomer2001 raised in previous file

} catch (Exception e) {
log.error("Failed to get nextUpdateDate of the MDS from jansDocument ", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should log exceptions

fido2.client.id=FF81-2D39
fido2.client.secret=%(jans_fido2_client_4_pw)s

uma.user.uid=test_user
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using uma keys in properties?

ldap.admin.password=ldap_admin_test_password

# Sector Identifiers (optional, for metadata or RP ID isolation testing)
sector.identifier.id=a55ede29-8f5a-461d-b06e-76caee8d40b5
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed for test?

Copy link

sonarqubecloud bot commented Aug 4, 2025

@imran-ishaq imran-ishaq requested a review from yurem August 4, 2025 13:03
@devrimyatar devrimyatar merged commit 4582b98 into main Aug 5, 2025
2 checks passed
@devrimyatar devrimyatar deleted the jans-fido2-test-server-2 branch August 5, 2025 09:19
Copy link

sonarqubecloud bot commented Aug 5, 2025

Copy link

sonarqubecloud bot commented Aug 5, 2025

Quality Gate Failed Quality Gate failed for 'jans-linux-setup'

Failed conditions
1 New Bugs (required ≤ 0)
12 New Code Smells (required ≤ 8)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Documentation needs to change as part of issue or PR comp-jans-casa Touching folder /jans-casa comp-jans-fido2 Component affected by issue or PR comp-jans-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(jans-fido2): added comprehensive integration tests for device registration
5 participants