Skip to content

Use additionalConfigHandlers API to provide Red Hat SSO as registry configuration method #1216

Description

@dgolovin

Podman Desktop is adding a new additionalConfigHandlers API to RegistrySuggestedProvider that allows extensions to contribute named configuration handlers alongside the built-in username/password form. This extension should adopt the new API to offer "Red Hat SSO" as a configuration method for registry.redhat.io.

Upstream tracking issue: podman-desktop/podman-desktop#18133

What needs to change

Update the extensionApi.registry.suggestRegistry() call in src/extension.ts to include an additionalConfigHandlers array:

extensionApi.registry.suggestRegistry({
  name: 'Red Hat Container Registry',
  icon,
  url: 'registry.redhat.io',
  additionalConfigHandlers: [
    {
      label: 'Red Hat SSO',
      isDefault: true,
      handler: ssoConfigHandler,
    },
  ],
});

Behavior

  • The Registries settings page will show a SplitButton for registry.redhat.io instead of the regular "Configure" button
  • The SplitButton offers two options:
    • Configure — opens the existing username/password inline form
    • Configure with Red Hat SSO — invokes configureRegistryAndActivateSubscription (the SSO flow)
  • Since isDefault: true is set, "Configure with Red Hat SSO" is pre-selected when the page opens

Dependencies

Acceptance Criteria

  • suggestRegistry() call updated with additionalConfigHandlers
  • Red Hat SSO handler marked as isDefault: true
  • Handler invokes the existing ssoConfigHandler function
  • 'ssoConfigHandler' function should send telemetry to identify usage of RedHat SSO from Registries page
  • Minimum @podman-desktop/api version bumped to the release containing the new API
  • Unit tests updated to cover the new parameter
  • Extension works correctly with both the new API (SplitButton) and falls back gracefully if loaded in an older Podman Desktop version

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions