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-config-api): unable to update Admin-ui feature in webhook #10220

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

duttarnab
Copy link
Contributor

@duttarnab duttarnab commented Nov 21, 2024

closes #10219

Closes #10226,

Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>
Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>
Copy link

DryRun Security Summary

The pull request updates the WebhookService class to manage webhooks, including removing and adding webhook IDs to associated AuiFeature records, with a focus on comprehensive logging, error handling, and potential security considerations related to input validation, authorization checks, and thread-safety.

Expand for full summary

Summary:

The code changes in this pull request are focused on updating the WebhookService class, which is responsible for managing webhooks in the application. The key changes involve removing and adding webhook IDs to the webhookIdsMapped list of associated AuiFeature records when a webhook is updated. While these changes do not appear to introduce any obvious security vulnerabilities, it's important to ensure that the input validation and authorization checks are robust, as the WebhookService is responsible for managing sensitive webhook configurations. Additionally, the implementation should be thread-safe to handle concurrent updates effectively and avoid data inconsistencies. The comprehensive logging and error handling mechanisms in the code are a positive security enhancement, as they can aid in debugging and troubleshooting in production environments.

Files Changed:

  • jans-config-api/plugins/admin-ui-plugin/src/main/java/io/jans/ca/plugin/adminui/service/webhook/WebhookService.java: The changes in this file focus on updating the updateWebhook method of the WebhookService class. The key changes include:
    1. Removing the webhook ID from the webhookIdsMapped list of all associated AuiFeature records when a webhook is updated.
    2. Adding the webhook ID to the webhookIdsMapped list of the AuiFeature records specified in the webhook.getAuiFeatureIds() list.
    3. Comprehensive logging and error handling mechanisms to aid in debugging and troubleshooting.
    4. Potential security implications related to input validation and authorization checks, as well as concurrency considerations to handle concurrent updates effectively.

Code Analysis

We ran 9 analyzers against 1 file and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@duttarnab duttarnab changed the title fix: unable to update Admin-ui feature in webhook fix(jans-config-api): unable to update Admin-ui feature in webhook Nov 21, 2024
@yuriyz yuriyz enabled auto-merge (squash) November 21, 2024 16:37
@yuriyz yuriyz merged commit 1244488 into main Nov 21, 2024
9 of 11 checks passed
@yuriyz yuriyz deleted the jans-config-api-issue-10219 branch November 21, 2024 16:38
@mo-auto
Copy link
Member

mo-auto commented Nov 21, 2024

Error: Hi @duttarnab, 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 comp-jans-config-api Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels Nov 21, 2024
Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-config-api Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
4 participants