-
Notifications
You must be signed in to change notification settings - Fork 942
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename identities table columns for more clarity. Rename parameters, arguments etc. to accommodate these changes. Change that the SAML provider domain is persisted in the identities table as the provider ID. Use the SAML Entity ID/Issuer ID of the IdP instead. Introduce saml identity entity (including migrations and a persister) as a specialization of an identity to allow for determining the correct provider name to return to the client/frontend and for assisting in determining whether an identity is a SAML identity (i.e. SAML identities should have a corresponding SAML Identity instance while OAuth/OIDC entities do not).
- Loading branch information
1 parent
7010db9
commit 062aee4
Showing
34 changed files
with
295 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
backend/persistence/migrations/20250130154010_change_identities.down.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
drop_index("identities", "identities_provider_user_id_provider_id_idx") | ||
|
||
rename_column("identities", "provider_id", "provider_name") | ||
rename_column("identities", "provider_user_id", "provider_id") | ||
|
||
add_index("identities", ["provider_id", "provider_name"], {unique: true}) |
6 changes: 6 additions & 0 deletions
6
backend/persistence/migrations/20250130154010_change_identities.up.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
drop_index("identities", "identities_provider_id_provider_name_idx") | ||
|
||
rename_column("identities", "provider_id", "provider_user_id") | ||
rename_column("identities", "provider_name", "provider_id") | ||
|
||
add_index("identities", ["provider_user_id", "provider_id"], {unique: true}) |
1 change: 1 addition & 0 deletions
1
backend/persistence/migrations/20250130170131_create_saml_identities.down.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
drop_table("saml_identities") |
8 changes: 8 additions & 0 deletions
8
backend/persistence/migrations/20250130170131_create_saml_identities.up.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create_table("saml_identities") { | ||
t.Column("id", "uuid", {primary: true}) | ||
t.Column("identity_id", "uuid", { "null": false }) | ||
t.Column("domain", "string", { "null": false }) | ||
t.Timestamps() | ||
t.ForeignKey("identity_id", {"identities": ["id"]}, {"on_delete": "cascade", "on_update": "cascade"}) | ||
t.Index(["identity_id", "domain"], {"unique": true}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.