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-core): inherit context classloader #8952 #8953

Merged
merged 2 commits into from
Jul 11, 2024
Merged

fix(jans-core): inherit context classloader #8952 #8953

merged 2 commits into from
Jul 11, 2024

Conversation

yurem
Copy link
Contributor

@yurem yurem commented Jul 11, 2024

Closes #8952

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

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Copy link

dryrunsecurity bot commented Jul 11, 2024

DryRun Security Summary

The pull request updates the configuration of the Quartz scheduler used in various components of the Jans application suite, primarily by adding the org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer=true property to ensure that the scheduler's threads inherit the context class loader of the initializer thread.

Expand for full summary

Summary:

The code changes in this pull request primarily focus on updating the configuration of the Quartz scheduler used in various components of the Jans application suite, such as the Jans Config API, Jans Auth Server, Jans FIDO2, Jans Link, Jans Lock, and Jans SCIM. The key change across these files is the addition of the org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer=true property.

This configuration setting ensures that the threads created by the Quartz scheduler will inherit the context class loader of the thread that initialized the scheduler. This can be an important consideration for applications that use custom class loaders or need to ensure that the scheduler's threads have access to the necessary resources and dependencies.

From an application security perspective, these changes do not appear to introduce any immediate security concerns. The Quartz scheduler is a widely used and well-established library, and the configuration updates are generally considered standard practice. However, it's important to review the broader context of the application and ensure that the Quartz scheduler is being used securely and that there are no other potential security implications.

Files Changed:

  • quartz.properties files in various Jans application components (e.g., Jans Config API, Jans Auth Server, Jans FIDO2, Jans Link, Jans Lock, Jans SCIM): These files contain the configuration settings for the Quartz scheduler used in the respective applications. The key change is the addition of the org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer=true property, which ensures that the scheduler's threads inherit the context class loader of the initializer thread.
  • AsynchronousInterceptor.java in the jans-core module: This change sets the context class loader to the class loader of the AsynchronousInterceptor class before executing the asynchronous method invocation and restores the original context class loader after the invocation is complete. This is a good practice to ensure that the correct class loader is used during asynchronous execution.

Overall, the changes in this pull request appear to be routine configuration updates and do not raise any immediate security concerns. However, it's important to review the broader context of the application and ensure that the Quartz scheduler is being used securely and that there are no other potential security implications.

Code Analysis

We ran 7 analyzers against 10 files and 0 analyzers had findings. 7 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

Copy link

DryRun Security Summary

We are currently analyzing this pull request to produce a meaningful summary.

Code Analysis

We ran 7 analyzers against 10 files and 0 analyzers had findings. 7 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added comp-jans-auth-server 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 comp-jans-scim Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels Jul 11, 2024
Copy link

sonarcloud bot commented Jul 11, 2024

@yurem yurem enabled auto-merge (squash) July 11, 2024 14:19
Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Quality Gate Passed Quality Gate passed for 'keycloak-integration-parent'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

Copy link

sonarcloud bot commented Jul 11, 2024

@yurem yurem merged commit 2952467 into main Jul 11, 2024
20 checks passed
@yurem yurem deleted the issue_8952 branch July 11, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server 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 comp-jans-scim 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-core): inherit context classloader in @Asynchronous events
8 participants