Skip to content

fix: Vault URL validation scheme broken with placeholder - #9714

Merged
Kump3r merged 1 commit into
concourse:masterfrom
Kump3r:fix-var_source-validation
Sep 11, 2026
Merged

Kump3r merged 1 commit into
concourse:masterfrom
Kump3r:fix-var_source-validation

Conversation

@Kump3r

@Kump3r Kump3r commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Changes proposed by this PR

closes #9706

Tested on local Concourse with example pipeline:

var_sources:
- name: secrets
  type: vault
  config:
    url: ((v.vault_addr))
    auth_backend: userpass
    auth_params:
      username: ((v.username))
      password: ((v.password))
    path_prefix: /concourse

jobs:
- name: hello
  plan:
  - task: say-hello
    config:
      platform: linux
      image_resource:
        type: registry-image
        source: {repository: alpine}
      run:
        path: echo
        args: ["hello world"]

@Kump3r Kump3r added the bug label Sep 10, 2026
@taylorsilva taylorsilva added this to the 8.3.1 milestone Sep 10, 2026
@taylorsilva taylorsilva mentioned this pull request Sep 10, 2026
15 tasks done

@taylorsilva taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good enough. It means someone could pass in a bad URL, but this really is just a "best-effort" check we're doing here.

@Kump3r

Kump3r commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Yeah, I agree. Again the problem with validations when there are placeholders arises. I can try to think of something, but as the variables are resolved later during runtime, we either need to accept this risk and not break it, or force operators to placeholder only the interchangeable part of the URL, without the prefix. I guess if we opt for that we would need to note it down explicitly.

Edit: I would assume the Vault library will panick further down the line and raise an Exception as well, it would have been just nicer to handle it before creating the pipeline, but afaik the vars will be interpolated later during a build.

Edit-2: Yup, with invalid URL in placeholder users will see:

"invalid/v1/sys/internal/ui/mounts/namespace/path/to/secret/test": unsupported protocol scheme ""

@Kump3r
Kump3r merged commit d08670f into concourse:master Sep 11, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Pull Requests Sep 11, 2026
@Kump3r
Kump3r deleted the fix-var_source-validation branch September 11, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

regression: var_source validation scheme breaks when using ((some_var.containing_scheme))

2 participants