|
|
@ -1,12 +1,11 @@
|
|
|
|
-- Create Oracle New User and Connect
|
|
|
|
-- Create Oracle New User and Connect
|
|
|
|
--------------------------------------
|
|
|
|
--------------------------------------
|
|
|
|
-- CREATE USER apimuser IDENTIFIED BY wso2;
|
|
|
|
-- CREATE USER apimuser IDENTIFIED BY wso2;
|
|
|
|
-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION;
|
|
|
|
-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION;
|
|
|
|
-- CONNECT apimuser/wso2
|
|
|
|
-- CONNECT apimuser/wso2
|
|
|
|
--
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
|
|
-- Start of IDN Tables --
|
|
|
|
-- Start of IDN Tables --
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_BASE_TABLE (
|
|
|
|
CREATE TABLE IDN_BASE_TABLE (
|
|
|
|
PRODUCT_NAME VARCHAR2 (20),
|
|
|
|
PRODUCT_NAME VARCHAR2 (20),
|
|
|
|
PRIMARY KEY (PRODUCT_NAME))
|
|
|
|
PRIMARY KEY (PRODUCT_NAME))
|
|
|
@ -16,7 +15,7 @@ INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server')
|
|
|
|
CREATE TABLE IDN_OAUTH_CONSUMER_APPS (
|
|
|
|
CREATE TABLE IDN_OAUTH_CONSUMER_APPS (
|
|
|
|
ID INTEGER,
|
|
|
|
ID INTEGER,
|
|
|
|
CONSUMER_KEY VARCHAR2 (255),
|
|
|
|
CONSUMER_KEY VARCHAR2 (255),
|
|
|
|
CONSUMER_SECRET VARCHAR2 (512),
|
|
|
|
CONSUMER_SECRET VARCHAR2 (2048),
|
|
|
|
USERNAME VARCHAR2 (255),
|
|
|
|
USERNAME VARCHAR2 (255),
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
USER_DOMAIN VARCHAR(50),
|
|
|
|
USER_DOMAIN VARCHAR(50),
|
|
|
@ -26,9 +25,20 @@ CREATE TABLE IDN_OAUTH_CONSUMER_APPS (
|
|
|
|
GRANT_TYPES VARCHAR (1024),
|
|
|
|
GRANT_TYPES VARCHAR (1024),
|
|
|
|
PKCE_MANDATORY CHAR(1) DEFAULT '0',
|
|
|
|
PKCE_MANDATORY CHAR(1) DEFAULT '0',
|
|
|
|
PKCE_SUPPORT_PLAIN CHAR(1) DEFAULT '0',
|
|
|
|
PKCE_SUPPORT_PLAIN CHAR(1) DEFAULT '0',
|
|
|
|
|
|
|
|
APP_STATE VARCHAR (25) DEFAULT 'ACTIVE',
|
|
|
|
|
|
|
|
USER_ACCESS_TOKEN_EXPIRE_TIME NUMBER(19) DEFAULT 3600000,
|
|
|
|
|
|
|
|
APP_ACCESS_TOKEN_EXPIRE_TIME NUMBER(19) DEFAULT 3600000,
|
|
|
|
|
|
|
|
REFRESH_TOKEN_EXPIRE_TIME NUMBER(19) DEFAULT 84600000,
|
|
|
|
CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY),
|
|
|
|
CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY),
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OAUTH2_SCOPE_VALIDATORS (
|
|
|
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
SCOPE_VALIDATOR VARCHAR (128) NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (APP_ID,SCOPE_VALIDATOR),
|
|
|
|
|
|
|
|
FOREIGN KEY (APP_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
CREATE SEQUENCE IDN_OAUTH_CONSUMER_APPS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
CREATE SEQUENCE IDN_OAUTH_CONSUMER_APPS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OAUTH_CONSUMER_APPS_TRIG
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OAUTH_CONSUMER_APPS_TRIG
|
|
|
@ -65,8 +75,8 @@ CREATE TABLE IDN_OAUTH1A_ACCESS_TOKEN (
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN (
|
|
|
|
CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN (
|
|
|
|
TOKEN_ID VARCHAR (255),
|
|
|
|
TOKEN_ID VARCHAR (255),
|
|
|
|
ACCESS_TOKEN VARCHAR2 (255),
|
|
|
|
ACCESS_TOKEN VARCHAR2 (2048),
|
|
|
|
REFRESH_TOKEN VARCHAR2 (255),
|
|
|
|
REFRESH_TOKEN VARCHAR2 (2048),
|
|
|
|
CONSUMER_KEY_ID INTEGER,
|
|
|
|
CONSUMER_KEY_ID INTEGER,
|
|
|
|
AUTHZ_USER VARCHAR2 (100),
|
|
|
|
AUTHZ_USER VARCHAR2 (100),
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
@ -81,6 +91,8 @@ CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN (
|
|
|
|
TOKEN_STATE VARCHAR2 (25) DEFAULT 'ACTIVE',
|
|
|
|
TOKEN_STATE VARCHAR2 (25) DEFAULT 'ACTIVE',
|
|
|
|
TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE',
|
|
|
|
TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE',
|
|
|
|
SUBJECT_IDENTIFIER VARCHAR(255),
|
|
|
|
SUBJECT_IDENTIFIER VARCHAR(255),
|
|
|
|
|
|
|
|
ACCESS_TOKEN_HASH VARCHAR2 (512),
|
|
|
|
|
|
|
|
REFRESH_TOKEN_HASH VARCHAR2 (512),
|
|
|
|
PRIMARY KEY (TOKEN_ID),
|
|
|
|
PRIMARY KEY (TOKEN_ID),
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE,
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE,
|
|
|
|
CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TOKEN_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH,
|
|
|
|
CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TOKEN_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH,
|
|
|
@ -88,14 +100,16 @@ CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN (
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED)
|
|
|
|
CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE INDEX IDX_ATH ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN_HASH)
|
|
|
|
|
|
|
|
/
|
|
|
|
CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE)
|
|
|
|
CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE (
|
|
|
|
CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE (
|
|
|
|
CODE_ID VARCHAR (255),
|
|
|
|
CODE_ID VARCHAR (255),
|
|
|
|
AUTHORIZATION_CODE VARCHAR2 (512),
|
|
|
|
AUTHORIZATION_CODE VARCHAR2 (2048),
|
|
|
|
CONSUMER_KEY_ID INTEGER,
|
|
|
|
CONSUMER_KEY_ID INTEGER,
|
|
|
|
CALLBACK_URL VARCHAR2 (1024),
|
|
|
|
CALLBACK_URL VARCHAR2 (1024),
|
|
|
|
SCOPE VARCHAR2(2048),
|
|
|
|
SCOPE VARCHAR2(4096),
|
|
|
|
AUTHZ_USER VARCHAR2 (100),
|
|
|
|
AUTHZ_USER VARCHAR2 (100),
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
USER_DOMAIN VARCHAR2 (50),
|
|
|
|
USER_DOMAIN VARCHAR2 (50),
|
|
|
@ -106,9 +120,12 @@ CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE (
|
|
|
|
SUBJECT_IDENTIFIER VARCHAR(255),
|
|
|
|
SUBJECT_IDENTIFIER VARCHAR(255),
|
|
|
|
PKCE_CODE_CHALLENGE VARCHAR (255),
|
|
|
|
PKCE_CODE_CHALLENGE VARCHAR (255),
|
|
|
|
PKCE_CODE_CHALLENGE_METHOD VARCHAR(128),
|
|
|
|
PKCE_CODE_CHALLENGE_METHOD VARCHAR(128),
|
|
|
|
|
|
|
|
AUTHORIZATION_CODE_HASH VARCHAR2 (512),
|
|
|
|
PRIMARY KEY (CODE_ID),
|
|
|
|
PRIMARY KEY (CODE_ID),
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE)
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE INDEX IDX_AUTHORIZATION_CODE_HASH ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE_HASH,CONSUMER_KEY_ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE (
|
|
|
|
CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE (
|
|
|
|
TOKEN_ID VARCHAR2 (255),
|
|
|
|
TOKEN_ID VARCHAR2 (255),
|
|
|
|
TOKEN_SCOPE VARCHAR2 (60),
|
|
|
|
TOKEN_SCOPE VARCHAR2 (60),
|
|
|
@ -117,12 +134,11 @@ CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE (
|
|
|
|
FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE)
|
|
|
|
FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_OAUTH2_SCOPE (
|
|
|
|
CREATE TABLE IDN_OAUTH2_SCOPE (
|
|
|
|
SCOPE_ID INTEGER,
|
|
|
|
SCOPE_ID INTEGER NOT NULL,
|
|
|
|
SCOPE_KEY VARCHAR2 (100) NOT NULL,
|
|
|
|
NAME VARCHAR2(255) NOT NULL,
|
|
|
|
NAME VARCHAR2 (255) NULL,
|
|
|
|
DISPLAY_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
DESCRIPTION VARCHAR2 (512) NULL,
|
|
|
|
DESCRIPTION VARCHAR2(512),
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
TENANT_ID INTEGER DEFAULT -1 NOT NULL,
|
|
|
|
ROLES VARCHAR2 (500) NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (SCOPE_ID))
|
|
|
|
PRIMARY KEY (SCOPE_ID))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE SEQUENCE IDN_OAUTH2_SCOPE_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
CREATE SEQUENCE IDN_OAUTH2_SCOPE_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
@ -136,6 +152,11 @@ CREATE OR REPLACE TRIGGER IDN_OAUTH2_SCOPE_TRIGGER
|
|
|
|
SELECT IDN_OAUTH2_SCOPE_SEQUENCE.nextval INTO :NEW.SCOPE_ID FROM dual;
|
|
|
|
SELECT IDN_OAUTH2_SCOPE_SEQUENCE.nextval INTO :NEW.SCOPE_ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OAUTH2_SCOPE_BINDING (
|
|
|
|
|
|
|
|
SCOPE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
SCOPE_BINDING VARCHAR2(255),
|
|
|
|
|
|
|
|
FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE)
|
|
|
|
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE (
|
|
|
|
CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE (
|
|
|
|
RESOURCE_PATH VARCHAR2 (255) NOT NULL,
|
|
|
|
RESOURCE_PATH VARCHAR2 (255) NOT NULL,
|
|
|
|
SCOPE_ID INTEGER NOT NULL,
|
|
|
|
SCOPE_ID INTEGER NOT NULL,
|
|
|
@ -214,7 +235,7 @@ CREATE TABLE IDN_IDENTITY_USER_DATA (
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
DATA_KEY VARCHAR(255) NOT NULL,
|
|
|
|
DATA_KEY VARCHAR(255) NOT NULL,
|
|
|
|
DATA_VALUE VARCHAR(255),
|
|
|
|
DATA_VALUE VARCHAR(2048),
|
|
|
|
PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY))
|
|
|
|
PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE IDN_IDENTITY_META_DATA (
|
|
|
|
CREATE TABLE IDN_IDENTITY_META_DATA (
|
|
|
@ -259,6 +280,7 @@ CREATE TABLE SP_APP (
|
|
|
|
IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0',
|
|
|
|
IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0',
|
|
|
|
IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1',
|
|
|
|
IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1',
|
|
|
|
IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1',
|
|
|
|
IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1',
|
|
|
|
|
|
|
|
ENABLE_AUTHORIZATION CHAR(1) DEFAULT '0',
|
|
|
|
SUBJECT_CLAIM_URI VARCHAR (512),
|
|
|
|
SUBJECT_CLAIM_URI VARCHAR (512),
|
|
|
|
IS_SAAS_APP CHAR(1) DEFAULT '0',
|
|
|
|
IS_SAAS_APP CHAR(1) DEFAULT '0',
|
|
|
|
IS_DUMB_MODE CHAR(1) DEFAULT '0',
|
|
|
|
IS_DUMB_MODE CHAR(1) DEFAULT '0',
|
|
|
@ -307,6 +329,7 @@ CREATE TABLE SP_INBOUND_AUTH (
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
INBOUND_AUTH_KEY VARCHAR (255),
|
|
|
|
INBOUND_AUTH_KEY VARCHAR (255),
|
|
|
|
INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL,
|
|
|
|
INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
INBOUND_CONFIG_TYPE VARCHAR (255) NOT NULL,
|
|
|
|
PROP_NAME VARCHAR (255),
|
|
|
|
PROP_NAME VARCHAR (255),
|
|
|
|
PROP_VALUE VARCHAR (1024) ,
|
|
|
|
PROP_VALUE VARCHAR (1024) ,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
@ -345,7 +368,7 @@ CREATE OR REPLACE TRIGGER SP_AUTH_STEP_TRIG
|
|
|
|
SELECT SP_AUTH_STEP_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
SELECT SP_AUTH_STEP_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONST_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE SP_FEDERATED_IDP (
|
|
|
|
CREATE TABLE SP_FEDERATED_IDP (
|
|
|
|
ID INTEGER NOT NULL,
|
|
|
|
ID INTEGER NOT NULL,
|
|
|
@ -362,6 +385,7 @@ CREATE TABLE SP_CLAIM_MAPPING (
|
|
|
|
SP_CLAIM VARCHAR (512) NOT NULL ,
|
|
|
|
SP_CLAIM VARCHAR (512) NOT NULL ,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
|
|
|
IS_MANDATORY VARCHAR(128) DEFAULT '0',
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
/
|
|
|
|
/
|
|
|
@ -426,7 +450,8 @@ CREATE TABLE SP_PROVISIONING_CONNECTOR (
|
|
|
|
CONNECTOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
CONNECTOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
IS_JIT_ENABLED CHAR(1) DEFAULT '0',
|
|
|
|
IS_JIT_ENABLED CHAR(1) DEFAULT '0',
|
|
|
|
BLOCKING CHAR(1) DEFAULT '0',
|
|
|
|
BLOCKING CHAR(1) DEFAULT '0',
|
|
|
|
|
|
|
|
RULE_ENABLED CHAR(1) DEFAULT '0' NOT NULL,
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
@ -440,7 +465,30 @@ CREATE OR REPLACE TRIGGER SP_PROV_CONNECTOR_TRIG
|
|
|
|
SELECT SP_PROV_CONNECTOR_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
SELECT SP_PROV_CONNECTOR_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONST FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE SP_AUTH_SCRIPT (
|
|
|
|
|
|
|
|
ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TYPE VARCHAR(255) NOT NULL,
|
|
|
|
|
|
|
|
CONTENT BLOB DEFAULT NULL,
|
|
|
|
|
|
|
|
IS_ENABLED CHAR(1) DEFAULT '0',
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE SP_AUTH_SCRIPT_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER SP_AUTH_SCRIPT_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON SP_AUTH_SCRIPT
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT SP_AUTH_SCRIPT_SEQ.nextval
|
|
|
|
|
|
|
|
INTO :NEW.ID
|
|
|
|
|
|
|
|
FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE TABLE IDP (
|
|
|
|
CREATE TABLE IDP (
|
|
|
|
ID INTEGER,
|
|
|
|
ID INTEGER,
|
|
|
@ -488,8 +536,6 @@ CREATE TABLE IDP_ROLE (
|
|
|
|
/
|
|
|
|
/
|
|
|
|
CREATE SEQUENCE IDP_ROLE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
CREATE SEQUENCE IDP_ROLE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
/
|
|
|
|
/
|
|
|
|
INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDP_ROLE_TRIG
|
|
|
|
CREATE OR REPLACE TRIGGER IDP_ROLE_TRIG
|
|
|
|
BEFORE INSERT
|
|
|
|
BEFORE INSERT
|
|
|
|
ON IDP_ROLE
|
|
|
|
ON IDP_ROLE
|
|
|
@ -584,12 +630,6 @@ CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_TRIG
|
|
|
|
SELECT IDP_AUTHENTICATOR_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
SELECT IDP_AUTHENTICATOR_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDP_METADATA (
|
|
|
|
CREATE TABLE IDP_METADATA (
|
|
|
|
ID INTEGER,
|
|
|
|
ID INTEGER,
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
IDP_ID INTEGER,
|
|
|
@ -612,11 +652,6 @@ CREATE OR REPLACE TRIGGER IDP_METADATA_TRIG
|
|
|
|
SELECT IDP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
SELECT IDP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDP_AUTHENTICATOR_PROPERTY (
|
|
|
|
CREATE TABLE IDP_AUTHENTICATOR_PROPERTY (
|
|
|
|
ID INTEGER,
|
|
|
|
ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
@ -639,10 +674,6 @@ CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_PROP_TRIG
|
|
|
|
SELECT IDP_AUTHENTICATOR_PROP_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
SELECT IDP_AUTHENTICATOR_PROP_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDP_PROVISIONING_CONFIG (
|
|
|
|
CREATE TABLE IDP_PROVISIONING_CONFIG (
|
|
|
|
ID INTEGER,
|
|
|
|
ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
TENANT_ID INTEGER,
|
|
|
@ -650,6 +681,7 @@ CREATE TABLE IDP_PROVISIONING_CONFIG (
|
|
|
|
PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL,
|
|
|
|
PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL,
|
|
|
|
IS_ENABLED CHAR (1) DEFAULT '0',
|
|
|
|
IS_ENABLED CHAR (1) DEFAULT '0',
|
|
|
|
IS_BLOCKING CHAR (1) DEFAULT '0',
|
|
|
|
IS_BLOCKING CHAR (1) DEFAULT '0',
|
|
|
|
|
|
|
|
IS_RULES_ENABLED CHAR (1) DEFAULT '0',
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE),
|
|
|
|
UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE),
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
@ -720,7 +752,7 @@ CREATE TABLE IDP_LOCAL_CLAIM (
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
CLAIM_URI VARCHAR(255) NOT NULL,
|
|
|
|
CLAIM_URI VARCHAR(255) NOT NULL,
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI),
|
|
|
|
UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI),
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
@ -795,7 +827,7 @@ CREATE TABLE WF_BPS_PROFILE (
|
|
|
|
HOST_URL_MANAGER VARCHAR2(255),
|
|
|
|
HOST_URL_MANAGER VARCHAR2(255),
|
|
|
|
HOST_URL_WORKER VARCHAR2(255),
|
|
|
|
HOST_URL_WORKER VARCHAR2(255),
|
|
|
|
USERNAME VARCHAR2(45),
|
|
|
|
USERNAME VARCHAR2(45),
|
|
|
|
PASSWORD VARCHAR2(255),
|
|
|
|
PASSWORD VARCHAR2(1023),
|
|
|
|
CALLBACK_HOST VARCHAR2 (45),
|
|
|
|
CALLBACK_HOST VARCHAR2 (45),
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
PRIMARY KEY (PROFILE_NAME, TENANT_ID))
|
|
|
|
PRIMARY KEY (PROFILE_NAME, TENANT_ID))
|
|
|
@ -868,8 +900,472 @@ CREATE TABLE WF_WORKFLOW_REQUEST_RELATION(
|
|
|
|
FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE,
|
|
|
|
FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE,
|
|
|
|
FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE)
|
|
|
|
FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_RECOVERY_DATA (
|
|
|
|
|
|
|
|
USER_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
USER_DOMAIN VARCHAR2(127) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
|
|
|
CODE VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
SCENARIO VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
STEP VARCHAR2(127) NOT NULL,
|
|
|
|
|
|
|
|
TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
REMAINING_SETS VARCHAR2(2500) DEFAULT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
|
|
|
|
|
|
|
|
UNIQUE(CODE)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
USER_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
USER_DOMAIN VARCHAR2(127) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
|
|
|
SALT_VALUE VARCHAR2(255),
|
|
|
|
|
|
|
|
HASH VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY(ID),
|
|
|
|
|
|
|
|
UNIQUE (USER_NAME,USER_DOMAIN,TENANT_ID,SALT_VALUE,HASH)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_PASSWORD_HISTORY_DATA_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_PASSWORD_HISTORY_DATA_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_PASSWORD_HISTORY_DATA
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_PASSWORD_HISTORY_DATA_SEQ.nextval
|
|
|
|
|
|
|
|
INTO :NEW.ID
|
|
|
|
|
|
|
|
FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CLAIM_DIALECT (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
DIALECT_URI VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
CONSTRAINT DIALECT_URI_CONSTRAINT UNIQUE (DIALECT_URI, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CLAIM_DIALECT_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CLAIM_DIALECT_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CLAIM_DIALECT
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CLAIM_DIALECT_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CLAIM (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
DIALECT_ID INTEGER,
|
|
|
|
|
|
|
|
CLAIM_URI VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (DIALECT_ID) REFERENCES IDN_CLAIM_DIALECT(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
CONSTRAINT CLAIM_URI_CONSTRAINT UNIQUE (DIALECT_ID, CLAIM_URI, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CLAIM_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CLAIM_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CLAIM
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CLAIM_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CLAIM_MAPPED_ATTRIBUTE (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
LOCAL_CLAIM_ID INTEGER,
|
|
|
|
|
|
|
|
USER_STORE_DOMAIN_NAME VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
ATTRIBUTE_NAME VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
CONSTRAINT USER_STORE_DOMAIN_CONSTRAINT UNIQUE (LOCAL_CLAIM_ID, USER_STORE_DOMAIN_NAME, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CLAIM_MAPPED_ATTRIBUTE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CLAIM_MAPPED_ATTR_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CLAIM_MAPPED_ATTRIBUTE
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CLAIM_MAPPED_ATTRIBUTE_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CLAIM_PROPERTY (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
LOCAL_CLAIM_ID INTEGER,
|
|
|
|
|
|
|
|
PROPERTY_NAME VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
PROPERTY_VALUE VARCHAR (255) NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
CONSTRAINT PROPERTY_NAME_CONSTRAINT UNIQUE (LOCAL_CLAIM_ID, PROPERTY_NAME, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CLAIM_PROPERTY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CLAIM_PROPERTY_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CLAIM_PROPERTY
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CLAIM_PROPERTY_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CLAIM_MAPPING (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
EXT_CLAIM_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
MAPPED_LOCAL_CLAIM_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (EXT_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
FOREIGN KEY (MAPPED_LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
CONSTRAINT EXT_TO_LOC_MAPPING_CONSTRN UNIQUE (EXT_CLAIM_ID, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CLAIM_MAPPING_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CLAIM_MAPPING
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CLAIM_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_SAML2_ASSERTION_STORE (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
SAML2_ID VARCHAR(255) ,
|
|
|
|
|
|
|
|
SAML2_ISSUER VARCHAR(255) ,
|
|
|
|
|
|
|
|
SAML2_SUBJECT VARCHAR(255) ,
|
|
|
|
|
|
|
|
SAML2_SESSION_INDEX VARCHAR(255) ,
|
|
|
|
|
|
|
|
SAML2_AUTHN_CONTEXT_CLASS_REF VARCHAR(255) ,
|
|
|
|
|
|
|
|
SAML2_ASSERTION VARCHAR2(4000) ,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_SAML2_ASSERTION_STORE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_SAML2_ASSERTION_STORE_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_SAML2_ASSERTION_STORE
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_SAML2_ASSERTION_STORE_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OIDC_JTI (
|
|
|
|
|
|
|
|
JWT_ID VARCHAR(255) NOT NULL,
|
|
|
|
|
|
|
|
EXP_TIME TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (JWT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OIDC_PROPERTY (
|
|
|
|
|
|
|
|
ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
|
|
|
CONSUMER_KEY VARCHAR(255) ,
|
|
|
|
|
|
|
|
PROPERTY_KEY VARCHAR(255) NOT NULL,
|
|
|
|
|
|
|
|
PROPERTY_VALUE VARCHAR(2047) ,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (CONSUMER_KEY) REFERENCES IDN_OAUTH_CONSUMER_APPS(CONSUMER_KEY) ON DELETE CASCADE)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_OIDC_PROPERTY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OIDC_PROPERTY_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_OIDC_PROPERTY
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_OIDC_PROPERTY_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OIDC_REQ_OBJECT_REFERENCE (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
CONSUMER_KEY_ID INTEGER ,
|
|
|
|
|
|
|
|
CODE_ID VARCHAR(255) ,
|
|
|
|
|
|
|
|
TOKEN_ID VARCHAR(255) ,
|
|
|
|
|
|
|
|
SESSION_DATA_KEY VARCHAR(255),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE,
|
|
|
|
|
|
|
|
FOREIGN KEY (CODE_ID) REFERENCES IDN_OAUTH2_AUTHORIZATION_CODE(CODE_ID) ON DELETE CASCADE)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_OIDC_REQ_OBJECT_REF_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OIDC_REQ_OBJ_REF_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_OIDC_REQ_OBJECT_REFERENCE
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_OIDC_REQ_OBJECT_REF_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OIDC_REQ_OBJECT_CLAIMS (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
REQ_OBJECT_ID INTEGER ,
|
|
|
|
|
|
|
|
CLAIM_ATTRIBUTE VARCHAR(255) ,
|
|
|
|
|
|
|
|
ESSENTIAL CHAR(1) DEFAULT '0',
|
|
|
|
|
|
|
|
VALUE VARCHAR(255),
|
|
|
|
|
|
|
|
IS_USERINFO CHAR(1) DEFAULT '0',
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (REQ_OBJECT_ID) REFERENCES IDN_OIDC_REQ_OBJECT_REFERENCE(ID) ON DELETE CASCADE)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_OIDC_REQ_OBJ_CLAIMS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OIDC_REQ_OBJ_CLAIMS_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_OIDC_REQ_OBJECT_CLAIMS
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_OIDC_REQ_OBJ_CLAIMS_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_OIDC_REQ_OBJ_CLAIM_VALUES (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
REQ_OBJECT_CLAIMS_ID INTEGER,
|
|
|
|
|
|
|
|
CLAIM_VALUES VARCHAR(255),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
FOREIGN KEY (REQ_OBJECT_CLAIMS_ID) REFERENCES IDN_OIDC_REQ_OBJECT_CLAIMS(ID) ON DELETE CASCADE)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_OIDC_REQ_OBJ_CLM_VAL_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OIDC_REQ_OBJ_CLM_VAL_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_OIDC_REQ_OBJ_CLAIM_VALUES
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_OIDC_REQ_OBJ_CLM_VAL_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDN_CERTIFICATE (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
NAME VARCHAR(100),
|
|
|
|
|
|
|
|
CERTIFICATE_IN_PEM BLOB,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
|
|
|
PRIMARY KEY(ID),
|
|
|
|
|
|
|
|
CONSTRAINT CERTIFICATE_UNIQUE_KEY UNIQUE (NAME, TENANT_ID))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE IDN_CERTIFICATE_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_CERTIFICATE_TRIGGER
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON IDN_CERTIFICATE
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT IDN_CERTIFICATE_SEQUENCE.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
-- End of IDENTITY Tables--
|
|
|
|
-- End of IDENTITY Tables--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Start of CONSENT-MGT Tables --
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE CM_PII_CATEGORY (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
DESCRIPTION VARCHAR2(1023),
|
|
|
|
|
|
|
|
DISPLAY_NAME VARCHAR(255),
|
|
|
|
|
|
|
|
IS_SENSITIVE INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
|
|
|
CONSTRAINT PII_CATEGORY_CONSTRAINT UNIQUE (NAME, TENANT_ID),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE CM_PII_CATEGORY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER CM_PII_CATEGORY_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON CM_PII_CATEGORY
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT CM_PII_CATEGORY_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_RECEIPT (
|
|
|
|
|
|
|
|
CONSENT_RECEIPT_ID VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
VERSION VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
JURISDICTION VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
CONSENT_TIMESTAMP TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
COLLECTION_METHOD VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
LANGUAGE VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
PII_PRINCIPAL_ID VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
PRINCIPAL_TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
|
|
|
POLICY_URL VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
STATE VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
PII_CONTROLLER VARCHAR2(2048) NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (CONSENT_RECEIPT_ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_PURPOSE (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
DESCRIPTION VARCHAR2(1023),
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
|
|
|
CONSTRAINT PURPOSE_CONSTRAINT UNIQUE (NAME, TENANT_ID),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE CM_PURPOSE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER CM_PURPOSE_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON CM_PURPOSE
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT CM_PURPOSE_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_PURPOSE_CATEGORY (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
DESCRIPTION VARCHAR2(1023),
|
|
|
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
|
|
|
CONSTRAINT PURPOSE_CATEGORY_CONSTRAINT UNIQUE (NAME, TENANT_ID),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE CM_PURPOSE_CATEGORY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER CM_PURPOSE_CATEGORY_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON CM_PURPOSE_CATEGORY
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT CM_PURPOSE_CATEGORY_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_RECEIPT_SP_ASSOC (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
CONSENT_RECEIPT_ID VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
SP_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
SP_DISPLAY_NAME VARCHAR(255),
|
|
|
|
|
|
|
|
SP_DESCRIPTION VARCHAR(255),
|
|
|
|
|
|
|
|
SP_TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
|
|
|
CONSTRAINT RECEIPT_SP_ASSOC_CONSTRAINT UNIQUE (CONSENT_RECEIPT_ID, SP_NAME, SP_TENANT_ID),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE CM_RECEIPT_SP_ASSOC_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER CM_RECEIPT_SP_ASSOC_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON CM_RECEIPT_SP_ASSOC
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT CM_RECEIPT_SP_ASSOC_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_SP_PURPOSE_ASSOC (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
RECEIPT_SP_ASSOC INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PURPOSE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
CONSENT_TYPE VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
IS_PRIMARY_PURPOSE INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TERMINATION VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
THIRD_PARTY_DISCLOSURE INTEGER NOT NULL,
|
|
|
|
|
|
|
|
THIRD_PARTY_NAME VARCHAR2(255),
|
|
|
|
|
|
|
|
CONSTRAINT SP_PURPOSE_ASSOC UNIQUE (RECEIPT_SP_ASSOC, PURPOSE_ID),
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE SEQUENCE CM_SP_PURPOSE_ASSOC_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER CM_SP_PURPOSE_ASSOC_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON CM_SP_PURPOSE_ASSOC
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT CM_SP_PURPOSE_ASSOC_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC (
|
|
|
|
|
|
|
|
SP_PURPOSE_ASSOC_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PURPOSE_CATEGORY_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
CONSTRAINT SP_PUS_PS_CAT_ASSOC UNIQUE (SP_PURPOSE_ASSOC_ID,PURPOSE_CATEGORY_ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_PURPOSE_PII_CAT_ASSOC (
|
|
|
|
|
|
|
|
PURPOSE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
CM_PII_CATEGORY_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
CONSTRAINT PURPOSE_PII_CAT_ASSOC UNIQUE (PURPOSE_ID, CM_PII_CATEGORY_ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_SP_PURPOSE_PII_CAT_ASSOC (
|
|
|
|
|
|
|
|
SP_PURPOSE_ASSOC_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PII_CATEGORY_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
VALIDITY VARCHAR(1023),
|
|
|
|
|
|
|
|
CONSTRAINT SP_PURPOSE_PII_CATEGORY_ASSOC UNIQUE (SP_PURPOSE_ASSOC_ID, PII_CATEGORY_ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
CREATE TABLE CM_CONSENT_RECEIPT_PROPERTY (
|
|
|
|
|
|
|
|
CONSENT_RECEIPT_ID VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
|
|
|
VALUE VARCHAR2(1023) NOT NULL,
|
|
|
|
|
|
|
|
CONSTRAINT CONSENT_RECEIPT_PROPERTY UNIQUE (CONSENT_RECEIPT_ID, NAME)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_RECEIPT_SP_ASSOC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_RECEIPT_SP_ASSOC_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_ASSOC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk0 FOREIGN KEY (RECEIPT_SP_ASSOC) REFERENCES CM_RECEIPT_SP_ASSOC (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_ASSOC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk1 FOREIGN KEY (PURPOSE_ID) REFERENCES CM_PURPOSE (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk1 FOREIGN KEY (PURPOSE_CATEGORY_ID) REFERENCES CM_PURPOSE_CATEGORY (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk1 FOREIGN KEY (PII_CATEGORY_ID) REFERENCES CM_PII_CATEGORY (ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
ALTER TABLE CM_CONSENT_RECEIPT_PROPERTY
|
|
|
|
|
|
|
|
ADD CONSTRAINT CM_CONSENT_RECEIPT_PRT_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO CM_PURPOSE (NAME, DESCRIPTION, TENANT_ID) values ('DEFAULT', 'For core functionalities of the product', '-1234')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
INSERT INTO CM_PURPOSE_CATEGORY (NAME, DESCRIPTION, TENANT_ID) VALUES ('DEFAULT','For core functionalities of the product', '-1234')
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- End of CONSENT-MGT Tables --
|
|
|
|
|
|
|
|
|
|
|
|
-- Start of API-MGT Tables--
|
|
|
|
-- Start of API-MGT Tables--
|
|
|
|
CREATE TABLE AM_SUBSCRIBER (
|
|
|
|
CREATE TABLE AM_SUBSCRIBER (
|
|
|
|
SUBSCRIBER_ID INTEGER,
|
|
|
|
SUBSCRIBER_ID INTEGER,
|
|
|
@ -1048,7 +1544,7 @@ CREATE TABLE AM_APPLICATION_REGISTRATION (
|
|
|
|
WF_REF VARCHAR2(255) NOT NULL,
|
|
|
|
WF_REF VARCHAR2(255) NOT NULL,
|
|
|
|
APP_ID INTEGER,
|
|
|
|
APP_ID INTEGER,
|
|
|
|
TOKEN_TYPE VARCHAR2(30),
|
|
|
|
TOKEN_TYPE VARCHAR2(30),
|
|
|
|
TOKEN_SCOPE VARCHAR2(256) DEFAULT 'default',
|
|
|
|
TOKEN_SCOPE VARCHAR2(1500) DEFAULT 'default',
|
|
|
|
INPUTS VARCHAR2(1024),
|
|
|
|
INPUTS VARCHAR2(1024),
|
|
|
|
ALLOWED_DOMAINS VARCHAR2(256),
|
|
|
|
ALLOWED_DOMAINS VARCHAR2(256),
|
|
|
|
VALIDITY_PERIOD NUMBER(19),
|
|
|
|
VALIDITY_PERIOD NUMBER(19),
|
|
|
@ -1241,10 +1737,10 @@ CREATE OR REPLACE TRIGGER AM_EXTERNAL_STORES_TRIGGER
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_API_DEFAULT_VERSION (
|
|
|
|
CREATE TABLE AM_API_DEFAULT_VERSION (
|
|
|
|
DEFAULT_VERSION_ID NUMBER,
|
|
|
|
DEFAULT_VERSION_ID NUMBER,
|
|
|
|
API_NAME VARCHAR(256) NOT NULL ,
|
|
|
|
API_NAME VARCHAR(256) NOT NULL ,
|
|
|
|
API_PROVIDER VARCHAR(256) NOT NULL ,
|
|
|
|
API_PROVIDER VARCHAR(256) NOT NULL ,
|
|
|
|
DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
PRIMARY KEY (DEFAULT_VERSION_ID)
|
|
|
|
PRIMARY KEY (DEFAULT_VERSION_ID)
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -1267,7 +1763,7 @@ CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID)
|
|
|
|
CREATE TABLE AM_ALERT_TYPES (
|
|
|
|
CREATE TABLE AM_ALERT_TYPES (
|
|
|
|
ALERT_TYPE_ID INTEGER,
|
|
|
|
ALERT_TYPE_ID INTEGER,
|
|
|
|
ALERT_TYPE_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
ALERT_TYPE_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL,
|
|
|
|
PRIMARY KEY (ALERT_TYPE_ID))
|
|
|
|
PRIMARY KEY (ALERT_TYPE_ID))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
@ -1286,15 +1782,15 @@ CREATE OR REPLACE TRIGGER AM_ALERT_TYPES_TRIG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_ALERT_TYPES_VALUES (
|
|
|
|
CREATE TABLE AM_ALERT_TYPES_VALUES (
|
|
|
|
ALERT_TYPE_ID INTEGER,
|
|
|
|
ALERT_TYPE_ID INTEGER,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL ,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL ,
|
|
|
|
CONSTRAINT AM_ALERT_TYPES_VALUES_CONST UNIQUE (ALERT_TYPE_ID,USER_NAME,STAKE_HOLDER))
|
|
|
|
CONSTRAINT AM_ALERT_TYPES_VALUES_CONST UNIQUE (ALERT_TYPE_ID,USER_NAME,STAKE_HOLDER))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_ALERT_EMAILLIST (
|
|
|
|
CREATE TABLE AM_ALERT_EMAILLIST (
|
|
|
|
EMAIL_LIST_ID INTEGER,
|
|
|
|
EMAIL_LIST_ID INTEGER,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL ,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL ,
|
|
|
|
STAKE_HOLDER VARCHAR(100) NOT NULL ,
|
|
|
|
CONSTRAINT AM_ALERT_EMAILLIST_CONST UNIQUE (EMAIL_LIST_ID,USER_NAME,STAKE_HOLDER),
|
|
|
|
CONSTRAINT AM_ALERT_EMAILLIST_CONST UNIQUE (EMAIL_LIST_ID,USER_NAME,STAKE_HOLDER),
|
|
|
|
PRIMARY KEY (EMAIL_LIST_ID))
|
|
|
|
PRIMARY KEY (EMAIL_LIST_ID))
|
|
|
@ -1313,9 +1809,9 @@ CREATE OR REPLACE TRIGGER AM_ALERT_EMAILLIST_TRIG
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_ALERT_EMAILLIST_DETAILS (
|
|
|
|
CREATE TABLE AM_ALERT_EMAILLIST_DETAILS (
|
|
|
|
EMAIL_LIST_ID INTEGER,
|
|
|
|
EMAIL_LIST_ID INTEGER,
|
|
|
|
EMAIL VARCHAR(255),
|
|
|
|
EMAIL VARCHAR(255),
|
|
|
|
CONSTRAINT AM_ALERT_EMAIL_LIST_DET_CONST UNIQUE (EMAIL_LIST_ID,EMAIL))
|
|
|
|
CONSTRAINT AM_ALERT_EMAIL_LIST_DET_CONST UNIQUE (EMAIL_LIST_ID,EMAIL))
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
@ -1444,7 +1940,7 @@ CREATE TABLE AM_CONDITION_GROUP (
|
|
|
|
TIME_UNIT VARCHAR2(25) NOT NULL,
|
|
|
|
TIME_UNIT VARCHAR2(25) NOT NULL,
|
|
|
|
DESCRIPTION VARCHAR2(1024) DEFAULT NULL NULL,
|
|
|
|
DESCRIPTION VARCHAR2(1024) DEFAULT NULL NULL,
|
|
|
|
PRIMARY KEY (CONDITION_GROUP_ID),
|
|
|
|
PRIMARY KEY (CONDITION_GROUP_ID),
|
|
|
|
FOREIGN KEY (POLICY_ID) REFERENCES AM_API_THROTTLE_POLICY(POLICY_ID) ON DELETE CASCADE
|
|
|
|
FOREIGN KEY (POLICY_ID) REFERENCES AM_API_THROTTLE_POLICY(POLICY_ID) ON DELETE CASCADE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
@ -1486,7 +1982,7 @@ CREATE TABLE AM_HEADER_FIELD_CONDITION (
|
|
|
|
HEADER_FIELD_VALUE VARCHAR2(255) DEFAULT NULL,
|
|
|
|
HEADER_FIELD_VALUE VARCHAR2(255) DEFAULT NULL,
|
|
|
|
IS_HEADER_FIELD_MAPPING CHAR(1) DEFAULT 1,
|
|
|
|
IS_HEADER_FIELD_MAPPING CHAR(1) DEFAULT 1,
|
|
|
|
PRIMARY KEY (HEADER_FIELD_ID),
|
|
|
|
PRIMARY KEY (HEADER_FIELD_ID),
|
|
|
|
FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE
|
|
|
|
FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
@ -1507,7 +2003,7 @@ CREATE TABLE AM_JWT_CLAIM_CONDITION (
|
|
|
|
CLAIM_ATTRIB VARCHAR2(1024) DEFAULT NULL,
|
|
|
|
CLAIM_ATTRIB VARCHAR2(1024) DEFAULT NULL,
|
|
|
|
IS_CLAIM_MAPPING CHAR(1) DEFAULT 1,
|
|
|
|
IS_CLAIM_MAPPING CHAR(1) DEFAULT 1,
|
|
|
|
PRIMARY KEY (JWT_CLAIM_ID),
|
|
|
|
PRIMARY KEY (JWT_CLAIM_ID),
|
|
|
|
FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE
|
|
|
|
FOREIGN KEY (CONDITION_GROUP_ID) REFERENCES AM_CONDITION_GROUP(CONDITION_GROUP_ID) ON DELETE CASCADE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
@ -1594,13 +2090,13 @@ END;
|
|
|
|
CREATE TABLE AM_BLOCK_CONDITIONS (
|
|
|
|
CREATE TABLE AM_BLOCK_CONDITIONS (
|
|
|
|
CONDITION_ID INTEGER NOT NULL,
|
|
|
|
CONDITION_ID INTEGER NOT NULL,
|
|
|
|
TYPE varchar2(45) DEFAULT NULL,
|
|
|
|
TYPE varchar2(45) DEFAULT NULL,
|
|
|
|
VALUE varchar2(45) DEFAULT NULL,
|
|
|
|
VALUE varchar2(512) DEFAULT NULL,
|
|
|
|
ENABLED varchar2(45) DEFAULT NULL,
|
|
|
|
ENABLED varchar2(45) DEFAULT NULL,
|
|
|
|
DOMAIN varchar2(45) DEFAULT NULL,
|
|
|
|
DOMAIN varchar2(45) DEFAULT NULL,
|
|
|
|
UUID VARCHAR2(256),
|
|
|
|
UUID VARCHAR2(256),
|
|
|
|
PRIMARY KEY (CONDITION_ID),
|
|
|
|
PRIMARY KEY (CONDITION_ID),
|
|
|
|
UNIQUE (UUID)
|
|
|
|
UNIQUE (UUID)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
CREATE SEQUENCE AM_BLOCK_CONDITIONS_seq START WITH 1 INCREMENT BY 1
|
|
|
|
CREATE SEQUENCE AM_BLOCK_CONDITIONS_seq START WITH 1 INCREMENT BY 1
|
|
|
@ -1613,6 +2109,54 @@ BEGIN
|
|
|
|
END;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_CERTIFICATE_METADATA (
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
ALIAS VARCHAR2(45) NOT NULL,
|
|
|
|
|
|
|
|
END_POINT VARCHAR2(100) NOT NULL,
|
|
|
|
|
|
|
|
CONSTRAINT PK_ALIAS PRIMARY KEY (ALIAS),
|
|
|
|
|
|
|
|
CONSTRAINT END_POINT_CONSTRAINT UNIQUE (END_POINT)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_APPLICATION_GROUP_MAPPING (
|
|
|
|
|
|
|
|
APPLICATION_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
GROUP_ID VARCHAR2(512) NOT NULL,
|
|
|
|
|
|
|
|
TENANT VARCHAR2 (255),
|
|
|
|
|
|
|
|
PRIMARY KEY (APPLICATION_ID,GROUP_ID,TENANT),
|
|
|
|
|
|
|
|
FOREIGN KEY (APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_USAGE_UPLOADED_FILES (
|
|
|
|
|
|
|
|
TENANT_DOMAIN VARCHAR2 (255) NOT NULL,
|
|
|
|
|
|
|
|
FILE_NAME VARCHAR2 (255) NOT NULL,
|
|
|
|
|
|
|
|
FILE_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
|
|
|
FILE_PROCESSED INTEGER DEFAULT 0,
|
|
|
|
|
|
|
|
FILE_CONTENT BLOB DEFAULT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (TENANT_DOMAIN, FILE_NAME, FILE_TIMESTAMP))
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_API_LC_PUBLISH_EVENTS (
|
|
|
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
|
|
|
TENANT_DOMAIN VARCHAR2 (500) NOT NULL,
|
|
|
|
|
|
|
|
API_ID VARCHAR2 (500) NOT NULL,
|
|
|
|
|
|
|
|
EVENT_TIME TIMESTAMP NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE SEQUENCE AM_API_LC_PUBLISH_EVENTS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER AM_API_LC_PUBLISH_EVENTS_TRIG
|
|
|
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
|
|
|
ON AM_API_LC_PUBLISH_EVENTS
|
|
|
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
SELECT AM_API_LC_PUBLISH_EVENTS_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
|
|
|
END;
|
|
|
|
|
|
|
|
/
|
|
|
|
-- End of API-MGT Tables --
|
|
|
|
-- End of API-MGT Tables --
|
|
|
|
|
|
|
|
|
|
|
|
--permance indexes start--
|
|
|
|
--permance indexes start--
|
|
|
@ -1644,4 +2188,3 @@ create index IDX_APA_QT on AM_POLICY_APPLICATION (QUOTA_TYPE)
|
|
|
|
create index IDX_AA_AT_CB on AM_APPLICATION (APPLICATION_TIER,CREATED_BY)
|
|
|
|
create index IDX_AA_AT_CB on AM_APPLICATION (APPLICATION_TIER,CREATED_BY)
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-- Performance indexes end--
|
|
|
|
-- Performance indexes end--
|
|
|
|
|
|
|
|
|
|
|
|