Project

General

Profile

Actions

Bug #7211

closed

System technique's curl should follow redirects

Bug #7211: System technique's curl should follow redirects

Added by Florian Heigl about 10 years ago. Updated about 10 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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 1 (0 open1 closed)

Bug #7264: technique's curl should follow redirectsReleasedMatthieu CERDAActions

Updated by Janos Mattyasovszky about 10 years ago Actions #1

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.

Updated by Benoît PECCATTE about 10 years ago Actions #2

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

Updated by Benoît PECCATTE about 10 years ago Actions #3

  • Status changed from New to In progress

Updated by Benoît PECCATTE about 10 years ago Actions #4

  • 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

Updated by Benoît PECCATTE about 10 years ago Actions #5

  • 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.

Updated by Benoît PECCATTE about 10 years ago Actions #6

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

Updated by Matthieu CERDA about 10 years ago Actions #7

Updated by Vincent MEMBRÉ about 10 years ago Actions #8

  • Category changed from Techniques to System techniques

Updated by Vincent MEMBRÉ about 10 years ago Actions #9

  • 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.

Actions

Also available in: PDF Atom