Repository navigation
Add Password Policy SPI chapter to the Server Developer Guide - #50804
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Password Policy SPI guidance to the Server Developer Guide.
Changes:
- Documents provider implementation, configuration, localization, registration, and deployment.
- Adds a worked custom password-policy example.
- Includes the chapter in community documentation builds.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
topics/password-policy-spi.adoc |
Adds the Password Policy SPI chapter. |
topics.adoc |
Includes the chapter in community builds. |
ff2c28b to
fbb24ea
Compare
fbb24ea to
1c8d7f4
Compare
1c8d7f4 to
2642cd7
Compare
2642cd7 to
41644db
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
docs/documentation/server_development/topics/password-policy-spi.adoc:155
- The tooltip is loaded through the
admin-messagesbundle (AdminConsole.java:407-408), so adding this key to the previously recommendedmessages_en.propertiesleaves the raw key visible. Direct providers to usetheme-resources/messages/admin-messages_en.properties(and corresponding locale files) for tooltip keys.
The Admin Console shows a tooltip for each policy row, resolved from the admin theme message key `passwordPoliciesHelp.<policy id>`. Ship the key from the provider JAR with the same `theme-resources/messages` mechanism used for error messages:
41644db to
a95f3ad
Compare
a95f3ad to
bc44117
Compare
The guide covers every other commonly extended SPI but had no material on password policies. The new chapter documents the provider and factory interfaces, configuration parsing, error message keys, admin console help text, and provider registration. Closes keycloak#50803 Signed-off-by: Enoque Duarte <enoquefcd@gmail.com>
bc44117 to
e5e4d6a
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The blanket internal-SPI warning incorrectly encompasses the user-defined custom SPI documented in the extensions chapter.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
ahus1
left a comment
There was a problem hiding this comment.
Thank you for the change. Given that it is an internal SPI, I'm usually reluctant to add documentation about it. I've added a note to it.
In addition, I added blank lines to the topics.adoc between the includes, as this is a best practice to make it robust, as otherwise headings might miss the blank line in front of them once the includes are resolved.
e5e4d6a to
4a03a0d
Compare

Closes #50803
Adds a Password Policy SPI chapter to the Server Developer Guide. The guide documents the User Storage, Authentication, Action Token Handler, Event Listener, SAML Role Mappings and Vault SPIs, but had no material on password policies.
The chapter covers, in the structure of the existing SPI chapters:
PasswordPolicyProvider/PasswordPolicyProviderFactory, with a complete example.parseConfigand configuration validation.PolicyErrormessages and thepasswordPoliciesHelp.<id>tooltip key from the provider JAR throughtheme-resources/messages.The chapter is inside the
project_communityconditional, like the other community-only SPI chapters../mvnw clean install -pl docs/documentation/server_development -am -Pdocumentationbuilds clean and the chapter renders in the generated guide.AI disclosure
Generative AI (Claude) was used to assist with drafting the chapter and this description, per the contributing guidelines. I have reviewed and verified every statement against the current sources and will personally address review feedback.