-
Notifications
You must be signed in to change notification settings - Fork 376
Fix: Update regex configuration for email as username for all affected versions (Product IS issue #21499) #5769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix: Update regex configuration for email as username for all affected versions (Product IS issue #21499) #5769
Conversation
…d versions (product-is#21499)
- Changed property name from UsernameJavaScriptRegEx to UsernameWithEmailJavaScriptRegEx
- Updated configuration section from [user_store] to [user_store.properties]
- Updated regex pattern to '^[a-zA-Z0-9_@\.\-\+]{5,200}$' as per implementation
- Applied fix to all versions: 5.9.0, 5.10.0, 5.11.0, 6.0.0, 6.1.0, 7.0.0, 7.1.0, 7.2.0, next
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
wso2-engineering-bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
WalkthroughDocumentation across multiple Identity Server versions is updated to rename the user store configuration property from Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
en/identity-server/6.0.0/docs/guides/identity-lifecycles/enable-email-as-username.md (1)
76-76: Minor improvement: Document the character length constraint.The description states this property allows special characters like "@" but does not mention the 5–200 character length requirement. Consider enriching the description to mention this constraint for completeness:
-<p>Change this property that is under the relevant userstore manager tag as follows. This property validates usernames when email is used as the username and allows special characters like "@" in the username.</p> +<p>Change this property that is under the relevant userstore manager tag as follows. This property validates usernames when email is used as the username and allows special characters like "@" in the username. The username must be between 5 and 200 characters long.</p>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
en/identity-server/5.10.0/docs/learn/using-email-address-as-the-username.md(1 hunks)en/identity-server/5.11.0/docs/learn/using-email-address-as-the-username.md(1 hunks)en/identity-server/5.9.0/docs/learn/using-email-address-as-the-username.md(1 hunks)en/identity-server/6.0.0/docs/guides/identity-lifecycles/enable-email-as-username.md(1 hunks)en/identity-server/6.1.0/docs/guides/identity-lifecycles/enable-email-as-username.md(1 hunks)en/identity-server/7.0.0/docs/guides/users/attributes/enable-email-as-username.md(1 hunks)en/identity-server/7.1.0/docs/guides/users/attributes/enable-email-as-username.md(1 hunks)en/identity-server/7.2.0/docs/guides/users/attributes/enable-email-as-username.md(1 hunks)en/identity-server/next/docs/guides/users/attributes/enable-email-as-username.md(1 hunks)
🔇 Additional comments (12)
en/identity-server/7.2.0/docs/guides/users/attributes/enable-email-as-username.md (2)
74-76: Property rename and description clarify email-username validation.The update from
UsernameJavaScriptRegExtoUsernameWithEmailJavaScriptRegExwith an explicit description stating the property "validates usernames when email is used as the username and allows special characters like '@'" improves clarity and aligns with the PR objective to address product issue #21499. The changes are consistent with supporting email-based usernames.
79-79: Verify TOML section structure and regex pattern compatibility.The configuration section has been moved from
[user_store]to[user_store.properties], and the regex pattern updated to^[a-zA-Z0-9_@\.\-\+]{5,200}$. While the pattern is syntactically sound and appropriate for email-like usernames (length 5–200, supporting @ and other email chars), confirm:
- The
[user_store.properties]placement is the correct WSO2 IS configuration convention for this property, since other nearby username properties (e.g.,UsernameJavaRegExon line 90) remain under[user_store].- The regex engine in WSO2 IS 7.2.0 correctly interprets this pattern without issues.
- Consistency across all nine documented versions (5.9.0–7.2.0 and next) uses the same
[user_store.properties]section.You may verify by checking whether
[user_store.properties]is documented in the WSO2 IS configuration schema for version 7.2.0 or by confirming the related product implementation (UserSelfRegistrationManager.java referenced in the PR summary).en/identity-server/6.0.0/docs/guides/identity-lifecycles/enable-email-as-username.md (1)
74-79: ✓ Configuration property update is correct.The change from
UsernameJavaScriptRegExtoUsernameWithEmailJavaScriptRegExappropriately signals a purpose-specific property. The regex pattern^[a-zA-Z0-9_@\.\-\+]{5,200}$correctly permits email-like usernames with "@" and other common email characters (dot, hyphen, plus). The configuration section is properly moved to[user_store.properties], and HTML entities are correctly escaped.en/identity-server/7.0.0/docs/guides/users/attributes/enable-email-as-username.md (1)
74-79: Documentation accurately reflects corrected configuration.The property name, configuration section, regex pattern, and description have been properly updated to align with the email-as-username implementation. The regex pattern correctly allows email-specific characters (@, dot, hyphen, plus) while maintaining the 5–200 character length constraint.
en/identity-server/next/docs/guides/users/attributes/enable-email-as-username.md (1)
74-79: Consistent update across versions.The changes mirror the updates in the 7.0.0 version, ensuring documentation consistency across all Identity Server versions.
en/identity-server/7.1.0/docs/guides/users/attributes/enable-email-as-username.md (1)
74-79: Consistent update across versions.The changes align with updates in the 7.0.0 and next versions, maintaining documentation consistency across all Identity Server releases.
en/identity-server/6.1.0/docs/guides/identity-lifecycles/enable-email-as-username.md (2)
74-82: Verify configuration section and regex pattern align with actual implementation.The documentation change correctly renames the property to
UsernameWithEmailJavaScriptRegExand includes a clear description. However, the configuration section is shown as[user_store.properties](line 79), which differs from the standard[user_store]section used for other properties above. Additionally, the regex pattern^[a-zA-Z0-9_@\.\-\+]{5,200}$does not enforce typical email structure (e.g., no required "@" or domain validation). While this may be intentional, it should be confirmed against the actual implementation.Please verify:
- Whether
[user_store.properties]is the correct configuration section in the deployment.toml schema (or whether it should be[user_store]).- That the regex pattern
^[a-zA-Z0-9_@\.\-\+]{5,200}$matches what's implemented inUserSelfRegistrationManager.java(referenced in PR objectives).- Consistency of this change across all nine version files mentioned in the PR (versions 5.9.0, 5.10.0, 5.11.0, 6.0.0, 6.1.0, 7.0.0, 7.1.0, 7.2.0, and next).
26-94: Documentation structure and property distinction are clear.The table correctly documents both
UsernameWithEmailJavaScriptRegEx(for email-as-username) andUsernameJavaRegEx(for general username validation), allowing users to understand which property to use in their scenario. The HTML table structure is well-formed, and the new row integrates cleanly into the existing configuration table.en/identity-server/5.10.0/docs/learn/using-email-address-as-the-username.md (1)
75-84: Documentation update is consistent across all versions.The property rename to
UsernameWithEmailJavaScriptRegEx, the clarified description, and the configuration under[user_store.properties]are consistently applied across all documented versions. The regex pattern^[a-zA-Z0-9_@\.\-\+]{5,200}$properly allows email-based usernames with special characters like "@".Note: Implementation verification against UserSelfRegistrationManager.java requires review of the product source repository (not this documentation repository).
en/identity-server/5.11.0/docs/learn/using-email-address-as-the-username.md (1)
75-83: All 9 documentation versions have been updated consistently with correct property configuration.The changes across all affected versions (5.9.0, 5.10.0, 5.11.0, 6.0.0, 6.1.0, 7.0.0, 7.1.0, 7.2.0, next) correctly:
- Rename the property to
UsernameWithEmailJavaScriptRegEx- Set the configuration section to
[user_store.properties]- Apply the regex pattern
^[a-zA-Z0-9_@\.\-\+]{5,200}$with proper escaping for @ and . characters- Clarify the property's purpose for email-based username validation
Note: Versions 6.0.0 and later use reorganized documentation paths (e.g.,
docs/guides/identity-lifecycles/anddocs/guides/users/attributes/), but the content updates are consistent across all versions.en/identity-server/5.9.0/docs/learn/using-email-address-as-the-username.md (2)
75-77: Property rename and description clarify email-username validation intent.The change from
UsernameJavaScriptRegExtoUsernameWithEmailJavaScriptRegExis a clear, explicit improvement that immediately signals email-based username support. The updated description correctly conveys that the property validates usernames when email is used and permits the "@" character.
80-80: Configuration and regex pattern are correct and consistent across all versions.The configuration section
[user_store.properties]with the regex pattern^[a-zA-Z0-9_@\.\-\+]{5,200}$is the correct and documented approach used consistently across all Identity Server versions (5.9.0 through 7.2.0). This section is specifically designated for user store properties likeUsernameWithEmailJavaScriptRegEx, which validates usernames when email is used as the username and allows special characters such as "@". The regex correctly supports email username formats within the 5-200 character length requirement.
This PR was automatically generated by Claude AI.
UsernameJavaScriptRegExtoUsernameWithEmailJavaScriptRegExto match the actual implementation in the identity-governance component.Changes Made
UsernameJavaScriptRegExtoUsernameWithEmailJavaScriptRegEx[user_store]to[user_store.properties]'^[a-zA-Z0-9_@\.\-\+]{5,200}$'as specified in the issueAffected Versions
All versions have been updated in this PR:
Style Scope Verification
Microsoft Style Guidelines have been applied ONLY to the newly added/modified content in the description text. Existing documentation structure and style have been preserved unless specifically part of the required fix.
Verification
Reference
According to the implementation in UserSelfRegistrationManager.java, the property
UsernameWithEmailJavaScriptRegExis used when email is configured as the username, notUsernameJavaScriptRegEx.🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.