|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
-- Create Oracle New User and Connect
|
|
|
|
|
--------------------------------------
|
|
|
|
|
-- CREATE USER apimuser IDENTIFIED BY wso2;
|
|
|
|
|
-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION;
|
|
|
|
|
-- CREATE USER apimuser IDENTIFIED BY wso2;
|
|
|
|
|
-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION;
|
|
|
|
|
-- CONNECT apimuser/wso2
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
@ -77,7 +77,8 @@ CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN (
|
|
|
|
|
TOKEN_SCOPE_HASH VARCHAR2 (32),
|
|
|
|
|
TOKEN_STATE VARCHAR2 (25) DEFAULT 'ACTIVE',
|
|
|
|
|
TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE',
|
|
|
|
|
PRIMARY KEY (TOKEN_ID),
|
|
|
|
|
SUBJECT_IDENTIFIER VARCHAR2(255),
|
|
|
|
|
PRIMARY KEY (TOKEN_ID),
|
|
|
|
|
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,
|
|
|
|
|
TOKEN_STATE,TOKEN_STATE_ID))
|
|
|
|
@ -87,9 +88,10 @@ CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER
|
|
|
|
|
CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED)
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE (
|
|
|
|
|
CODE_ID VARCHAR (255),
|
|
|
|
|
AUTHORIZATION_CODE VARCHAR2 (512),
|
|
|
|
|
CONSUMER_KEY_ID INTEGER,
|
|
|
|
|
CALLBACK_URL VARCHAR2 (1024),
|
|
|
|
|
CALLBACK_URL VARCHAR2 (1024),
|
|
|
|
|
SCOPE VARCHAR2(2048),
|
|
|
|
|
AUTHZ_USER VARCHAR2 (100),
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
@ -98,7 +100,7 @@ CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE (
|
|
|
|
|
VALIDITY_PERIOD NUMBER(19),
|
|
|
|
|
STATE VARCHAR (25) DEFAULT 'ACTIVE',
|
|
|
|
|
TOKEN_ID VARCHAR(255),
|
|
|
|
|
PRIMARY KEY (AUTHORIZATION_CODE),
|
|
|
|
|
PRIMARY KEY (CODE_ID),
|
|
|
|
|
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE (
|
|
|
|
@ -114,13 +116,13 @@ CREATE TABLE IDN_OAUTH2_SCOPE (
|
|
|
|
|
NAME VARCHAR2 (255) NULL,
|
|
|
|
|
DESCRIPTION VARCHAR2 (512) NULL,
|
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
ROLES VARCHAR2 (500) NULL,
|
|
|
|
|
ROLES VARCHAR2 (500) NULL,
|
|
|
|
|
PRIMARY KEY (SCOPE_ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDN_OAUTH2_SCOPE_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_OAUTH2_SCOPE_TRIGGER
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
ON IDN_OAUTH2_SCOPE
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
FOR EACH ROW
|
|
|
|
@ -133,21 +135,21 @@ CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE (
|
|
|
|
|
SCOPE_ID INTEGER NOT NULL,
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
PRIMARY KEY (RESOURCE_PATH),
|
|
|
|
|
FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID))
|
|
|
|
|
FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_SCIM_GROUP (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
ROLE_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
ROLE_NAME VARCHAR2(255) NOT NULL,
|
|
|
|
|
ATTR_NAME VARCHAR2(1024) NOT NULL,
|
|
|
|
|
ATTR_VALUE VARCHAR2(1024),
|
|
|
|
|
ATTR_VALUE VARCHAR2(1024),
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDN_SCIM_GROUP_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_SCIM_GROUP_TRIGGER
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
ON IDN_SCIM_GROUP
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
FOR EACH ROW
|
|
|
|
@ -163,23 +165,23 @@ CREATE TABLE IDN_OPENID_REMEMBER_ME (
|
|
|
|
|
PRIMARY KEY (USER_NAME, TENANT_ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_OPENID_USER_RPS (
|
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
RP_URL VARCHAR(255) NOT NULL,
|
|
|
|
|
TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE',
|
|
|
|
|
LAST_VISIT DATE NOT NULL,
|
|
|
|
|
VISIT_COUNT INTEGER DEFAULT 0,
|
|
|
|
|
DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT',
|
|
|
|
|
PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL))
|
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
RP_URL VARCHAR(255) NOT NULL,
|
|
|
|
|
TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE',
|
|
|
|
|
LAST_VISIT DATE NOT NULL,
|
|
|
|
|
VISIT_COUNT INTEGER DEFAULT 0,
|
|
|
|
|
DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT',
|
|
|
|
|
PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL))
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_OPENID_ASSOCIATIONS (
|
|
|
|
|
HANDLE VARCHAR(255) NOT NULL,
|
|
|
|
|
ASSOC_TYPE VARCHAR(255) NOT NULL,
|
|
|
|
|
EXPIRE_IN TIMESTAMP NOT NULL,
|
|
|
|
|
MAC_KEY VARCHAR(255) NOT NULL,
|
|
|
|
|
ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED',
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
PRIMARY KEY (HANDLE))
|
|
|
|
|
HANDLE VARCHAR(255) NOT NULL,
|
|
|
|
|
ASSOC_TYPE VARCHAR(255) NOT NULL,
|
|
|
|
|
EXPIRE_IN TIMESTAMP NOT NULL,
|
|
|
|
|
MAC_KEY VARCHAR(255) NOT NULL,
|
|
|
|
|
ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED',
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
PRIMARY KEY (HANDLE))
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_STS_STORE (
|
|
|
|
|
ID INTEGER,
|
|
|
|
@ -194,7 +196,7 @@ CREATE SEQUENCE IDN_STS_STORE_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDE
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER IDN_STS_STORE_TRIGGER
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
ON IDN_STS_STORE
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
FOR EACH ROW
|
|
|
|
@ -243,7 +245,7 @@ CREATE TABLE SP_APP (
|
|
|
|
|
USER_STORE VARCHAR (255) NOT NULL,
|
|
|
|
|
USERNAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
DESCRIPTION VARCHAR (1024),
|
|
|
|
|
ROLE_CLAIM VARCHAR (512),
|
|
|
|
|
ROLE_CLAIM VARCHAR (512),
|
|
|
|
|
AUTH_TYPE VARCHAR (255) NOT NULL,
|
|
|
|
|
PROVISIONING_USERSTORE_DOMAIN VARCHAR (512),
|
|
|
|
|
IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1',
|
|
|
|
@ -296,7 +298,7 @@ CREATE OR REPLACE TRIGGER SP_METADATA_TRIG
|
|
|
|
|
CREATE TABLE SP_INBOUND_AUTH (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
INBOUND_AUTH_KEY VARCHAR (255) NOT NULL,
|
|
|
|
|
INBOUND_AUTH_KEY VARCHAR (255),
|
|
|
|
|
INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL,
|
|
|
|
|
PROP_NAME VARCHAR (255),
|
|
|
|
|
PROP_VALUE VARCHAR (1024) ,
|
|
|
|
@ -319,7 +321,7 @@ ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY
|
|
|
|
|
CREATE TABLE SP_AUTH_STEP (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
STEP_ORDER INTEGER DEFAULT 1,
|
|
|
|
|
STEP_ORDER INTEGER DEFAULT 1,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
IS_SUBJECT_STEP CHAR(1) DEFAULT '0',
|
|
|
|
|
IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0',
|
|
|
|
@ -347,13 +349,13 @@ CREATE TABLE SP_FEDERATED_IDP (
|
|
|
|
|
ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE SP_CLAIM_MAPPING (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_CLAIM VARCHAR (512) NOT NULL ,
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_CLAIM VARCHAR (512) NOT NULL ,
|
|
|
|
|
SP_CLAIM VARCHAR (512) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE SP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
@ -370,11 +372,11 @@ CREATE OR REPLACE TRIGGER SP_CLAIM_MAPPING_TRIG
|
|
|
|
|
ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE SP_ROLE_MAPPING (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_ROLE VARCHAR (255) NOT NULL ,
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_ROLE VARCHAR (255) NOT NULL ,
|
|
|
|
|
SP_ROLE VARCHAR (255) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE SP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
@ -391,10 +393,10 @@ CREATE OR REPLACE TRIGGER SP_ROLE_MAPPING_TRIG
|
|
|
|
|
ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE SP_REQ_PATH_AUTHENTICATOR (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
AUTHENTICATOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
AUTHENTICATOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE SP_REQ_PATH_AUTH_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
@ -411,13 +413,13 @@ CREATE OR REPLACE TRIGGER SP_REQ_PATH_AUTH_TRIG
|
|
|
|
|
ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE SP_PROVISIONING_CONNECTOR (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
CONNECTOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
IS_JIT_ENABLED CHAR(1) DEFAULT '0',
|
|
|
|
|
BLOCKING CHAR(1) DEFAULT '0',
|
|
|
|
|
CONNECTOR_NAME VARCHAR (255) NOT NULL ,
|
|
|
|
|
APP_ID INTEGER NOT NULL,
|
|
|
|
|
IS_JIT_ENABLED CHAR(1) DEFAULT '0',
|
|
|
|
|
BLOCKING CHAR(1) DEFAULT '0',
|
|
|
|
|
PRIMARY KEY (ID))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
@ -434,28 +436,28 @@ CREATE OR REPLACE TRIGGER SP_PROV_CONNECTOR_TRIG
|
|
|
|
|
ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDP (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
NAME VARCHAR(254) NOT NULL,
|
|
|
|
|
IS_ENABLED CHAR(1) DEFAULT '1',
|
|
|
|
|
IS_PRIMARY CHAR(1) DEFAULT '0',
|
|
|
|
|
HOME_REALM_ID VARCHAR(254),
|
|
|
|
|
IMAGE BLOB,
|
|
|
|
|
CERTIFICATE BLOB,
|
|
|
|
|
ALIAS VARCHAR(254),
|
|
|
|
|
INBOUND_PROV_ENABLED CHAR (1) DEFAULT '0',
|
|
|
|
|
INBOUND_PROV_USER_STORE_ID VARCHAR(254),
|
|
|
|
|
USER_CLAIM_URI VARCHAR(254),
|
|
|
|
|
ROLE_CLAIM_URI VARCHAR(254),
|
|
|
|
|
DESCRIPTION VARCHAR (1024),
|
|
|
|
|
DEFAULT_AUTHENTICATOR_NAME VARCHAR(254),
|
|
|
|
|
DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254),
|
|
|
|
|
PROVISIONING_ROLE VARCHAR(128),
|
|
|
|
|
IS_FEDERATION_HUB CHAR(1) DEFAULT '0',
|
|
|
|
|
IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '0',
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
NAME VARCHAR(254) NOT NULL,
|
|
|
|
|
IS_ENABLED CHAR(1) DEFAULT '1',
|
|
|
|
|
IS_PRIMARY CHAR(1) DEFAULT '0',
|
|
|
|
|
HOME_REALM_ID VARCHAR(254),
|
|
|
|
|
IMAGE BLOB,
|
|
|
|
|
CERTIFICATE BLOB,
|
|
|
|
|
ALIAS VARCHAR(254),
|
|
|
|
|
INBOUND_PROV_ENABLED CHAR (1) DEFAULT '0',
|
|
|
|
|
INBOUND_PROV_USER_STORE_ID VARCHAR(254),
|
|
|
|
|
USER_CLAIM_URI VARCHAR(254),
|
|
|
|
|
ROLE_CLAIM_URI VARCHAR(254),
|
|
|
|
|
DESCRIPTION VARCHAR (1024),
|
|
|
|
|
DEFAULT_AUTHENTICATOR_NAME VARCHAR(254),
|
|
|
|
|
DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254),
|
|
|
|
|
PROVISIONING_ROLE VARCHAR(128),
|
|
|
|
|
IS_FEDERATION_HUB CHAR(1) DEFAULT '0',
|
|
|
|
|
IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '0',
|
|
|
|
|
DISPLAY_NAME VARCHAR(254),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (TENANT_ID, NAME))
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (TENANT_ID, NAME))
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
@ -471,13 +473,13 @@ CREATE OR REPLACE TRIGGER IDP_TRIG
|
|
|
|
|
INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost')
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDP_ROLE (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
ROLE VARCHAR(254),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ID, ROLE),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
ROLE VARCHAR(254),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ID, ROLE),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDP_ROLE_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
@ -491,14 +493,14 @@ CREATE OR REPLACE TRIGGER IDP_ROLE_TRIG
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDP_ROLE_MAPPING (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ROLE_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
USER_STORE_ID VARCHAR (253),
|
|
|
|
|
LOCAL_ROLE VARCHAR(253),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE),
|
|
|
|
|
FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE)
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ROLE_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
USER_STORE_ID VARCHAR (253),
|
|
|
|
|
LOCAL_ROLE VARCHAR(253),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE),
|
|
|
|
|
FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
@ -512,13 +514,13 @@ CREATE OR REPLACE TRIGGER IDP_ROLE_MAPPING_TRIG
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDP_CLAIM (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
CLAIM VARCHAR(254),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ID, CLAIM),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
CLAIM VARCHAR(254),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_ID, CLAIM),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDP_CLAIM_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
@ -532,15 +534,15 @@ CREATE OR REPLACE TRIGGER IDP_CLAIM_TRIG
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDP_CLAIM_MAPPING (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_CLAIM_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
LOCAL_CLAIM VARCHAR(253),
|
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM),
|
|
|
|
|
FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE)
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_CLAIM_ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
LOCAL_CLAIM VARCHAR(253),
|
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM),
|
|
|
|
|
FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
CREATE SEQUENCE IDP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER
|
|
|
|
|
/
|
|
|
|
@ -581,7 +583,6 @@ INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPPr
|
|
|
|
|
/
|
|
|
|
|
INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests')
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDP_METADATA (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
@ -609,7 +610,6 @@ INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'Session
|
|
|
|
|
/
|
|
|
|
|
INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout')
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IDP_AUTHENTICATOR_PROPERTY (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
@ -713,7 +713,7 @@ CREATE TABLE IDP_LOCAL_CLAIM (
|
|
|
|
|
IDP_ID INTEGER,
|
|
|
|
|
CLAIM_URI VARCHAR(255) NOT NULL,
|
|
|
|
|
DEFAULT_VALUE VARCHAR(255),
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
IS_REQUESTED VARCHAR(128) DEFAULT '0',
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE)
|
|
|
|
@ -731,12 +731,12 @@ CREATE OR REPLACE TRIGGER IDP_LOCAL_CLAIM_TRIG
|
|
|
|
|
/
|
|
|
|
|
CREATE TABLE IDN_ASSOCIATED_ID (
|
|
|
|
|
ID INTEGER,
|
|
|
|
|
IDP_USER_ID VARCHAR(255) NOT NULL,
|
|
|
|
|
IDP_USER_ID VARCHAR(255) NOT NULL,
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1234,
|
|
|
|
|
IDP_ID INTEGER NOT NULL,
|
|
|
|
|
IDP_ID INTEGER NOT NULL,
|
|
|
|
|
DOMAIN_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
USER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID),
|
|
|
|
|
FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE
|
|
|
|
|
)
|
|
|
|
@ -763,7 +763,7 @@ CREATE TABLE FIDO_DEVICE_STORE (
|
|
|
|
|
TENANT_ID INTEGER,
|
|
|
|
|
DOMAIN_NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
USER_NAME VARCHAR(45) NOT NULL,
|
|
|
|
|
TIME_REGISTERED TIMESTAMP,
|
|
|
|
|
TIME_REGISTERED TIMESTAMP,
|
|
|
|
|
KEY_HANDLE VARCHAR(200) NOT NULL,
|
|
|
|
|
DEVICE_DATA VARCHAR(2048) NOT NULL,
|
|
|
|
|
PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE))
|
|
|
|
@ -788,8 +788,6 @@ CREATE TABLE WF_BPS_PROFILE (
|
|
|
|
|
USERNAME VARCHAR2(45),
|
|
|
|
|
PASSWORD VARCHAR2(255),
|
|
|
|
|
CALLBACK_HOST VARCHAR2 (45),
|
|
|
|
|
CALLBACK_USERNAME VARCHAR2 (45),
|
|
|
|
|
CALLBACK_PASSWORD VARCHAR2 (255),
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
PRIMARY KEY (PROFILE_NAME, TENANT_ID))
|
|
|
|
|
/
|
|
|
|
@ -810,7 +808,7 @@ CREATE TABLE WF_WORKFLOW_ASSOCIATION(
|
|
|
|
|
EVENT_ID VARCHAR2(45),
|
|
|
|
|
ASSOC_CONDITION VARCHAR2 (2000),
|
|
|
|
|
WORKFLOW_ID VARCHAR2 (45),
|
|
|
|
|
IS_ENABLED CHAR (1) DEFAULT '1',
|
|
|
|
|
IS_ENABLED CHAR (1) DEFAULT '1',
|
|
|
|
|
TENANT_ID INTEGER DEFAULT -1,
|
|
|
|
|
PRIMARY KEY(ID),
|
|
|
|
|
FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE)
|
|
|
|
@ -862,7 +860,6 @@ CREATE TABLE WF_WORKFLOW_REQUEST_RELATION(
|
|
|
|
|
FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE,
|
|
|
|
|
FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- End of IDENTITY Tables--
|
|
|
|
|
|
|
|
|
|
-- Start of API-MGT Tables--
|
|
|
|
@ -901,14 +898,17 @@ CREATE TABLE AM_APPLICATION (
|
|
|
|
|
APPLICATION_TIER VARCHAR2(50) DEFAULT 'Unlimited',
|
|
|
|
|
CALLBACK_URL VARCHAR2(512),
|
|
|
|
|
DESCRIPTION VARCHAR2(512),
|
|
|
|
|
APPLICATION_STATUS VARCHAR2(50) DEFAULT 'APPROVED',
|
|
|
|
|
CREATED_BY VARCHAR2(100),
|
|
|
|
|
APPLICATION_STATUS VARCHAR2(50) DEFAULT 'APPROVED',
|
|
|
|
|
GROUP_ID VARCHAR2(100),
|
|
|
|
|
CREATED_BY VARCHAR2(100),
|
|
|
|
|
CREATED_TIME DATE,
|
|
|
|
|
UPDATED_BY VARCHAR2(100),
|
|
|
|
|
UPDATED_TIME DATE,
|
|
|
|
|
UUID VARCHAR2(256),
|
|
|
|
|
FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE CASCADE,
|
|
|
|
|
PRIMARY KEY(APPLICATION_ID),
|
|
|
|
|
UNIQUE (NAME,SUBSCRIBER_ID)
|
|
|
|
|
UNIQUE (NAME,SUBSCRIBER_ID),
|
|
|
|
|
UNIQUE (UUID)
|
|
|
|
|
)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
@ -931,7 +931,7 @@ CREATE TABLE AM_API (
|
|
|
|
|
API_NAME VARCHAR2(256),
|
|
|
|
|
API_VERSION VARCHAR2(30),
|
|
|
|
|
CONTEXT VARCHAR2(256),
|
|
|
|
|
CONTEXT VARCHAR2(256),
|
|
|
|
|
CONTEXT_TEMPLATE VARCHAR2(256),
|
|
|
|
|
CREATED_BY VARCHAR2(100),
|
|
|
|
|
CREATED_TIME DATE,
|
|
|
|
|
UPDATED_BY VARCHAR2(100),
|
|
|
|
@ -992,9 +992,11 @@ CREATE TABLE AM_SUBSCRIPTION (
|
|
|
|
|
CREATED_TIME DATE,
|
|
|
|
|
UPDATED_BY VARCHAR2(100),
|
|
|
|
|
UPDATED_TIME DATE,
|
|
|
|
|
UUID VARCHAR2(256),
|
|
|
|
|
FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE,
|
|
|
|
|
FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE,
|
|
|
|
|
PRIMARY KEY (SUBSCRIPTION_ID)
|
|
|
|
|
PRIMARY KEY (SUBSCRIPTION_ID),
|
|
|
|
|
UNIQUE (UUID)
|
|
|
|
|
)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
@ -1024,6 +1026,7 @@ CREATE TABLE AM_APPLICATION_KEY_MAPPING (
|
|
|
|
|
APPLICATION_ID INTEGER,
|
|
|
|
|
CONSUMER_KEY VARCHAR2(512),
|
|
|
|
|
KEY_TYPE VARCHAR2(512) NOT NULL,
|
|
|
|
|
CREATE_MODE VARCHAR2(30) DEFAULT 'CREATED',
|
|
|
|
|
STATE VARCHAR2(30) NOT NULL,
|
|
|
|
|
FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE,
|
|
|
|
|
PRIMARY KEY(APPLICATION_ID,KEY_TYPE)
|
|
|
|
@ -1037,6 +1040,7 @@ CREATE TABLE AM_APPLICATION_REGISTRATION (
|
|
|
|
|
APP_ID INTEGER,
|
|
|
|
|
TOKEN_TYPE VARCHAR2(30),
|
|
|
|
|
TOKEN_SCOPE VARCHAR2(256) DEFAULT 'default',
|
|
|
|
|
INPUTS VARCHAR2(1000),
|
|
|
|
|
ALLOWED_DOMAINS VARCHAR2(256),
|
|
|
|
|
VALIDITY_PERIOD NUMBER(19),
|
|
|
|
|
UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE),
|
|
|
|
@ -1229,10 +1233,10 @@ CREATE OR REPLACE TRIGGER AM_EXTERNAL_STORES_TRIGGER
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE TABLE AM_API_DEFAULT_VERSION (
|
|
|
|
|
DEFAULT_VERSION_ID NUMBER,
|
|
|
|
|
DEFAULT_VERSION_ID NUMBER,
|
|
|
|
|
API_NAME VARCHAR(256) NOT NULL ,
|
|
|
|
|
API_PROVIDER VARCHAR(256) NOT NULL ,
|
|
|
|
|
DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
|
API_PROVIDER VARCHAR(256) NOT NULL ,
|
|
|
|
|
DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
|
PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) ,
|
|
|
|
|
PRIMARY KEY (DEFAULT_VERSION_ID)
|
|
|
|
|
)
|
|
|
|
@ -1250,4 +1254,3 @@ CREATE OR REPLACE TRIGGER AM_API_DEFAULT_VERSION_TRG
|
|
|
|
|
/
|
|
|
|
|
CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|