You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/08/13 20:08:37 UTC

[GitHub] [trafficcontrol] mitchell852 opened a new issue #6104: PUT /api/3.0/federations only respects first item in request payload

mitchell852 opened a new issue #6104:
URL: https://github.com/apache/trafficcontrol/issues/6104


   <!-- Do not submit security vulnerabilities or support requests here - see above -->
   ## This Bug Report affects these Traffic Control components:
   - Traffic Ops
   
   ## Current behavior:
   A request to PUT /api/3.0/federations with a request body like:
   
   ```
   [
     {
       "deliveryService":"demo1",
       "mappings":
       {
         "resolve4": ["1.2.3.4"],
         "resolve6": ["2001:db8:3333:4444:5555:6666:7777:8888"]
       }
     },
     {
       "deliveryService":"demo2",
       "mappings":
       {
         "resolve4": ["8.8.8.8"],
         "resolve6": ["2001:db8:3333:4444:5555:6666:7777:9999"]
       }
     }
   ]
   ```
   
   will wipe out ALL "Federation to federation resolver mappings" associated with a user’s Delivery Service(s) and replace them with only the first one in the request payload. So if you have 100 mappings, you will end up with 1. 
   
   ## Expected behavior:
   the "Federation to federation resolver mappings" associated with a user’s Delivery Service(s) should be replaced with ALL entries sent in the request payload. not just the first obviously.
   
   ## Steps to reproduce:
   <!-- If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and
   include the applicable TC version.
   -->
   
   ```
   POST /api/3.0/federations with
   
   [
     {
       "deliveryService":"demo1",
       "mappings":
       {
         "resolve4": ["1.2.3.4"],
         "resolve6": ["2001:db8:3333:4444:5555:6666:7777:8888"]
       }
     },
     {
       "deliveryService":"demo2",
       "mappings":
       {
         "resolve4": ["8.8.8.8"],
         "resolve6": ["2001:db8:3333:4444:5555:6666:7777:9999"]
       }
     }
   ]
   ```
   
   to create 2 federation mappings for your user. verify that 2 were created by calling GET /api/3.0/federations/all. Now try the PUT /api/3.0/federations endpoint with the same payload as the POST. verify that only 1 mapping exists by calling GET /api/3.0/federations/all.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman closed issue #6104: PUT /api/3.0/federations only respects first item in request payload

Posted by GitBox <gi...@apache.org>.
zrhoffman closed issue #6104:
URL: https://github.com/apache/trafficcontrol/issues/6104


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org