Skip to content

Commit

Permalink
Merge pull request #6085 from ashanthamara/certificate-schema-addition
Browse files Browse the repository at this point in the history
Add schema changes related to certificate.management component
  • Loading branch information
ashanthamara authored Oct 31, 2024
2 parents 0c9b8b1 + 9eac3e1 commit 05bc649
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,7 @@ CREATE TRIGGER IDN_OIDC_REQ_OBJECT_CLAIM_VALUES_TRIG

CREATE TABLE IDN_CERTIFICATE (
ID INTEGER NOT NULL,
UUID CHAR(36),
NAME VARCHAR(100) NOT NULL,
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER NOT NULL,
Expand Down Expand Up @@ -2451,3 +2452,9 @@ CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRI
/
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID)
/

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID)
/
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID)
/
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJ_CLAIM_VALUES (
CREATE TABLE IF NOT EXISTS IDN_CERTIFICATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
NAME VARCHAR(100),
UUID CHAR(36),
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER DEFAULT 0,
PRIMARY KEY(ID),
Expand Down Expand Up @@ -1616,3 +1617,7 @@ CREATE INDEX IDX_POLICY_SET_REF ON IDN_XACML_POLICY_SET_REFERENCE (POLICY_ID, VE
CREATE INDEX IDX_SUBSCRIBER_PROPERTY ON IDN_XACML_SUBSCRIBER_PROPERTY (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID);

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID);
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID);
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ CREATE TABLE IDN_OIDC_REQ_OBJ_CLAIM_VALUES (
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_CERTIFICATE]') AND TYPE IN (N'U'))
CREATE TABLE IDN_CERTIFICATE (
ID INTEGER IDENTITY,
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM VARBINARY(MAX),
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -1779,6 +1780,10 @@ CREATE INDEX IDX_SUBSCRIBER_PROPERTY ON IDN_XACML_SUBSCRIBER_PROPERTY (SUBSCRIBE
CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID);

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID);
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID);

GO

-- Trigger IDN_CLAIM delete by dialect on IDN_CLAIM_DIALECT deletion --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJ_CLAIM_VALUES (

CREATE TABLE IF NOT EXISTS IDN_CERTIFICATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -1809,3 +1810,7 @@ CREATE INDEX IDX_POLICY_SET_REF ON IDN_XACML_POLICY_SET_REFERENCE (POLICY_ID, VE
CREATE INDEX IDX_SUBSCRIBER_PROPERTY ON IDN_XACML_SUBSCRIBER_PROPERTY (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID);

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID);
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID);
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJ_CLAIM_VALUES (

CREATE TABLE IF NOT EXISTS IDN_CERTIFICATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -1645,3 +1646,7 @@ CREATE INDEX IDX_POLICY_SET_REF ON IDN_XACML_POLICY_SET_REFERENCE (POLICY_ID, VE
CREATE INDEX IDX_SUBSCRIBER_PROPERTY ON IDN_XACML_SUBSCRIBER_PROPERTY (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID);

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID);
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID);
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,7 @@ CREATE OR REPLACE TRIGGER IDN_OIDC_REQ_OBJ_CLM_VAL_TRIG

CREATE TABLE IDN_CERTIFICATE (
ID INTEGER,
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -2509,3 +2510,9 @@ CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRI
/
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID)
/

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID)
/
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID)
/
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ CREATE OR REPLACE TRIGGER IDN_OIDC_REQ_OBJ_CLM_VAL_TRIG
/
CREATE TABLE IDN_CERTIFICATE (
ID INTEGER,
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM BLOB,
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -2414,3 +2415,9 @@ CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRI
/
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID)
/

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID)
/
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID)
/
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ DROP SEQUENCE IF EXISTS IDN_CERTIFICATE_PK_SEQ;
CREATE SEQUENCE IDN_CERTIFICATE_PK_SEQ;
CREATE TABLE IDN_CERTIFICATE (
ID INTEGER DEFAULT NEXTVAL('IDN_CERTIFICATE_PK_SEQ'),
UUID CHAR(36),
NAME VARCHAR(100),
CERTIFICATE_IN_PEM BYTEA,
TENANT_ID INTEGER DEFAULT 0,
Expand Down Expand Up @@ -1906,3 +1907,7 @@ CREATE INDEX IDX_POLICY_SET_REF ON IDN_XACML_POLICY_SET_REFERENCE (POLICY_ID, VE
CREATE INDEX IDX_SUBSCRIBER_PROPERTY ON IDN_XACML_SUBSCRIBER_PROPERTY (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_SUBSCRIBER_STATUS ON IDN_XACML_SUBSCRIBER_STATUS (SUBSCRIBER_ID, TENANT_ID);
CREATE INDEX IDX_XACML_POLICY_STATUS ON IDN_XACML_POLICY_STATUS (POLICY_ID, POLICY_VERSION, TENANT_ID);

-- CERTIFICATE --
CREATE INDEX IDX_IDN_CERTIFICATE_ID_TID ON IDN_CERTIFICATE (ID, TENANT_ID);
CREATE INDEX IDX_IDN_CERTIFICATE_UUID_TID ON IDN_CERTIFICATE (UUID, TENANT_ID);

0 comments on commit 05bc649

Please sign in to comment.