Skip to content

Feature request: add --password-file-reload flag to pick up refreshed tokens #975

Closed

Description

@vaibhavdesai137
  • We have been using the --password-file flag to read a token generated by vault injector. This has been working great
  • Going forward, we'll switch to Vault Dynamic Engine which mints short lived tokens and are automatically rotated
  • Current behavior of --password-file is to read the token once, store in-memory and keep reusing for all subsequent calls. This will no longer work with dynamic engine because the token would have changed
  • Requesting the addition of --password-file-reload boolean flag which when set will always read the token from file system during each sync cycle. Default value will be false so the change will be backward compatibility

I am already working on the change. Will open a PR soon. Thanks.

Activity

  1. vaibhavdesai137 commented on Jan 30, 2026

    @vaibhavdesai137
    ContributorAuthor

    Open to suggestions for a different flag name. I chose --password-file-reload because it groups lexically with existing flag --password-file :)

  2. thockin commented on Jan 31, 2026

    @thockin
    Member

    We have --askpass-url which (I think?) is a pretty standard way for git to do dynamic credentials.

    Do you think we should piggy-back on that? e.g. tell users to run a tiny webserver which serves the password in the usual form? That feels heavy.

    Will look at your PR

  3. vaibhavdesai137 commented on Feb 4, 2026

    @vaibhavdesai137
    ContributorAuthor

    We have --askpass-url which (I think?) is a pretty standard way for git to do dynamic credentials.

    Do you think we should piggy-back on that? e.g. tell users to run a tiny webserver which serves the password in the usual form? That feels heavy.

    Will look at your PR

    --askpass-url is what we switched to to get dynamic creds. We exposed an endpoint from our web app. The challenge with this approach is the circular dependency. The git-sync sidecar waits for our app container to be ready. And our app container is waiting for git-sync to clone the repo. With some hacks and ugly sleep statements, we eventually got it to work but I personally don't like the setup.

  4. thockin commented on Feb 5, 2026

    @thockin
    Member

    Yeah, I don't like it either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions