Skip to content

Commit f31b0a9

Browse files
Fix incorrect regex property for email-as-username configuration
Update UsernameJavaScriptRegEx to UsernameWithEmailJavaScriptRegEx and correct the deployment.toml section from [user_store] to [user_store.properties] across all affected versions (5.9.0 - next). The regex uses no backslash escaping to avoid rendering issues in mkdocs while remaining valid for Java's Pattern.compile() inside a character class. Also fix pre-existing markdown lint errors (trailing spaces, multiple blank lines, list marker spacing, missing image alt text, missing trailing newlines). Fixes wso2/product-is#21499
1 parent c7545ab commit f31b0a9

18 files changed

Lines changed: 757 additions & 804 deletions

File tree

en/identity-server/5.10.0/docs/learn/using-email-address-as-the-username.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,20 @@
44
Configuring the email address as the username in an **already running
55
Identity Server** is not the production recommended way. Therefore,
66
**make sure to configure it before you begin working with WSO2 IS**.
7-
87

9-
1. Open the
10-
` <IS_HOME>/repository/conf/deployment.toml ` file.
11-
2. Add the following configuration.
8+
1. Open the
9+
`<IS_HOME>/repository/conf/deployment.toml` file.
10+
2. Add the following configuration.
1211

1312
``` toml
1413
[tenant_mgt]
1514
enable_email_domain= true
1615
```
1716

18-
3. Login to the management console and configure the ` Mapped Attribute
19-
` property of the ` http://wso2.org/claims/username ` claim ID that
20-
is under **Dialect dialectURI** `http://wso2.org/claims` to ` mail
21-
`.
17+
3. Login to the management console and configure the `Mapped Attribute` property of the `http://wso2.org/claims/username` claim ID that
18+
is under **Dialect dialectURI** `http://wso2.org/claims` to `mail`.
2219

23-
4. Configure the following set of parameters in the user store
20+
4. Configure the following set of parameters in the user store
2421
configuration, depending on the type of user store you are connected
2522
to (LDAP/Active Directory/ JDBC).
2623
<table>
@@ -66,18 +63,18 @@
6663
<div class="admonition tip">
6764
<p class="admonition-title">Tip</p>
6865
<p>you are trying with the default embedded LDAP user store, this configuration change is not needed.</p>
69-
</div>
66+
</div>
7067
</div>
7168
</div>
7269
</div></td>
7370
</tr>
7471
<tr class="even">
75-
<td><code> UsernameJavaScriptRegEx </code></td>
72+
<td><code> UsernameWithEmailJavaScriptRegEx </code></td>
7673
<td><div class="content-wrapper">
77-
<p>Change this property that is under the relevant user store manager tag as follows. This property allows you to add special characters like "@" in the username.</p>
74+
<p>Change this property that is under the relevant user store manager tag as follows. This property validates usernames when email is used as the username and allows special characters like "@" in the username.</p>
7875
<div class="code panel pdl" style="border-width: 1px;">
7976
<div class="codeContent panelContent pdl">
80-
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store]<br>username_java_script_regex = &apos;^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$&apos;</code></pre></div>
77+
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store.properties]<br>UsernameWithEmailJavaScriptRegEx = &apos;^[a-zA-Z0-9_@.+-]{5,200}$&apos;</code></pre></div>
8178
</div>
8279
</div>
8380
</div></td>
@@ -106,28 +103,27 @@
106103
<p class="admonition-title">Note</p>
107104
<p>Before this configuration, the user having the username <strong>admin</strong> and password <strong>admin</strong> was considered the super administrator. The super administrator user cannot be deleted.</p>
108105
<p>After this configuration, the user having the username <strong><code> admin@wso2.com </code></strong> is considered the super administrator. The user having the username admin is considered as a normal administrator.<br />
109-
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" width="600" /></p></div>
106+
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" alt="super-admin" width="600" /></p></div>
110107
</div></td>
111108
</tr>
112109
</tbody>
113110
</table>
114111

115-
!!! info
112+
!!! info
116113
With these configuration users can log in to super tenant with both
117114
email user name (**`bob@gmail.com`**) or
118115
non-email user names (**`alice`**). But for tenant only email user names
119-
allowed (**`tod@gmail.com@wso2.com`**).
116+
allowed (**`tod@gmail.com@wso2.com`**).
120117

121118
!!! note
122-
119+
123120
You can configure email user name without enabling
124121
**`enable_email_domain`** property, then
125122
users can login to both super tenant and tenant using email and
126123
non-email user names. But super tenant users should always use
127124
***@carbon.super*** at the end of user names.
128-
129125

130-
5. Restart the server.
126+
5. Restart the server.
131127

132128
!!! info "Related Topics"
133129

en/identity-server/5.11.0/docs/learn/using-email-address-as-the-username.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,20 @@
44
Configuring the email address as the username in an **already running
55
Identity Server** is not the production recommended way. Therefore,
66
**make sure to configure it before you begin working with WSO2 IS**.
7-
87

9-
1. Open the
10-
` <IS_HOME>/repository/conf/deployment.toml ` file.
11-
2. Add the following configuration.
8+
1. Open the
9+
`<IS_HOME>/repository/conf/deployment.toml` file.
10+
2. Add the following configuration.
1211

1312
``` toml
1413
[tenant_mgt]
1514
enable_email_domain= true
1615
```
1716

18-
3. Login to the management console and configure the ` Mapped Attribute
19-
` property of the ` http://wso2.org/claims/username ` claim ID that
20-
is under **Dialect dialectURI** `http://wso2.org/claims` to ` mail
21-
`.
17+
3. Login to the management console and configure the `Mapped Attribute` property of the `http://wso2.org/claims/username` claim ID that
18+
is under **Dialect dialectURI** `http://wso2.org/claims` to `mail`.
2219

23-
4. Configure the following set of parameters in the user store
20+
4. Configure the following set of parameters in the user store
2421
configuration, depending on the type of user store you are connected
2522
to (LDAP/Active Directory/ JDBC).
2623
<table>
@@ -66,18 +63,18 @@
6663
<div class="admonition tip">
6764
<p class="admonition-title">Tip</p>
6865
<p>you are trying with the default embedded LDAP user store, this configuration change is not needed.</p>
69-
</div>
66+
</div>
7067
</div>
7168
</div>
7269
</div></td>
7370
</tr>
7471
<tr class="even">
75-
<td><code> UsernameJavaScriptRegEx </code></td>
72+
<td><code> UsernameWithEmailJavaScriptRegEx </code></td>
7673
<td><div class="content-wrapper">
77-
<p>Change this property that is under the relevant user store manager tag as follows. This property allows you to add special characters like "@" in the username.</p>
74+
<p>Change this property that is under the relevant user store manager tag as follows. This property validates usernames when email is used as the username and allows special characters like "@" in the username.</p>
7875
<div class="code panel pdl" style="border-width: 1px;">
7976
<div class="codeContent panelContent pdl">
80-
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store]<br>username_java_script_regex = &apos;^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$&apos;</code></pre></div>
77+
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store.properties]<br>UsernameWithEmailJavaScriptRegEx = &apos;^[a-zA-Z0-9_@.+-]{5,200}$&apos;</code></pre></div>
8178
</div>
8279
</div>
8380
</div></td>
@@ -106,28 +103,27 @@
106103
<p class="admonition-title">Note</p>
107104
<p>Before this configuration, the user having the username <strong>admin</strong> and password <strong>admin</strong> was considered the super administrator. The super administrator user cannot be deleted.</p>
108105
<p>After this configuration, the user having the username <strong><code> admin@wso2.com </code></strong> is considered the super administrator. The user having the username admin is considered as a normal administrator.<br />
109-
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" width="600" /></p></div>
106+
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" alt="super-admin" width="600" /></p></div>
110107
</div></td>
111108
</tr>
112109
</tbody>
113110
</table>
114111

115-
!!! info
112+
!!! info
116113
With these configuration users can log in to super tenant with both
117114
email user name (**`alex@gmail.com`**) or
118115
non-email user names (`larry`). But for tenant only email user names
119-
allowed (**`tod@gmail.com@wso2.com`**).
116+
allowed (**`tod@gmail.com@wso2.com`**).
120117

121118
!!! note
122-
119+
123120
You can configure email user name without enabling
124121
**`enable_email_domain`** property, then
125122
users can login to both super tenant and tenant using email and
126123
non-email user names. But super tenant users should always use
127124
***@carbon.super*** at the end of user names.
128-
129125

130-
5. Restart the server.
126+
5. Restart the server.
131127

132128
!!! info "Related Topics"
133129

en/identity-server/5.9.0/docs/learn/using-email-address-as-the-username.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,20 @@
44
Configuring the email address as the username in an **already running
55
Identity Server** is not the production recommended way. Therefore,
66
**make sure to configure it before you begin working with WSO2 IS**.
7-
87

9-
1. Open the
10-
` <IS_HOME>/repository/conf/deployment.toml ` file.
11-
2. Add the following configuration.
8+
1. Open the
9+
`<IS_HOME>/repository/conf/deployment.toml` file.
10+
2. Add the following configuration.
1211

1312
``` toml
1413
[tenant_mgt]
1514
enable_email_domain= true
1615
```
1716

18-
3. Login to the management console and configure the ` Mapped Attribute
19-
` property of the ` http://wso2.org/claims/username ` claim ID that
20-
is under **Dialect dialectURI** `http://wso2.org/claims` to ` mail
21-
`.
17+
3. Login to the management console and configure the `Mapped Attribute` property of the `http://wso2.org/claims/username` claim ID that
18+
is under **Dialect dialectURI** `http://wso2.org/claims` to `mail`.
2219

23-
4. Configure the following set of parameters in the user store
20+
4. Configure the following set of parameters in the user store
2421
configuration, depending on the type of user store you are connected
2522
to (LDAP/Active Directory/ JDBC).
2623
<table>
@@ -66,18 +63,18 @@
6663
<div class="admonition tip">
6764
<p class="admonition-title">Tip</p>
6865
<p>you are trying with the default embedded LDAP user store, this configuration change is not needed.</p>
69-
</div>
66+
</div>
7067
</div>
7168
</div>
7269
</div></td>
7370
</tr>
7471
<tr class="even">
75-
<td><code> UsernameJavaScriptRegEx </code></td>
72+
<td><code> UsernameWithEmailJavaScriptRegEx </code></td>
7673
<td><div class="content-wrapper">
77-
<p>Change this property that is under the relevant user store manager tag as follows. This property allows you to add special characters like "@" in the username.</p>
74+
<p>Change this property that is under the relevant user store manager tag as follows. This property validates usernames when email is used as the username and allows special characters like "@" in the username.</p>
7875
<div class="code panel pdl" style="border-width: 1px;">
7976
<div class="codeContent panelContent pdl">
80-
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store]<br>username_java_script_regex = &apos;^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$&apos;</code></pre></div>
77+
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store.properties]<br>UsernameWithEmailJavaScriptRegEx = &apos;^[a-zA-Z0-9_@.+-]{5,200}$&apos;</code></pre></div>
8178
</div>
8279
</div>
8380
</div></td>
@@ -106,28 +103,27 @@
106103
<p class="admonition-title">Note</p>
107104
<p>Before this configuration, the user having the username <strong>admin</strong> and password <strong>admin</strong> was considered the super administrator. The super administrator user cannot be deleted.</p>
108105
<p>After this configuration, the user having the username <strong><code> admin@wso2.com </code></strong> is considered the super administrator. The user having the username admin is considered as a normal administrator.<br />
109-
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" width="600" /></p></div>
106+
<img src="../../assets/img/using-wso2-identity-server/super-admin.png" alt="super-admin" width="600" /></p></div>
110107
</div></td>
111108
</tr>
112109
</tbody>
113110
</table>
114111

115-
!!! info
112+
!!! info
116113
With these configuration users can log in to super tenant with both
117114
email user name (**`bob@gmail.com`**) or
118115
non-email user names (**`alice`**). But for tenant only email user names
119-
allowed (**`tod@gmail.com@wso2.com`**).
116+
allowed (**`tod@gmail.com@wso2.com`**).
120117

121118
!!! note
122-
119+
123120
You can configure email user name without enabling
124121
**`enable_email_domain`** property, then
125122
users can login to both super tenant and tenant using email and
126123
non-email user names. But super tenant users should always use
127124
***@carbon.super*** at the end of user names.
128-
129125

130-
5. Restart the server.
126+
5. Restart the server.
131127

132128
!!! info "Related Topics"
133129

en/identity-server/6.0.0/docs/guides/identity-lifecycles/enable-email-as-username.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,24 @@
44
Configuring the email address as the username in an **already running
55
Identity Server** is not the production recommended way. Therefore,
66
**make sure to configure it before you begin working with WSO2 IS**.
7-
87

9-
1. Log in to the Management Console and click **Claims > List > http://wso2.org/claims**.
10-
8+
1. Log in to the Management Console and click **Claims > List > http://wso2.org/claims**.
9+
1110
2. Click the **Edit** link corresponding to the **Username** claim and configure the `Mapped Attribute` property to `mail`.
1211

1312
![email-as-username-attribute-mapping]({{base_path}}/assets/img/guides/email-as-username-attribute-mapping.png)
14-
13+
1514
3. Click **Update** to save the changes.
1615

17-
4. Open the `<IS_HOME>/repository/conf/deployment.toml` file.
16+
4. Open the `<IS_HOME>/repository/conf/deployment.toml` file.
1817

19-
5. Add the following configuration to enable email authentication.
18+
5. Add the following configuration to enable email authentication.
2019

2120
``` toml
2221
[tenant_mgt]
2322
enable_email_domain= true
2423
```
25-
24+
2625
6. Configure the following set of parameters in the userstore
2726
configuration, depending on the type of userstore you are connected
2827
to (LDAP/Active Directory/ JDBC).
@@ -71,12 +70,12 @@
7170
</div></td>
7271
</tr>
7372
<tr class="even">
74-
<td><code> UsernameJavaScriptRegEx </code></td>
73+
<td><code> UsernameWithEmailJavaScriptRegEx </code></td>
7574
<td><div class="content-wrapper">
76-
<p>Change this property that is under the relevant userstore manager tag as follows. This property allows you to add special characters like "@" in the username.</p>
75+
<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>
7776
<div class="code panel pdl" style="border-width: 1px;">
7877
<div class="codeContent panelContent pdl">
79-
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store]<br>username_java_script_regex = &apos;^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$&apos;</code></pre></div>
78+
<pre class="html/xml" data-syntaxhighlighter-params="brush: html/xml; gutter: false; theme: Confluence" data-theme="Confluence" style="brush: html/xml; gutter: false; theme: Confluence"><code>[user_store.properties]<br>UsernameWithEmailJavaScriptRegEx = &apos;^[a-zA-Z0-9_@.+-]{5,200}$&apos;</code></pre></div>
8079
</div>
8180
</div>
8281
</div></td>
@@ -105,17 +104,17 @@
105104
<p class="admonition-title">Note</p>
106105
<p>Before this configuration, the user having the username <strong>admin</strong> and password <strong>admin</strong> was considered the super administrator. The super administrator user cannot be deleted.</p>
107106
<p>After this configuration, the user having the username <strong><code> admin@wso2.com </code></strong> is considered the super administrator. The user having the username admin is considered as a normal administrator.<br />
108-
<img src="{{base_path}}/assets/img/guides/super-admin.png" width="600" /></p></div>
107+
<img src="{{base_path}}/assets/img/guides/super-admin.png" alt="super-admin" width="600" /></p></div>
109108
</div></td>
110109
</tr>
111110
</tbody>
112111
</table>
113112

114-
!!! info
113+
!!! info
115114
- With these configuration users can log in to super tenant with both
116115
email username (**`alex@gmail.com`**) or
117-
non-email usernames (`larry`). However, for tenants, only email usernames are allowed. (**`tod@gmail.com@wso2.com`**).
116+
non-email usernames (`larry`). However, for tenants, only email usernames are allowed. (**`tod@gmail.com@wso2.com`**).
118117
- You can configure email username without enabling the **`enable_email_domain`** property (step 5). Then users can log in to both the super tenant and the tenant using email and non-email usernames. However, super tenant users should always use
119118
***@carbon.super*** at the end of usernames.
120119

121-
7. Restart the server.
120+
7. Restart the server.

0 commit comments

Comments
 (0)