Project

General

Profile

Bug #7211

System technique's curl should follow redirects

Added by Florian Heigl over 5 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

When an agent is executed it'll check it's servers' UUID.
This is done using http, regardless of the setting here:
common/1.0/site.st: "inventory_upload_protocol" string => "https";

We've long put a redirect in place but found this is not being followed by curl.
It fetches the redirect message, and decides it doesn't parse as a legit UUID.

Adding -L to the general rudder curl options seems (to me) be a nice way of cleaning this.
If a redirect is encountered, curl then follows it (i.e. to https on same system), and the content check stays still in place.

I don't know if it can be done for minicurl and what you have on Windows.


Subtasks

Bug #7264: technique's curl should follow redirectsReleasedMatthieu CERDA2015-10-09Actions
#1

Updated by Janos Mattyasovszky over 5 years ago

This should also be implemented for the inventory-upload's curl:

./fusionAgent.cf:      "download_command"   string => "${g.rudder_curl} -L -k -s -f --proxy '' -o \"${g.rudder_var_tmp}/uuid.txt\" http://${server_info.cfserved}/uuid";
./fusionAgent.cf:      "download_command_prefix"   string => "${g.rudder_curl} -L -f -s --proxy '' --user ${g.davuser}:${g.davpw} -T";

Note the -L in the curl.

#2

Updated by Benoît PECCATTE over 5 years ago

  • Assignee set to Benoît PECCATTE
  • Target version set to 2.11.15
Yes it should !
  • minicurl already follows redirects
  • windows uses curl too
#3

Updated by Benoît PECCATTE over 5 years ago

  • Status changed from New to In progress
#4

Updated by Benoît PECCATTE over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Matthieu CERDA
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/752
#5

Updated by Benoît PECCATTE over 5 years ago

  • Assignee changed from Matthieu CERDA to Benoît PECCATTE

Janos: the protocol used for the first query cannot be configured yet, so it is http for now.
Subsequent requests should however be made in the configured protocol.

#6

Updated by Benoît PECCATTE over 5 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
#7

Updated by Matthieu CERDA over 5 years ago

#8

Updated by Vincent MEMBRÉ over 5 years ago

  • Category changed from Techniques to System techniques
#9

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.15, 3.0.10 and 3.1.3 which were released today.

Also available in: Atom PDF