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

fix(docker-jans-persistence-loader): populate jansDbAuth attribute only if using ldap persistence #9323

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

iromli
Copy link
Contributor

@iromli iromli commented Aug 30, 2024

Prepare


Description

Target issue

closes #9321

Implementation Details


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.

…ly if using ldap persistence

Signed-off-by: iromli <isman.firmansyah@gmail.com>
@iromli iromli requested a review from moabu as a code owner August 30, 2024 16:55
Copy link

dryrunsecurity bot commented Aug 30, 2024

DryRun Security Summary

The provided code changes are related to the configuration and upgrade scripts for the Jans application, a web-based identity and access management (IAM) solution, involving the removal of LDAP-based authentication configuration, updates to script entries, transformations of authentication dynamic and static configurations, and various other updates to the application's configuration, with the most notable changes being the disabling of the DUO script entry, the transformation of the jansConfDyn configuration, and the setting of the jansDbAuth configuration for LDAP persistence.

Expand for full summary

Summary:

The provided code changes are related to the configuration and upgrade scripts for the Jans application, a web-based identity and access management (IAM) solution. The main changes include the removal of LDAP-based authentication configuration, updates to script entries, transformations of authentication dynamic and static configurations, and various other updates to the application's configuration.

From an application security perspective, the most notable changes involve the disabling of the DUO script entry, the transformation of the jansConfDyn configuration (which could affect the authentication and authorization flow), and the setting of the jansDbAuth configuration for LDAP persistence (which could affect the database authentication and authorization mechanisms). These changes should be carefully reviewed and tested to ensure they do not introduce any vulnerabilities or break existing functionality.

Overall, the code changes appear to be part of a comprehensive upgrade process for the Jans application, aimed at ensuring the application is up-to-date and configured correctly across various persistence backends (LDAP, SQL, Couchbase, Spanner). As an application security engineer, it's important to thoroughly review these changes and their potential impact on the application's security posture.

Files Changed:

  1. docker-jans-persistence-loader/templates/configuration.ldif:

    • Removal of the jansDbAuth configuration block, which previously contained settings for an LDAP-based authentication mechanism.
    • The remaining configuration blocks, such as jansCacheConf, jansMessageConf, jansDocStoreConf, and jansSmtpConf, remain unchanged.
  2. docker-jans-persistence-loader/scripts/upgrade.py:

    • Updates to script entries, including toggling the SCIM script, deleting the DUO script entry, and filtering out unwanted properties from the Agama script entry.
    • Transformations of the jansConfDyn configuration, which could affect the authentication and authorization flow.
    • Updates to various configuration entries, such as attributes, base entries, SCIM scopes, scopes, people, clients, admin UI, auth errors, auth static, TUI client, and overall application configuration.
    • The most security-relevant changes involve the disabling of the DUO script entry and the setting of the jansDbAuth configuration for LDAP persistence.

Code Analysis

We ran 9 analyzers against 2 files and 1 analyzer had findings. 8 analyzers had no findings.

Analyzer Findings
Authn/Authz Analyzer 1 finding

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added comp-docker-jans-persistence-loader kind-bug Issue or PR is a bug in existing functionality labels Aug 30, 2024
@moabu moabu merged commit 47414c2 into main Sep 4, 2024
11 checks passed
@moabu moabu deleted the cn-populate-jansdbauth branch September 4, 2024 12:23
yuriyz pushed a commit that referenced this pull request Nov 7, 2024
…ly if using ldap persistence (#9323)

Signed-off-by: iromli <isman.firmansyah@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
Former-commit-id: 47414c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-docker-jans-persistence-loader kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(docker-jans-persistence-loader): populate jansDbAuth attribute only if using ldap persistence
3 participants