Fix: Handle disabled or uninstalled permissions gracefully#110
Open
csturiale wants to merge 1 commit into
Open
Fix: Handle disabled or uninstalled permissions gracefully#110csturiale wants to merge 1 commit into
csturiale wants to merge 1 commit into
Conversation
This change improves robustness when dealing with permissions that are disabled or belong to uninstalled plugins. Previously, the plugin would fail to start if a configured permission was not available (e.g., from a plugin that was uninstalled). Now, it logs a warning and continues, ignoring the invalid permission. This prevents a broken configuration from taking down a Jenkins instance. Specifically, this commit: - Modifies `PermissionWrapper` to tolerate unknown or disabled permission IDs instead of throwing an exception. - Introduces `PermissionWrapper.isValid()` to check if a permission can be used for access control. - Filters out disabled permissions from being granted in the UI and from being applied to ACLs, improving compliance with SECURITY-3062. - Adds null checks in the `FolderBasedAuthorizationStrategy` constructor to improve compatibility with Jenkins Configuration as Code (JCasC). - Adds `csturiale` as a developer in `pom.xml`.
|
Could we please get this change merged and released? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change improves robustness when dealing with permissions that are disabled or belong to uninstalled plugins.
Previously, the plugin would fail to start if a configured permission was not available (e.g., from a plugin that was uninstalled). Now, it logs a warning and continues, ignoring the invalid permission. This prevents a broken configuration from taking down a Jenkins instance.
Specifically, this commit:
PermissionWrapperto tolerate unknown or disabled permission IDs instead of throwing an exception.PermissionWrapper.isValid()to check if a permission can be used for access control.FolderBasedAuthorizationStrategyconstructor to improve compatibility with Jenkins Configuration as Code (JCasC).csturialeas a developer inpom.xml.Testing done
Submitter checklist