Skip to content

Short lived tokens as credentials #4751

@nresare

Description

@nresare

I am currently looking into moving away from long lived tokens for git authentication in flipt. It seems it might be feasible to set something up where a sidecar would renew a short-lived token periodically.

However, looking at the Flipt code, it seems to me like the access_token field in the credentials config, whether read directly from the config file or pulled in through the secrets mechanism with an expression such as ${secret:file:github-token}, is only read from the filesystem on Flipt startup and there are no provisions for reloading short lived data from the filesystem without restarting flipt.

First off, am I right in this assumption, that access_token values are only read on Flipt startup?

Wold you be open to introducing an access_token_path configuration key, which could be read from the filesystem on each attempt along the lines of how the GitAuthentication() method creates a new PublicKeys object on each invocation, reading the file as it is requested?

If you are open to that I would be happy to provide an implementation and give it some real life testing.

Another option would be to have general purpose re-loading of configuration once the file timestamp changes, but this seems like something that could potentially have some non-obvious implications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementCreated by Linear-GitHub Sync

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions