dependency-track
dependency-track copied to clipboard
Enhance badge API to require authorization
Description
Enables Dependency-Track to offer badges in a secure manner and change the badge
API from an opt-in-able, unauthenticated one into one requiring authentication with the new permission VIEW_BADGES
.
In the currently implementation, this as a breaking change (see Additional Details.)
Addressed Issue
Closes #3596
Additional Details
Introducing the securing of badges behind API authentication and ACL can be done in two ways, either as a breaking change or gracefully with backwards compatibility: implement authentication with a new permission and
- remove current checkbox enabling unauthenticated badges support entirely (breaking change)
- keep a checkbox, but redo it to switch between the settings (backwards compatible change):
- disable unauthenticated access (allows authenticated access only, corresponds to the previous "off" setting right after updating to the new DT version containing this PR)
- enable unauthenticated access (corresponds to the previous "on" setting)
A grace period is nice. But because the previous way of offering badges represents a security flaw, I would've preferred to make users switch to authenticated badges requests right away.
Downstream changes
https://github.com/DependencyTrack/frontend/issues/967
Upstream requirements
https://github.com/stevespringett/Alpine/issues/641
Checklist
- [x] I have read and understand the contributing guidelines
- [ ] ~This PR fixes a defect, and I have provided tests to verify that the fix is effective~
- [x] This PR implements an enhancement, and I have provided tests to verify that it works as intended
- [ ] ~This PR introduces changes to the database model, and I have added corresponding update logic~
- [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly