Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Change the Default Datasource for Consent Management

WSO2 Identity Server is shipped with an embedded H2 database for storing data.

Check failure on line 3 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:3:79 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
These default databases are located in the `<IS_HOME>/repository/database` directory

Check failure on line 4 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:4:85 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
of the pack.

By default, consent management data is stored in the identity database (IDENTITY_DB) with

Check failure on line 7 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:7:90 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md

Check warning on line 7 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is stored' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is stored' looks like passive voice.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 7, "column": 37}}}, "severity": "INFO"}

Check warning on line 7 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.Passive] 'is stored' may be passive voice. Use active voice if you can. Raw Output: {"message": "[write-good.Passive] 'is stored' may be passive voice. Use active voice if you can.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 7, "column": 37}}}, "severity": "WARNING"}

Check warning on line 7 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.E-Prime] Try to avoid using 'is'. Raw Output: {"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 7, "column": 37}}}, "severity": "INFO"}
Identity and UMA data. However, you can separate consent specific data into a separate
Identity data. However, you can separate consent specific data into a separate

Check failure on line 8 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:8:79 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md

Check warning on line 8 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.TooWordy] 'However' is too wordy. Raw Output: {"message": "[write-good.TooWordy] 'However' is too wordy.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 8, "column": 16}}}, "severity": "WARNING"}
datasource to any database type that is supported by WSO2 Identity Server.

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.E-Prime] Try to avoid using 'is'. Raw Output: {"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 38}}}, "severity": "INFO"}

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.Passive] 'is supported' may be passive voice. Use active voice if you can. Raw Output: {"message": "[write-good.Passive] 'is supported' may be passive voice. Use active voice if you can.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 38}}}, "severity": "WARNING"}

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is supported' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is supported' looks like passive voice.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 38}}}, "severity": "INFO"}

Check failure on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 33}}}, "severity": "ERROR"}

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.Spelling] Did you really mean 'datasource'? Raw Output: {"message": "[WSO2-IAM.Spelling] Did you really mean 'datasource'?", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 1}}}, "severity": "WARNING"}

!!! note
For more information about databases, see

Check failure on line 12 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:12:46 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
[Work with Databases]({{base_path}}/deploy/configure/databases) and [Set Up Separate Databases for Clustering]({{base_path}}/deploy/set-up-separate-databases-for-clustering).

Following are the sample configuration for each database type.

??? Example "PostgreSQL"

Check failure on line 18 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:18:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
1. Configure the `<IS-HOME>/repository/conf/deployment.toml` file.

```
Expand Down Expand Up @@ -55,7 +55,7 @@
??? Example "DB2"
1. Configure the `<IS-HOME>/repository/conf/deployment.toml` file.
```
[[datasource]]

Check failure on line 58 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Spaces inside code span elements

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:58:1 MD038/no-space-in-code Spaces inside code span elements [Context: "``` [[datasource]] ..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
id="WSO2CONSENT_DB"
url = "jdbc:db2://192.168.108.31:50000/test"
username = "db2inst1"
Expand All @@ -63,17 +63,17 @@
driver = "com.ibm.db2.jcc.DB2Driver"
jmx_enable=false
```

Check failure on line 66 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:66:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 8] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
2. Execute the database scripts.

Execute the scripts in the `<IS-HOME>/dbscripts/consent/db2.sql` file against
the created database.


Check failure on line 72 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Multiple consecutive blank lines

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:72 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
??? Example "MSSQL"
1. Configure the `<IS-HOME>/repository/conf/deployment.toml` file.
```
[[datasource]]

Check failure on line 76 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / lint

Spaces inside code span elements

en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md:76:1 MD038/no-space-in-code Spaces inside code span elements [Context: "``` [[datasource]] ..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
id="WSO2CONSENT_DB"
url = "jdbc:sqlserver://localhost:1433;databaseName=test;SendStringParametersAsUnicode=false"
username = "sa"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
These default databases are located in the `<IS_HOME>/repository/database` directory
of the pack.

By default, session data is stored in the identity database (IDENTITY_DB) with

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is stored' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is stored' looks like passive voice.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md", "range": {"start": {"line": 9, "column": 26}}}, "severity": "INFO"}

Check warning on line 9 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [write-good.Passive] 'is stored' may be passive voice. Use active voice if you can. Raw Output: {"message": "[write-good.Passive] 'is stored' may be passive voice. Use active voice if you can.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md", "range": {"start": {"line": 9, "column": 26}}}, "severity": "WARNING"}
Identity and UMA data. However, you can separate session specific data into a separate
Identity data. However, you can separate session specific data into a separate
datasource to any database type that is supported by WSO2 Identity Server.

Check failure on line 11 in en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/7.0.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md", "range": {"start": {"line": 11, "column": 33}}}, "severity": "ERROR"}

!!! note
For more information about databases, see
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
# Seperate Databases for Clustering

WSO2 Identity Server uses a database to store information such as user management details and identity data. By default, WSO2 Identity Server is shipped with an embedded H2 database that works for all types of data.

This section guides you through the logical separation of data that you
can do when clustering WSO2 Identity Server.

!!! warning "Embedded H2 is NOT RECOMMENDED in production"
The embedded H2 database is not recommended for enterprise testing and production environments. It has lower performance, and clustering limitations, and can cause file corruption failures. Therefore, use an industry-standard RDBMS such as Oracle, PostgreSQL, MySQL, or MS SQL instead.

!!! tip "Before you begin"
Creating separate databases as shown below is not mandatory. Instead, you can point to all the following data sources according to the default data structure. This will not make a difference in performance. <!-- TODO For more information on default database structure, see [Working with Databases]({{base_path}}/deploy/work-with-databases).-->

The following image shows the default database structure and a recommended database structure for the logical separation of data.

![Separate-databases-for-clustering]({{base_path}}/assets/img/setup/deploy/separate-databases-for-clustering.png)

<table>
<thead>
<tr class="header">
<th>Database Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>USERSTORE_DB</code></td>
<td>
<li>Mainly contains users and roles of the system</li>
<li>Contains authorization manager configurations, internal permissions, and roles</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
.</li>
<li>For more information, see <a href="{{base_path}}/guides/users/user-stores/">Configure Userstores</a>.</li>
</td>
</tr>
<tr class="even">
<td><code>IDENTITY_DB</code></td>
<td>
<li>This contains identity-related data. For example, user sessions, OAuth 2.0, SAML 2.0, User Managed Access (UMA), etc.</li>
<li>In the default database configuration, all the UMA, consent, and identity data are located in the <code>IDENTITY_DB</code>. In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database `CONSENT_MGT`</li>.
<!--<li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>BPS_DB</code></td>
<td>
<li>This is used to create, drop, and truncate data pertaining to the workflow feature.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-bpsds">Change the Default Datasource for BPS</a>.</li>-->
</td>
</tr>
<tr class="odd">
<td><code>SHARED_DB</code></td>
<td>
<li>This is the shared database for config and governance registry mounts in WSO2 Identity Server's nodes. This includes data on tenants and keystores.</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
During a deployment, user data can be configured to a different database, <code>USERSTORE_DB</code> while the registry
data remains in the <code>SHARED_DB</code>
.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>CONSENT_MGT</code></td>
<td>
<li>Used for data pertaining to user consents</li>
<li>In the default database configuration, UMA, consent, and identity data are located <code>IDENTITY_DB</code>.
In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-consent-management">Change the Default Datasource for Consent Management</a>.</li>-->
</td>
</tr>
</tbody>
</table>

<!-- TODO !!! note
For more information on `SHARED_DB` and `IDENTITY_DB`, see [Working with Databases]({{base_path}}/deploy/work-with-databases/).-->
{% include "../../../../includes/deploy/configure/databases/clustering.md" %}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
of the pack.

By default, consent management data is stored in the identity database (IDENTITY_DB) with
Identity and UMA data. However, you can separate consent specific data into a separate
Identity data. However, you can separate consent specific data into a separate
datasource to any database type that is supported by WSO2 Identity Server.

Check failure on line 9 in en/identity-server/7.1.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/7.1.0/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 33}}}, "severity": "ERROR"}

!!! note
For more information about databases, see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
of the pack.

By default, session data is stored in the identity database (IDENTITY_DB) with
Identity and UMA data. However, you can separate session specific data into a separate
Identity data. However, you can separate session specific data into a separate
datasource to any database type that is supported by WSO2 Identity Server.

Check failure on line 11 in en/identity-server/7.1.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/7.1.0/docs/deploy/configure/databases/carbon-database/change-datasource-session.md", "range": {"start": {"line": 11, "column": 33}}}, "severity": "ERROR"}

!!! note
For more information about databases, see
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
# Seperate Databases for Clustering

WSO2 Identity Server uses a database to store information such as user management details and identity data. By default, WSO2 Identity Server is shipped with an embedded H2 database that works for all types of data.

This section guides you through the logical separation of data that you
can do when clustering WSO2 Identity Server.

!!! warning "Embedded H2 is NOT RECOMMENDED in production"
The embedded H2 database is not recommended for enterprise testing and production environments. It has lower performance, and clustering limitations, and can cause file corruption failures. Therefore, use an industry-standard RDBMS such as Oracle, PostgreSQL, MySQL, or MS SQL instead.

!!! tip "Before you begin"
Creating separate databases as shown below is not mandatory. Instead, you can point to all the following data sources according to the default data structure. This will not make a difference in performance. <!-- TODO For more information on default database structure, see [Working with Databases]({{base_path}}/deploy/work-with-databases).-->

The following image shows the default database structure and a recommended database structure for the logical separation of data.

![Separate-databases-for-clustering]({{base_path}}/assets/img/setup/deploy/separate-databases-for-clustering.png)

<table>
<thead>
<tr class="header">
<th>Database Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>USERSTORE_DB</code></td>
<td>
<li>Mainly contains users and roles of the system</li>
<li>Contains authorization manager configurations, internal permissions, and roles</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
.</li>
<li>For more information, see <a href="{{base_path}}/guides/users/user-stores/">Configure Userstores</a>.</li>
</td>
</tr>
<tr class="even">
<td><code>IDENTITY_DB</code></td>
<td>
<li>This contains identity-related data. For example, user sessions, OAuth 2.0, SAML 2.0, User Managed Access (UMA), etc.</li>
<li>In the default database configuration, all the UMA, consent, and identity data are located in the <code>IDENTITY_DB</code>. In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database `CONSENT_MGT`</li>.
<!--<li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>BPS_DB</code></td>
<td>
<li>This is used to create, drop, and truncate data pertaining to the workflow feature.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-bpsds">Change the Default Datasource for BPS</a>.</li>-->
</td>
</tr>
<tr class="odd">
<td><code>SHARED_DB</code></td>
<td>
<li>This is the shared database for config and governance registry mounts in WSO2 Identity Server's nodes. This includes data on tenants and keystores.</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
During a deployment, user data can be configured to a different database, <code>USERSTORE_DB</code> while the registry
data remains in the <code>SHARED_DB</code>
.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>CONSENT_MGT</code></td>
<td>
<li>Used for data pertaining to user consents</li>
<li>In the default database configuration, UMA, consent, and identity data are located <code>IDENTITY_DB</code>.
In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-consent-management">Change the Default Datasource for Consent Management</a>.</li>-->
</td>
</tr>
</tbody>
</table>

<!-- TODO !!! note
For more information on `SHARED_DB` and `IDENTITY_DB`, see [Working with Databases]({{base_path}}/deploy/work-with-databases/).-->
{% include "../../../../includes/deploy/configure/databases/clustering.md" %}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
of the pack.

By default, consent management data is stored in the identity database (IDENTITY_DB) with
Identity and UMA data. However, you can separate consent specific data into a separate
Identity data. However, you can separate consent specific data into a separate
datasource to any database type that is supported by WSO2 Identity Server.

Check failure on line 9 in en/identity-server/next/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/next/docs/deploy/configure/databases/carbon-database/change-datasource-consent-management.md", "range": {"start": {"line": 9, "column": 33}}}, "severity": "ERROR"}

!!! note
For more information about databases, see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
of the pack.

By default, session data is stored in the identity database (IDENTITY_DB) with
Identity and UMA data. However, you can separate session specific data into a separate
Identity data. However, you can separate session specific data into a separate
datasource to any database type that is supported by WSO2 Identity Server.

Check failure on line 11 in en/identity-server/next/docs/deploy/configure/databases/carbon-database/change-datasource-session.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "en/identity-server/next/docs/deploy/configure/databases/carbon-database/change-datasource-session.md", "range": {"start": {"line": 11, "column": 33}}}, "severity": "ERROR"}

!!! note
For more information about databases, see
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
# Seperate Databases for Clustering

WSO2 Identity Server uses a database to store information such as user management details and identity data. By default, WSO2 Identity Server is shipped with an embedded H2 database that works for all types of data.

This section guides you through the logical separation of data that you
can do when clustering WSO2 Identity Server.

!!! warning "Embedded H2 is NOT RECOMMENDED in production"
The embedded H2 database is not recommended for enterprise testing and production environments. It has lower performance, and clustering limitations, and can cause file corruption failures. Therefore, use an industry-standard RDBMS such as Oracle, PostgreSQL, MySQL, or MS SQL instead.

!!! tip "Before you begin"
Creating separate databases as shown below is not mandatory. Instead, you can point to all the following data sources according to the default data structure. This will not make a difference in performance. <!-- TODO For more information on default database structure, see [Working with Databases]({{base_path}}/deploy/work-with-databases).-->

The following image shows the default database structure and a recommended database structure for the logical separation of data.

![Separate-databases-for-clustering]({{base_path}}/assets/img/setup/deploy/separate-databases-for-clustering.png)

<table>
<thead>
<tr class="header">
<th>Database Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>USERSTORE_DB</code></td>
<td>
<li>Mainly contains users and roles of the system</li>
<li>Contains authorization manager configurations, internal permissions, and roles</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
.</li>
<li>For more information, see <a href="{{base_path}}/guides/users/user-stores/">Configure Userstores</a>.</li>
</td>
</tr>
<tr class="even">
<td><code>IDENTITY_DB</code></td>
<td>
<li>This contains identity-related data. For example, user sessions, OAuth 2.0, SAML 2.0, User Managed Access (UMA), etc.</li>
<li>In the default database configuration, all the UMA, consent, and identity data are located in the <code>IDENTITY_DB</code>. In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database `CONSENT_MGT`</li>.
<!--<li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>BPS_DB</code></td>
<td>
<li>This is used to create, drop, and truncate data pertaining to the workflow feature.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-bpsds">Change the Default Datasource for BPS</a>.</li>-->
</td>
</tr>
<tr class="odd">
<td><code>SHARED_DB</code></td>
<td>
<li>This is the shared database for config and governance registry mounts in WSO2 Identity Server's nodes. This includes data on tenants and keystores.</li>
<li>In the default database configuration, user data and registry data are located inside <code>SHARED_DB</code>.
During a deployment, user data can be configured to a different database, <code>USERSTORE_DB</code> while the registry
data remains in the <code>SHARED_DB</code>
.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/work-with-databases">Working with Databases</a>.</li>-->
</td>
</tr>
<tr class="even">
<td><code>CONSENT_MGT</code></td>
<td>
<li>Used for data pertaining to user consents</li>
<li>In the default database configuration, UMA, consent, and identity data are located <code>IDENTITY_DB</code>.
In a deployment, both identity and UMA can be configured in a single database while consent data is configured to a separate database.</li>
<!-- TODO <li>For more information, see <a href="{{base_path}}/deploy/change-datasource-consent-management">Change the Default Datasource for Consent Management</a>.</li>-->
</td>
</tr>
</tbody>
</table>

<!-- TODO !!! note
For more information on `SHARED_DB` and `IDENTITY_DB`, see [Working with Databases]({{base_path}}/deploy/work-with-databases/).-->
{% include "../../../../includes/deploy/configure/databases/clustering.md" %}
38 changes: 38 additions & 0 deletions en/includes/deploy/configure/databases/clustering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Separate databases for clustering

WSO2 Identity Server uses a database to store information such as user management details and identity data. By default, WSO2 Identity Server is shipped with an embedded H2 database that works for all types of data.

!!! warning "Embedded H2 is NOT RECOMMENDED in production"

Check failure on line 5 in en/includes/deploy/configure/databases/clustering.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'isn't' instead of 'is NOT'. Raw Output: {"message": "[Microsoft.Contractions] Use 'isn't' instead of 'is NOT'.", "location": {"path": "en/includes/deploy/configure/databases/clustering.md", "range": {"start": {"line": 5, "column": 26}}}, "severity": "ERROR"}
The embedded H2 database doesn't suit enterprise testing or production. It gives lower performance, clustering limitations, and file corruption failures. Use an industry-standard RDBMS such as Oracle, PostgreSQL, MySQL, or MS SQL.

!!! tip "Before you begin"
Creating separate databases as shown below isn't mandatory. You can point all the following data sources to the default data structure. This does not affect performance. For more information, see [Working with Databases]({{base_path}}/deploy/work-with-databases).

Check failure on line 9 in en/includes/deploy/configure/databases/clustering.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'doesn't' instead of 'does not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'doesn't' instead of 'does not'.", "location": {"path": "en/includes/deploy/configure/databases/clustering.md", "range": {"start": {"line": 9, "column": 146}}}, "severity": "ERROR"}

The following image shows the default database structure and a recommended database structure for logical separation.

![Separate-databases-for-clustering]({{base_path}}/assets/img/setup/deploy/separate-databases-for-clustering.png)

**SHARED_DB**

- Shared database for config and governance registry mounts in WSO2 Identity Server's nodes. This includes data on tenants and keystores.
- For more information, see [Change the default databases]({{base_path}}/deploy/configure/databases/carbon-database).

**USERSTORE_DB**

- Mainly contains users and roles of the system.
- Contains authorization manager configurations, internal permissions, and roles.
- Userstore databases separation is required when using an external userstore such as LDAP or Active Directory.
- For more information, see [Configure Userstores]({{base_path}}/guides/users/user-stores/).

**IDENTITY_DB**

- Contains identity-related data. For example, user sessions, OAuth 2.0, SAML 2.0, etc.

**SESSION_DB**

- Stores session-related data. For example, user sessions, session contexts, etc.
- Session database separation is recommended for deployments that require higher concurrency and throughput.
- For more information, see [Change the Datasource for Session Database]({{base_path}}/deploy/configure/databases/carbon-database/change-datasource-session/).

<!-- TODO !!! note
For more information on `SHARED_DB` and `IDENTITY_DB`, see [Working with Databases]({{base_path}}/deploy/work-with-databases/).-->
Loading