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(jans-linux-setup): client kc_saml_openid is trusted #9041

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

devrimyatar
Copy link
Contributor

closes #8921

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

Signed-off-by: Mustafa Baser <mbaser@mail.com>
@devrimyatar devrimyatar added kind-bug Issue or PR is a bug in existing functionality comp-jans-linux-setup Component affected by issue or PR labels Jul 28, 2024
@devrimyatar devrimyatar requested a review from uprightech July 28, 2024 08:49
Copy link

dryrunsecurity bot commented Jul 28, 2024

DryRun Security Summary

The pull request focuses on the configuration of OAuth clients, the installation and configuration of the Jans SAML component, and the handling of sensitive information, with potential security implications related to the "trusted_client" flag, Keycloak setup, and the management of client secrets, user passwords, and database credentials.

Expand for full summary

Summary:

The code changes in this Pull Request are focused on the configuration of OAuth clients and the installation/configuration of the Jans SAML (Security Assertion Markup Language) component. The key security-relevant aspects include the introduction of a "trusted_client" flag for certain clients, the installation and configuration of Keycloak as the identity provider, and the handling of sensitive information such as client secrets, user passwords, and database credentials.

From an application security perspective, the "trusted_client" flag is an important consideration, as it could grant additional privileges or permissions to certain clients. It's crucial to ensure that the criteria for determining a client as "trusted" are well-defined and that the associated privileges are appropriate and do not introduce security vulnerabilities. Additionally, the Keycloak setup, SAML configuration, and handling of sensitive information should be thoroughly reviewed to maintain the overall security posture of the application.

Files Changed:

  1. jans-linux-setup/jans_setup/templates/jans-saml/clients.json:

    • Introduces a new "trusted_client" field for each client configuration, which could have security implications if not properly managed.
    • Marks the "saml_scim_client" and "kc_scheduler_api" clients as "trusted_client": "false", and the "kc_saml_openid" client as "trusted_client": "true".
    • The criteria for determining a client as "trusted" should be reviewed to ensure appropriate privileges are granted.
  2. jans-linux-setup/jans_setup/setup_app/installers/jans_saml.py:

    • Handles the installation and configuration of the Jans SAML component, including the setup of SAML clients, Keycloak identity provider, and Keycloak scheduler.
    • Manages sensitive information, such as client secrets, user passwords, and database credentials, which should be properly secured.
    • Grants the "jans-api-user" various administrative roles in the Keycloak realm, which could potentially lead to privilege escalation if the user's credentials are compromised.
    • The SAML configuration, including trust relationships, encryption, and signing settings, should be reviewed for security.

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.

Copy link

@yuriyz yuriyz merged commit 6f6ca62 into main Jul 29, 2024
12 checks passed
@yuriyz yuriyz deleted the jans-linux-setup-kc-saml-client-8921 branch July 29, 2024 08:25
yuriyz pushed a commit that referenced this pull request Nov 7, 2024
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Former-commit-id: 6f6ca62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-linux-setup Component affected by issue or PR 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(jans-keycloak-integration): openid client kc_saml_openid is not a trusted openid client.
3 participants