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

PUT /api/3.0/deliveryservices/{id} with changed cdn returns 403 forbidden #5341

Closed
mitchell852 opened this issue Dec 1, 2020 · 5 comments · Fixed by #5417
Closed

PUT /api/3.0/deliveryservices/{id} with changed cdn returns 403 forbidden #5341

mitchell852 opened this issue Dec 1, 2020 · 5 comments · Fixed by #5417
Assignees
Labels
bug something isn't working as intended Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1

Comments

@mitchell852
Copy link
Member

mitchell852 commented Dec 1, 2020

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Ops
  • Traffic Portal

Current behavior:

Changing the CDN for a delivery service returns a 403 with

{"alerts":[{"text":"Forbidden","level":"error"}]}

403s are for operations that fail role or tenancy check.

New behavior:

This needs to be a 400 Bad Request instead with a message like:

{"alerts":[{"text":"Delivery service CDN is immutable","level":"error"}]}

Minimal reproduction of the problem with instructions:

Navigate to a DS in TP and change the CDN value. Save.

Anything else:

If the intent is to make CDN immutable on a DS, the cdn field of an existing DS should be disabled as well to prevent the user from changing it.

@mitchell852 mitchell852 added Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1 improvement The functionality exists but it could be improved in some way. bug something isn't working as intended and removed improvement The functionality exists but it could be improved in some way. labels Dec 1, 2020
@mitchell852
Copy link
Member Author

@shamrickus or @srijeet0406 - i cant remember if one of you did the api work on this or not...

@srijeet0406
Copy link
Contributor

I think that might have been Steve. Its in the getOlddetails function I believe.

@mitchell852
Copy link
Member Author

mitchell852 commented Dec 2, 2020

oh, ok, this was changed in #5083 - can you make it return a 400 bad request instead of 403 (with an error message that explains why they can't do that) @shamrickus when ds.cdn or ds.routingName change is attempted?

@rimashah25
Copy link
Contributor

I can take this one.

@srijeet0406
Copy link
Contributor

I think @shamrickus is working on this one, not a 100% sure

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 Traffic Portal v1 related to Traffic Portal version 1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants