role-strategy-plugin
role-strategy-plugin copied to clipboard
Add security setting to allow PermissionHelper to log instead of throw
This PR intends to add a security setting called 'logDangerousPermissions' for the role strategy plugin which allows the PermissionHelper class to log a WARNING instead of throwing a SecurityException. In any way, the dangerous permission is not added to the Permission Set created by the PermissionHelper, the only behavior that is changed is the logging instead of throwing.
The default behavior stays the same as before.
This allows to properly import/export this plugin's configuration with the configuration-as-code plugin.
Tests written:
- Configuration creation, saving, loading from disk.
- Configuration imported and exported as code .
Fixes : JENKINS-58227
- [x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
Sorry, missed the PR. Added to my review queue
@oleg-nenashev : Did you had by any chance some time to review this?
My "busy" status on GitHub is for a reason :( Sorry for the delays
I didn't see your busy status before! Hope you'll get well soon :) Take care of yourself.
Hi @oleg-nenashev : I've read your story on tweeter, wish you luck and sending good vibes ;) to the topic: CasC export is not working for me :( Did you had by any chance some time to review this?
Hi! It is on my list. Note that I have stepped down as a maintainer of this plugin. I'm currently looking for new maintainers, and I cannot provide enough time to this plugin as caretaker. Just best effort
My apologies, it slipped my review queue
Any progress on merging this? I am still experiencing this issue as of:
Jenkins version: 2.319
role-strategy: 3.2.0
configuration-as-code: 1.54
Still on my list. Massive formatting changes make maintaining this PR complicated indeed
The massive reformatting is due to a rebase needed after other commits pushed on master. Part of the plugin's code has 4 space indentation and part has 2 space indentation, this make linters hard to use. Since I need to rebase again, I'll try to reduce the reformatting to a minimum.
I've sent you an e-mail concerning this plugin's maintenance, if you have some time to read it :)
With #236 this becomes obsolete