You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/identity-server/7.2.0/docs/deploy/token-persistence.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -754,7 +754,7 @@ persist_refresh_token = false
754
754
### Removing unused refresh tokens and revoke entries from the database
755
755
756
756
!!! note
757
-
This section applies to database cleanup when the non-persistent access token feature is enabled. For persistent mode, refer to [Clean unused tokens from database](../../setup/removing-unused-tokens-from-the-database).
757
+
This section applies to database cleanup when the non-persistent access token feature is enabled. For persistent mode, refer to [Clean unused tokens from database]({{base_path}}/deploy/remove-unused-tokens-from-the-database).
758
758
759
759
As you continue to use **WSO2 Identity Server (WSO2 IS)**, the number of **revoked**, **inactive**, and **expired** tokens increases in the `IDN_OAUTH2_REFRESH_TOKEN` table. When a token is revoked, a record is also added to the `IDN_OAUTH2_REVOKED_TOKENS` table. These tokens are retained for purposes such as **logging**, **auditing**, and **validation**.
Copy file name to clipboardExpand all lines: en/identity-server/next/docs/deploy/token-persistence.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Token Persistence
1
+
# Token persistence
2
2
3
3
This guide describes OAuth2 token persistence and the possible approaches you can follow for token persistence in a production environment. The OAuth2 component in the WSO2 Identity Server (WSO2 IS) has two implementations that can be used to handle token persistence in the database (synchronous and asynchronous token persistence).
4
4
@@ -204,7 +204,7 @@ persist_refresh_token = false
204
204
### Removing unused refresh tokens and revoke entries from the database
205
205
206
206
!!! note
207
-
This section applies to database cleanup when the non-persistent access token feature is enabled. For persistent mode, refer to [Clean unused tokens from database](../../setup/removing-unused-tokens-from-the-database).
207
+
This section applies to database cleanup when the non-persistent access token feature is enabled. For persistent mode, refer to [Clean unused tokens from database]({{base_path}}/deploy/remove-unused-tokens-from-the-database).
208
208
209
209
As you continue to use **WSO2 Identity Server (WSO2 IS)**, the number of **revoked**, **inactive**, and **expired** tokens increases in the `IDN_OAUTH2_REFRESH_TOKEN` table. When a token is revoked, a record is also added to the `IDN_OAUTH2_REVOKED_TOKENS` table. These tokens are retained for purposes such as **logging**, **auditing**, and **validation**.
Copy file name to clipboardExpand all lines: en/includes/deploy/remove-unused-tokens-from-the-database.md
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,15 @@
1
-
# Remove Unused Tokens from the Database
1
+
# Remove unused tokens from the database
2
2
3
-
As you use WSO2 Identity Server (WSO2 IS), the number of revoked, inactive, and expired tokens accumulate in the `IDN_OAUTH2_ACCESS_TOKEN` table. These tokens are kept in the database for logging and audit purposes but they can have a negative impact on the server's performance over time.
4
-
Therefore, it is recommended to clean them periodically in order to enhance the token lookup and to avoid a growing access token table.
3
+
As you use WSO2 Identity Server, the number of revoked, inactive, and expired tokens accumulate in the `IDN_OAUTH2_ACCESS_TOKEN` table. The database stores these tokens for logging and audit purposes, but they can degrade the server's performance over time.
5
4
6
-
You can use one of the following methods for token cleanup.
5
+
To maintain optimal performance, and avoid the access token table from growing indefinitely, you can periodically clean up the database by removing unused tokens. You can do this using either of the following methods:
7
6
8
-
!!! note
9
-
We recommend using stored procedures instead of the WSO2 Identity Server to clean up tokens.
7
+
## Use the stored procedures for token cleanup (recommended)
10
8
11
-
## Use the store procedure for token cleanup
12
-
13
-
You can use the provided stored procedures to run a token cleanup task periodically to remove the old and invalid tokens.
14
-
Follow the instructions below to configure token cleanup using this method.
9
+
You can use the provided stored procedures to run a token cleanup task periodically to remove the old and invalid tokens. Follow the instructions below to configure token cleanup using this method.
15
10
16
11
!!! tip
17
-
It is safe to run these steps in read-only mode or during a time when traffic on the server is low, but it is not mandatory.
12
+
Run these steps during a low-traffic period to reduce disruption to the server.
18
13
19
14
1. Disable the internal token cleanup process by configuring the following property in the `deployment.toml` file found in the `<IS_HOME>/repository/conf` folder.
20
15
@@ -36,13 +31,13 @@ Follow the instructions below to configure token cleanup using this method.
36
31
37
32
## Configure WSO2 Identity Server for token cleanup
38
33
39
-
Alternatively, you can use the WSO2 Identity Server, which triggers token cleanup during the following instances.
34
+
While stored procedures are recommended, you can use the WSO2 Identity Server to trigger token cleanup during the following instances.
40
35
41
36
- New token generation
42
37
- Token refresh
43
38
- Token revocation
44
39
45
-
Enable token cleanup by configuring the following properties in the `deployment.toml` file found in the `<IS_HOME>/repository/conf` folder.
40
+
Enable token cleanup by configuring the following properties in the `<IS_HOME>/repository/conf/deployment.toml` file.
0 commit comments