Repository navigation
Description
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
helpTextfield inPasswordPolicyTypeRepresentation, populated fromConfiguredProvider#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 —
ConfiguredProvideris 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).
Metadata
Metadata
Assignees
Labels
Type
Fields
Value
Effort
Votes
Projects
- StatusShow more project fieldsOpen
Activity
Expose password policy provider help text in the Admin Console
Expose password policy provider help text in the Admin Console
Expose password policy provider help text in the Admin Console