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

(jans-fido2): major FIDO2 / Passkeys upgrade ProjectPasskeys #10078

Closed
wants to merge 219 commits into from

Conversation

moabu
Copy link
Member

@moabu moabu commented Nov 7, 2024

This PR completely revamps jans-fido2, to enable support for passkeys, and bring the server up to spec.

So far changes:

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.

Closes #10079,

Prev. PR #9120

mo-auto and others added 30 commits November 7, 2024 10:22
Bumps commons-text from 1.9 to 1.10.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-text
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.5.0 to 42.5.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](pgjdbc/pgjdbc@REL42.5.0...REL42.5.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
shekhar16 and others added 11 commits November 7, 2024 10:47
* feat(jans-fido): move fidoconfig folder properties to db #9369

Signed-off-by: shekhar16 [email protected]

* feat(jans-fido): added specialized exception #9369

Signed-off-by: shekhar16 [email protected]

---------

Signed-off-by: shekhar16 [email protected]
Co-authored-by: Yuriy Movchan <[email protected]>
Signed-off-by: Madhumita Subramaniam <[email protected]>
* feat(jans-fido2): reflect authenticator name with passkeys

Signed-off-by: imran-ishaq <[email protected]>

* fix(jans-fido2): handle test cases for authenticator name

Signed-off-by: imran-ishaq <[email protected]>

---------

Signed-off-by: imran-ishaq <[email protected]>
Co-authored-by: Mohammad Abudayyeh <[email protected]>
#9624)

fix(jans-fido2): remove superGluu-related endpoints from FIDO2 Swagger and ConfigurationControllerTest

Signed-off-by: imran-ishaq <[email protected]>
Co-authored-by: Mohammad Abudayyeh <[email protected]>
….0-M12 to 4.0.0-M16 in /jans-scim (#9010)

chore(deps): bump org.apache.maven.plugins:maven-site-plugin

Bumps [org.apache.maven.plugins:maven-site-plugin](https://github.com/apache/maven-site-plugin) from 4.0.0-M12 to 4.0.0-M16.
- [Commits](apache/maven-site-plugin@maven-site-plugin-4.0.0-M12...maven-site-plugin-4.0.0-M16)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-site-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jose Gonzalez <[email protected]>
…tion and assertion API calls #9248 (#9974)

* feat(jans-fido2): add origin parameter in Fido2ExternalAuthenticator script for attestation and assertion API calls

Signed-off-by: imran-ishaq <[email protected]>

* refactor(docs): add origin parameter in Fido2ExternalAuthenticator script for attestation and assertion API calls #9248

Signed-off-by: imran-ishaq <[email protected]>

* fix(jans-fido2): handle origin if http or https is missing #9248

Signed-off-by: imran-ishaq <[email protected]>

---------

Signed-off-by: imran-ishaq <[email protected]>
Signed-off-by: imran-ishaq <[email protected]>
Copy link

dryrunsecurity bot commented Nov 7, 2024

DryRun Security Summary

The pull request primarily focuses on improving the configuration and management of the FIDO2 functionality within the Janssen application, including renaming and reorganizing various configuration properties, updating the handling of FIDO2 metadata, attestation, and assertion processes, and enhancing the security and maintainability of the FIDO2 implementation.

Expand for full summary

Summary:

The code changes in this pull request are primarily focused on improving the configuration and management of the FIDO2 (Fast Identity Online) functionality within the Janssen application. The changes involve renaming and reorganizing various configuration properties, as well as updating the handling of FIDO2 metadata, attestation, and assertion processes.

From an application security perspective, the changes seem to be a positive step towards enhancing the security and maintainability of the FIDO2 implementation. The renaming of properties to be more descriptive, the separation of debug/development-only features, and the improvements to the handling of sensitive data and cryptographic operations are all important security considerations.

However, it's crucial to ensure that the implementation of the FIDO2 functionality, including the usage of the updated configuration properties and the processing of FIDO2 data, is thoroughly reviewed and tested to mitigate potential security vulnerabilities. Proper input validation, secure data handling, and adherence to FIDO2 best practices should be a priority.

Files Changed:

  1. docs/janssen-server/config-guide/fido2-config/janssen-fido2-configuration.md: The changes involve renaming configuration properties, such as userAutoEnrollment to debugUserAutoEnrollment, requestedCredentialTypes to enabledFidoAlgorithms, and requestedParties to rp (Relying Party). These changes improve the clarity and consistency of the FIDO2 configuration.

  2. docs/janssen-server/fido/config.md: Similar to the changes in the previous file, this document also includes the renaming of configuration properties and the addition of new settings related to FIDO2 metadata service handling and attestation mode.

  3. docs/janssen-server/fido/logs.md: The changes in this file focus on the logging configuration for the FIDO2 server, including the renaming of properties and the addition of settings for controlling the logging level and layout.

  4. docker-jans-fido2/scripts/upgrade.py: This file includes updates to the FIDO2 dynamic and static configuration, as well as the error configuration, to ensure that the application is properly upgraded and configured for FIDO2 functionality.

  5. docs/script-catalog/person_authentication/fido2-external-authenticator/Fido2ExternalAuthenticator.py: The changes in this file involve improvements to the FIDO2 authentication and registration flow, including the handling of platform authenticators and the addition of more detailed logging.

  6. docs/janssen-server/reference/json/properties/fido2-properties.md: This document provides an overview of the various FIDO2 configuration properties, including the changes to the credential types, algorithms, metadata management, and logging settings.

  7. docs/janssen-server/fido/vendor-metadata.md: The changes in this file discuss the configuration options related to the FIDO2 metadata service, including the ability to use a local metadata service or the FIDO Alliance Metadata Service (MDS3).

  8. jans-auth-server/server/src/main/webapp/auth/fido2/passkeys.xhtml: The changes in this file focus on the FIDO2 attestation and assertion handling in the Jans Auth Server, including the addition of error handling and the removal of a potentially sensitive alert() function call.

  9. jans-casa/app/src/main/java/io/jans/casa/plugins/authnmethod/service/Fido2Service.java: The changes in this file improve the FIDO2 device registration and verification process, including the use of structured data types and proper error handling.

  10. jans-config-api/plugins/docs/fido2-plugin-swagger.yaml: The changes in this file update the Swagger documentation for the FIDO2 plugin in the Jans Config API, reflecting the renaming of configuration properties.

Overall, the code changes in this pull request appear to be focused on improving the security, maintainability, and configurability of the FIDO2 functionality within the Janssen application. As an application security engineer, it's important to review these changes thoroughly and ensure that the implementation adheres to best practices for secure FIDO2 integration.

Code Analysis

We ran 9 analyzers against 30 files and 2 analyzers had findings. 7 analyzers had no findings.

Analyzer Findings
Sensitive Files Analyzer 1 finding
Authn/Authz Analyzer 4 findings

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto
Copy link
Member

mo-auto commented Nov 7, 2024

Error: Hi @moabu, You did not reference an open issue in your PR. I attempted to create an issue for you.
Please update that issues' title and body and make sure I correctly referenced it in the above PRs body.

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR comp-docker-jans-fido2 comp-docs Touching folder /docs comp-jans-auth-server Component affected by issue or PR comp-jans-casa Touching folder /jans-casa comp-jans-cli-tui Component affected by issue or PR comp-jans-config-api Component affected by issue or PR comp-jans-core Component affected by issue or PR comp-jans-fido2 Component affected by issue or PR labels Nov 7, 2024
Copy link

sonarcloud bot commented Nov 7, 2024

Copy link

sonarcloud bot commented Nov 7, 2024

Copy link

sonarcloud bot commented Nov 7, 2024

Copy link

sonarcloud bot commented Nov 7, 2024

@moabu moabu closed this Nov 7, 2024
@moabu moabu deleted the passkeys-project-test branch November 7, 2024 08:22
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-docker-jans-fido2 comp-docs Touching folder /docs comp-jans-auth-server Component affected by issue or PR comp-jans-casa Touching folder /jans-casa comp-jans-cli-tui Component affected by issue or PR comp-jans-config-api Component affected by issue or PR comp-jans-core Component affected by issue or PR comp-jans-fido2 Component affected by issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: (jans-fido2): major FIDO2 / Passkeys upgrade ProjectPasskeys -autocreated