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

Lock Endpoint Scaffolding #8672

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Lock Endpoint Scaffolding #8672

merged 2 commits into from
Jun 7, 2024

Conversation

yurem
Copy link
Contributor

@yurem yurem commented Jun 6, 2024

yurem added 2 commits June 6, 2024 19:40
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Copy link

dryrunsecurity bot commented Jun 6, 2024

Hi there 👋, @DryRunSecurity here, below is a summary of our analysis and findings.

DryRun Security Status Findings
Configured Codepaths Analyzer 0 findings
Secrets Analyzer 0 findings
Sensitive Files Analyzer 0 findings
Authn/Authz Analyzer 0 findings
AppSec Analyzer 0 findings

Note

🟢 Risk threshold not exceeded.

Change Summary (click to expand)

The following is a summary of changes in this pull request made by me, your security buddy 🤖. Note that this summary is auto-generated and not meant to be a definitive list of security issues but rather a helpful summary from a security perspective.

Summary:

The provided code changes introduce several updates to the Janssen Project application, primarily focused on the configuration, audit, and Server-Sent Events (SSE) functionality. The changes include the addition of new REST API endpoints, utility classes, and event broadcasting mechanisms. While the changes do not directly introduce obvious security vulnerabilities, there are several areas that require careful review and consideration from an application security perspective.

Key security considerations include:

  1. Input Validation: Ensure that all user-supplied input is properly validated and sanitized to prevent common web application vulnerabilities, such as injection attacks (SQL injection, command injection, etc.) and cross-site scripting (XSS).

  2. Authentication and Authorization: Verify that the appropriate authentication and authorization mechanisms are in place to restrict access to sensitive endpoints and functionality, especially for the audit-related and configuration-related services.

  3. Sensitive Data Exposure: Review the data being returned by the various REST API endpoints to ensure that no sensitive information is being inadvertently exposed, which could lead to information disclosure vulnerabilities.

  4. Secure Communication: Confirm that the application is using secure communication protocols (e.g., HTTPS) for all relevant endpoints, especially those that handle sensitive data or configuration settings.

  5. Denial of Service (DoS) Protection: Ensure that the application has appropriate measures in place to mitigate potential Denial of Service attacks, particularly for the SSE-related functionality, which could be vulnerable to resource exhaustion.

  6. Logging and Monitoring: Evaluate the logging and monitoring mechanisms to ensure that they are properly configured and do not expose sensitive information, while still providing sufficient visibility for security incident detection and investigation.

By addressing these security considerations, the application can be hardened against potential vulnerabilities and ensure the overall security of the Janssen Project application.

Files Changed:

  1. jans-linux-setup/jans_setup/templates/jans-lock/dynamic-conf.json: This file contains the configuration for the Jans Lock service, including the base endpoint, logging, metrics, and policy-related settings. The changes introduce a new baseEndpoint property, which should be reviewed for potential security implications, such as injection vulnerabilities and sensitive data exposure.

  2. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/util/ServerUtil.java: This new utility class provides methods for creating CacheControl objects, which can be important for managing the caching behavior of HTTP responses and mitigating potential security risks.

  3. jans-lock/lock-master/model/src/main/java/io/jans/lock/model/config/AppConfiguration.java: The changes introduce a new baseEndpoint configuration property, which should be reviewed for potential security implications, such as injection vulnerabilities and sensitive data exposure.

  4. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/ws/rs/ResteasyInitializer.java: This new class is responsible for initializing the Resteasy framework and registering various REST web services. The security of these endpoints, including input validation, authorization, and sensitive data exposure, should be carefully reviewed.

  5. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/ws/rs/audit/AuditRestWebService.java: This new interface defines the REST API endpoints for handling audit-related requests. Ensure that appropriate security controls, such as input validation and access control, are in place for these sensitive endpoints.

  6. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/ws/rs/ConfigurationRestWebService.java: This new web service endpoint exposes configuration-related information, which should be reviewed for potential sensitive data exposure and proper input validation.

  7. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/ws/rs/audit/AuditRestWebServiceImpl.java: This new implementation class handles the processing of audit-related REST requests. Ensure that appropriate security controls, such as input validation and access control, are in place.

  8. jans-lock/lock-master/service/src/main/java/io/jans/lock/service/ws/rs/config/ConfigRestWebService.java: This new interface defines the REST API endpoints for handling configuration-related requests. Ensure that appropriate security controls are in place, such as input validation and access control

Powered by DryRun Security

@mo-auto mo-auto added the comp-jans-linux-setup Component affected by issue or PR label Jun 6, 2024
Copy link

sonarcloud bot commented Jun 6, 2024

Quality Gate Passed Quality Gate passed for 'jans-linux-setup'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@nynymike nynymike left a comment

Choose a reason for hiding this comment

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

Looks good to me. You don't need an endpoint to return the Lock Master metadata (i.e. .well-known/lock-master-configuration) ?

@nynymike nynymike changed the title Lock enpoints Lock Endpoint Scaffolding Jun 6, 2024
@yuriyz yuriyz merged commit 7c6fec4 into main Jun 7, 2024
8 checks passed
@yuriyz yuriyz deleted the lock_enpoints branch June 7, 2024 08:52
@@ -0,0 +1,46 @@
/*
* Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please align with this format: https://www.apache.org/licenses/LICENSE-2.0#apply

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants