Skip to content

Provider config: separate friendly name from type/host ID #127

@coopernetes

Description

@coopernetes

Problem

The recent enforcement of type/host as the canonical provider ID (needed for unambiguous request routing) has bled into the config file format. Every place that references a provider by name now requires the full type/host slug:

providers:
  github/github.com:
    attestation-questions: ...

permissions:
  - provider: github/github.com
    ...

rules:
  allow:
    - providers:
        - github/github.com

The slash format is awkward to type, visually noisy, and breaks the config-stitching ergonomics that short names provided (e.g. github as a map key that ties together attestation questions, permissions, and URL rules in one place).

What we want

A short, human-friendly name (e.g. github) that is used as the config key and cross-reference label throughout YAML, independent of the internal type/host ID that the proxy uses for request matching.

Possible shape:

providers:
  github:           # friendly name — used everywhere in config
    type: github
    host: github.com
    attestation-questions: ...

Permissions, rules, and SCM identities would continue to reference github (the friendly name), while the proxy resolves the correct upstream and matches incoming requests via type + host internally.

Constraints

  • The type/host ID must remain unambiguous for proxy routing — two providers of the same type on different hosts must not collide.
  • Friendly names must be unique within a config file.
  • Existing behaviour for multi-provider setups (e.g. two Forgejo instances) must still work; each would get a distinct friendly name.

Impact

Low priority for now — type/host keys work, they're just ugly. Config readability and onboarding UX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configConfiguration, registry, provider loadingenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions