From 7182f0567872842464f7b8e87f7a4be778593636 Mon Sep 17 00:00:00 2001 From: Sachin-Mamoru Date: Sat, 25 Jan 2025 22:58:20 +0530 Subject: [PATCH 1/2] add x509 authenticator configuration related resource types to IDN_CONFIG_TYPE table --- .../resources/dbscripts/db2.sql | 8 +++++--- .../resources/dbscripts/h2.sql | 4 +++- .../resources/dbscripts/mssql.sql | 4 +++- .../resources/dbscripts/mysql-cluster.sql | 4 +++- .../resources/dbscripts/mysql.sql | 4 +++- .../resources/dbscripts/oracle.sql | 4 ++++ .../resources/dbscripts/oracle_rac.sql | 4 ++++ .../resources/dbscripts/postgresql.sql | 4 +++- 8 files changed, 28 insertions(+), 8 deletions(-) diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql index 053cceefb6ed..91750e97201b 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql @@ -1483,8 +1483,8 @@ CREATE TABLE IDN_OAUTH2_CIBA_REQUEST_SCOPES ( FOREIGN KEY (AUTH_CODE_KEY) REFERENCES IDN_OAUTH2_CIBA_AUTH_CODE(AUTH_CODE_KEY) ON DELETE CASCADE, PRIMARY KEY (ID)) / - - + + CREATE TABLE IDN_FED_AUTH_SESSION_MAPPING ( ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1), IDP_SESSION_ID VARCHAR(255) NOT NULL, @@ -1524,7 +1524,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.') +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.') / CREATE TABLE IDN_CONFIG_RESOURCE ( diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql index 46a6f8be9eea..7402d3d6ecc9 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql @@ -985,7 +985,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'); +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.'); CREATE TABLE IF NOT EXISTS IDN_CONFIG_RESOURCE ( ID VARCHAR(255) NOT NULL, diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql index 14ef7b8d2e62..fa0cc93a1468 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql @@ -1093,7 +1093,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'); +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.'); IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_CONFIG_RESOURCE]') AND TYPE IN (N'U')) diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql index f2918287c079..276a32c81cad 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql @@ -1148,7 +1148,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'); +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.'); CREATE TABLE IF NOT EXISTS IDN_CONFIG_RESOURCE ( ID VARCHAR(255) NOT NULL, diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql index a48087a1f2be..a7e6ab5b2e76 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql @@ -1014,7 +1014,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'); +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.'); CREATE TABLE IF NOT EXISTS IDN_CONFIG_RESOURCE ( ID VARCHAR(255) NOT NULL, diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql index 514598f11fce..3ddba15cb9f3 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql @@ -1698,6 +1698,10 @@ INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.') INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.') +INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.') +INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.') SELECT 1 FROM dual / diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql index 89629825cea2..98fc71a98973 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql @@ -1547,6 +1547,10 @@ INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.') INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.') +INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.') +INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.') SELECT 1 FROM dual / CREATE TABLE IDN_CONFIG_RESOURCE ( diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/postgresql.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/postgresql.sql index 6a23eefa8c02..8119f77acfb4 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/postgresql.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/postgresql.sql @@ -1210,7 +1210,9 @@ INSERT INTO IDN_CONFIG_TYPE (ID, NAME, DESCRIPTION) VALUES ('1fc809a0-dc0d-4cb2-82f3-58934d389236', 'CUSTOM_TEXT', 'A resource type to keep the tenant custom text preferences.'), ('c385a42a-5697-4604-b49a-62456621e926', 'DCR_CONFIGURATION', 'A resource type to keep the DCR configurations.'), ('3e5b1f91-72d8-4fbc-94d1-1b9a4f8c3b07', 'IMPERSONATION_CONFIGURATION', 'A resource type to keep the tenant impersonation preferences.'), -('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'); +('a731af34-f96a-4069-812d-30dc3b713a28', 'response-max-limit-configurations', 'A resource type to max limit configurations for API response.'), +('91116e95-ca63-4787-be2d-de13d04d1b55', 'X509_VALIDATOR', 'A resource type to keep the x509 validators.'), +('a17952b9-0942-4669-8529-479ca481146b', 'X509_REVOCATION_VALIDATION_CA', 'A resource type to keep the x509 revocation validation certificate authorities.'); DROP TABLE IF EXISTS IDN_CONFIG_RESOURCE; CREATE TABLE IDN_CONFIG_RESOURCE ( From 24077f4c3d7d1b77c825b88096921d560c044816 Mon Sep 17 00:00:00 2001 From: Sachin Mamoru <59449070+Sachin-Mamoru@users.noreply.github.com> Date: Sat, 25 Jan 2025 23:02:32 +0530 Subject: [PATCH 2/2] Update db2.sql --- .../resources/dbscripts/db2.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql index 91750e97201b..42317ed97865 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql @@ -1483,8 +1483,8 @@ CREATE TABLE IDN_OAUTH2_CIBA_REQUEST_SCOPES ( FOREIGN KEY (AUTH_CODE_KEY) REFERENCES IDN_OAUTH2_CIBA_AUTH_CODE(AUTH_CODE_KEY) ON DELETE CASCADE, PRIMARY KEY (ID)) / - - + + CREATE TABLE IDN_FED_AUTH_SESSION_MAPPING ( ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1), IDP_SESSION_ID VARCHAR(255) NOT NULL,