Skip to content

Conversation

@erikreinert
Copy link
Member

@erikreinert erikreinert commented Oct 26, 2025

Summary

This PR implements OAuth2 Client Credentials Flow for service-to-service authentication, allowing the worker service to make authenticated requests to the archive and artifact registry services using tokens obtained from an OIDC provider (e.g., Keycloak).

Problem

The worker service had no authentication mechanism for communicating with the archive and artifact services. This prevented secure, auditable access to these services in multi-tenant or production environments.

Solution

Implemented OAuth2 service-to-service authentication using the Client Credentials Flow:

  1. Worker Service Credentials - Accepts OAuth2 credentials via CLI parameters
  2. Token Exchange - Requests access tokens from the OIDC provider at build time
  3. Scope-Based Access - Obtains separate tokens for "archive" and "artifact" scopes
  4. Token Application - Applies tokens to gRPC requests via interceptors
  5. Flexible Validation - Services accept tokens from service accounts without strict audience validation

@erikreinert erikreinert self-assigned this Dec 4, 2025
@erikreinert erikreinert changed the title Added identity support Added OIDC identity support Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants