...
- When adding scopes, you can assign claims to a scope by entering a Scope Name and assigning an available OIDC claim to that scope from the dropdown that appears once you click the Add OIDC Claim button as indicated below. Click Finish to add the new scope claim mapping.
- Listing the scopes can be done clicking on the List button. You can add and remove claims from the scope by using theĀ Add claims and Update buttons respectively. You can also delete a scope claim mapping.
Database structure for OIDC scope claim mapping
Two new tables and a new index have been introduced to persist scope claim mapping as indicated below.
Code Block | ||
---|---|---|
| ||
CREATE TABLE IF NOT EXISTS IDN_OIDC_SCOPE (
ID INTEGER NOT NULL AUTO_INCREMENT,
NAME VARCHAR(255) NOT NULL,
TENANT_ID INTEGER DEFAULT -1,
PRIMARY KEY (ID)
);
CREATE TABLE IF NOT EXISTS IDN_OIDC_SCOPE_CLAIM_MAPPING (
ID INTEGER NOT NULL AUTO_INCREMENT,
SCOPE_ID INTEGER,
EXTERNAL_CLAIM_ID INTEGER,
PRIMARY KEY (ID),
FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OIDC_SCOPE(ID) ON DELETE CASCADE,
FOREIGN KEY (EXTERNAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE
);
CREATE INDEX IDX_AT_SI_ECI ON IDN_OIDC_SCOPE_CLAIM_MAPPING(SCOPE_ID, EXTERNAL_CLAIM_ID); |