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

Fixed job route permission #7891

Merged
merged 2 commits into from Dec 20, 2023

Conversation

rimashah25
Copy link
Contributor

@rimashah25 rimashah25 commented Dec 20, 2023


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

  1. In you dev/traffic_ops/cdn.conf add if not configured or change "role_based_permissions": true to true at the base level.
  2. Create or modify a "Portal" user/role and remove the permission DELIVERY-SERVICE:UPDATE.
  3. Using your new/modified user, in TP, create a Invalidation Request and verify its creation.
  4. Send GET, UPDATE, and DELETE created Invalidation Request. Ensure all works as expected.
  5. Verify this all works on v4 and v5 apis
  6. When done, insert permission DELIVERY-SERVICE:UPDATE back to the portal role.
  7. Create or use an existing user with Read-Only role, and log into Traffic Portal
  8. Click to open Delivery Services section, and ensure it works.

If this is a bugfix, which Traffic Control versions contained the bug?

8.0.0

PR submission checklist

@rimashah25 rimashah25 marked this pull request as ready for review December 20, 2023 20:25
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (63c6471) 31.79% compared to head (0d6c68a) 31.80%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #7891   +/-   ##
=========================================
  Coverage     31.79%   31.80%           
  Complexity       98       98           
=========================================
  Files           719      719           
  Lines         82818    82819    +1     
  Branches        970      970           
=========================================
+ Hits          26336    26339    +3     
+ Misses        54323    54320    -3     
- Partials       2159     2160    +1     
Flag Coverage Δ
golib_unit 53.84% <ø> (ø)
grove_unit 12.02% <ø> (ø)
t3c_unit 5.88% <ø> (+0.11%) ⬆️
traffic_monitor_unit 25.47% <ø> (ø)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 21.63% <100.00%> (+<0.01%) ⬆️
traffic_portal_v2 74.33% <ø> (-0.02%) ⬇️
traffic_stats_unit 10.78% <ø> (ø)
unit_tests 29.12% <100.00%> (+<0.01%) ⬆️
v3 57.79% <ø> (ø)
v4 79.18% <ø> (ø)
v5 78.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rimashah25 rimashah25 added bug something isn't working as intended Traffic Ops related to Traffic Ops labels Dec 20, 2023
@srijeet0406 srijeet0406 merged commit c0ebe87 into apache:master Dec 20, 2023
42 of 43 checks passed
rimashah25 added a commit that referenced this pull request Jan 3, 2024
* Created clause to distinguish api versions < 5 when handling 403 in middleware wrappers

* Removed required permission `DELIVERY-SERVICE:READ` from the job routes in v4 and v5.

---------

Co-authored-by: Michie, Kurtis <kurtis_michie@comcast.com>
(cherry picked from commit c0ebe87)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants