saltstack / saltstack/salt

[BUG] Failed to cache / HTTP 403: Forbidden reading - Download file with file.managed

Open
#67,087 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
I can't download file with state file.managed from https://downloads.tableau.com/, I get following error

Failed to cache ...: Error: HTTP 403: Forbidden reading ....

On the server I can download data from tableau with curl, wget. I have only problems, when I will do it with state file.managed.

I can with similar state download data from another servers, but I can't do it with data stored in tableau.com

I use salt in version 3006.9 on salt-minion and salt-master servers. Both server run with Debian 12. I reproduced it in docker as well.

Setup
This is my state to download file

download_tableau_setup_tool:
  file.managed:
    - name: /root/tableau-setup-tool.tar.gz
    - source: https://downloads.tableau.com/esdalt/2024.2.0/tableau-server-container-setup-tool-2024.2.0.tar.gz
    - skip_verify: true

Steps to Reproduce the behavior

  • Create state to download tableau
  • apply state on minion

This is response:

minion:
----------
              ID: download_tableau_setup_tool
    Function: file.managed
        Name: /root/tableau-setup-tool.tar.gz
        Result: False
     Comment: Failed to cache https://downloads.tableau.com/esdalt/2024.2.0/tableau-server-container-setup-tool-2024.2.0.tar.gz: Error: HTTP 403: Forbidden reading /esdalt/2024.2.0/tableau-server-container-setup-tool-2024.2.0.tar.gz
     Started: 07:53:27.669324
    Duration: 191.301 ms
     Changes:

Summary for minion
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time: 191.301 ms
ERROR: Minions returned with non-zero exit code

Expected behavior

  • it is possible to download files

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python source path used by file.managed to cache remote source URLs, then reproduce the request against the provided Tableau URL and compare it with curl or wget. Done means the supplied state can download the Tableau archive without the HTTP 403 failure, with regression coverage for this source-download behavior if the repository has an appropriate test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.