Skip to content

Password policy providers cannot supply help text to the Admin Console #50805

Description

@enoquefcd

Description

The Admin Console shows a help tooltip for every password policy row in Authentication → Policies, resolved from the message key passwordPoliciesHelp.<policy id>. When the key has no translation — the normal case for a custom policy — the tooltip shows the raw key.

A policy provider has no direct way to supply this text. ServerInfoAdminResource.setPasswordPolicies serializes id, displayName, configType and defaultValue from the factory, but never consults ConfiguredProvider, so implementing ConfiguredProvider#getHelpText() has no effect. The help text is the only part of the policy row that cannot come from the factory.

Other configurable providers, such as user federation and key providers, already expose helpText through serverInfo.componentTypes, and setProviders in the same resource class already serializes ConfiguredProvider data for every SPI.

The message key can be shipped from the provider JAR through theme-resources/messages, but that is indirect compared to how the rest of the row is defined, and easy to miss: #28798 shipped a built-in policy without its key and the tooltip showed the raw key until #28807 added it. (Community report of the same problem with a custom policy: https://forum.keycloak.org/t/configuring-help-text-for-a-custom-password-spi/24327)

Value Proposition

Password policy providers can define their help text in the factory, like every other configurable provider type, instead of relying on message bundles for a single fixed string.

Goals

  • Include an optional helpText field in PasswordPolicyTypeRepresentation, populated from ConfiguredProvider#getHelpText() when the policy factory implements it.
  • Use it in the Admin Console as a fallback when no passwordPoliciesHelp.<id> translation is defined.
  • Keep translations authoritative: a defined message key wins, built-in policies are unaffected, and the new JSON field is additive.

Non-Goals

  • No SPI changes — ConfiguredProvider is the existing opt-in hook.
  • No change to how policy configuration values are stored or edited.

Discussion

No response

Notes

No SPI change needed: ConfiguredProvider is the existing opt-in hook, and ServerInfoAdminResource already serializes it for other provider types.

I have a PR ready (server, admin client, admin console, and an integration test with a custom policy factory).

Activity

  1. added a commit that references this issue on Jul 11, 2026
    2f6240f
  2. added a commit that references this issue on Sep 23, 2026
    b729201
  3. added
    kind/enhancement
    on Sep 23, 2026
  4. added
    area/admin/ui
    on Sep 23, 2026
  5. added a commit that references this issue on Sep 25, 2026
    caad9b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/admin/uikind/enhancementteam/core-authnteam/core-shared

    Fields

    Value

    None yet

    Effort

    None yet

    Votes

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions