mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
task: added scim id to user (#6439)
SCIM synchronizations requires a stable id no matter how many changes are made to username and email (our other unique fields). In addition, exposing internal incremented database ids to an external service (our current id field) feels insecure. Our plan is to create either a uuidv7 or ulid when scim operations are performed against the user, so the external scim provisioner has a stable globally unique id to use to refer to the users they're modifying.
This commit is contained in:
parent
5d00157b7c
commit
a44c3a3fa7
13
src/migrations/20240305131822-add-scim-id-column-to-user.js
Normal file
13
src/migrations/20240305131822-add-scim-id-column-to-user.js
Normal file
@ -0,0 +1,13 @@
|
||||
exports.up = function(db, cb) {
|
||||
db.runSql(`
|
||||
ALTER TABLE users ADD COLUMN scim_id TEXT;
|
||||
CREATE INDEX users_scim_id_uniq_idx ON users (scim_id) WHERE scim_id IS NOT NULL;
|
||||
`, cb);
|
||||
};
|
||||
|
||||
exports.down = function(db, cb) {
|
||||
db.runSql(`
|
||||
DROP INDEX users_scim_id_uniq_idx;
|
||||
ALTER TABLE users DROP COLUMN scim_id;
|
||||
`, cb);
|
||||
};
|
Loading…
Reference in New Issue
Block a user