Skip to content

podman login with SPIFFE Workload Identity Tokens #28225

Description

@adambkaplan

Feature request description

podman login supports HTTP basic authentication (username/password) as well as authentication from token-based credentials in a relevant auth/config.json file.

This feature would add support for authenticating with container registries using SPIFFE Verifiable Identity Documents (SVID).

Suggest potential solution

Prerequisites

  • SPIRE or other SPIFFE-compliant workload identity agent running on host.
  • Registry is set up with an appropriately configured federated identity provider that trusts the domain that the SPIFFE-compliant agent belongs to.

Potential Solution

  • User experience:
    podman login [registry] --use-workload-id \
      --workload-id-provider=https://registry.domain/oauth2/federation
      --spiffe-endpoint=unix:///run/spire/sockets/spire-agent.sock
  • Execution:
    • Podman requests the workload SVID through the spiffe-endpoint.
    • Podman exchanges the SVID for an OIDC token at the proivded workload-id-provider endpoint
    • OIDC token is utilized to complete the authentication with the container registry.

Have you considered any alternatives?

The current "status quo" - do the SVID/OIDC token exchange outside of Podman, then pass it in as the --password. Example here

Additional context

Working with SVIDs - SPIFFE documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.stale-issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions