Projects

Person Key

Person Key follows one person from candidate (Greenhouse) to employee (Workday) to payroll and the warehouse without telling who they are. The same person gets the same pseudonym and the same fake values in every table, tap and job of the project, and the key that makes them stays in your key provider: Google Cloud KMS, AWS KMS, HashiCorp Vault, or the secret of the installation.

Pseudonymised data is still personal data for whoever holds the key (GDPR Art. 4(5) and Recital 26). Keep the key provider and the people who can re-identify under your control, and treat the datasets as personal data. For a recipient that has no means to re-identify, the CJEU (EDPS v SRB, C-413/23 P) may treat them otherwise; that never applies to you as the key holder.

Open it from the project menu: Person Key. Managing it needs the Manage Person Keys permission.

Subject types

A subject type is a kind of person, for example person. It has:

  • Kinds of identifiers, by precedence: for example candidate_id, worker_id and email. A person is known by the first kind it has, so put first the identifier a person gets first in their life (a candidate id before a worker id). Each kind can be normalised: Email and Lower case ignore case, Digits only ignores separators.
  • Columns: the columns of each model that hold an identifier, with its kind, and whether it is the identifier of the person of the row. workers.id is the worker of the row; positions.manager_id is a worker id but of another person, so it is not.
  • Pseudonyms: the format, P- and ten letters and digits by default. Use Digits for number columns.
  • Key provider: where the key is wrapped (see below).

Renaming a kind or a subject type changes the pseudonyms: they are computed from those names.

A Workday worker that came from Greenhouse has a worker id and, often, the candidate id of Greenhouse in workers.greenhouse_candidate_id. A row that has both is evidence that they are one person: their pseudonym is the one of the candidate id. A table that only has the worker id (job_history) needs the links to find the same person.

Build links runs a job over the entities of a model that hold the identifiers of the person of the row. It reads only those columns and keeps which identifiers go together, as keyed digests of the active epoch, never the identifiers. The same email in two systems links them too, when email is a kind of both.

  • Identifiers that link nobody: an address many people share (email:hr@acme.com) would merge them; list it there.
  • Links by hand: candidate_id:553 = worker_id:W-1182, for the people the data does not link.
  • The statistics of the last build show the rows read, the identifiers of each kind, the people, the identifiers linked and the conflicts (a person with two identifiers of the same kind, such as a duplicated candidate).

Build the links again after a rotation: they are digests of the key of the epoch. Jobs warn when a subject type has links to build for the active epoch.

Pseudonyms and fake values per person

In an Anonymize operation:

  • Functions / Pseudonym writes the pseudonym of the person of an identifier column. It works on primary and foreign keys: a foreign key gets the pseudonym of the key it references, so joins keep working with no dictionary and no lookup table. A manager id gets the pseudonym of the manager.
  • Same fake values per person (options of a fake field) gives the same person the same fake name, email and so on in every table, tap and job, without the dictionary. Fake emails stay unique: a tag of the pseudonym of the person goes before the @.

See Pseudonym.

Key providers

Gigantics keeps only the wrapped key of each epoch: the provider encrypts it, bound to the project, the subject type and the epoch, and decrypts it when a job needs it (once every ten minutes at most per server process). The key never reaches the database, the logs or the exports in clear.

ProviderWhat it needsPermission it needs
Secret of this installationNothing-
Google Cloud KMSThe key, projects/…/locations/…/keyRings/…/cryptoKeys/…; a service account key, or the credentials of the server; optionally an account to act asroles/cloudkms.cryptoKeyEncrypterDecrypter on the key
AWS KMSThe key id, ARN or alias and its region; access keys, a role to assume, or the credentials of the serverkms:Encrypt and kms:Decrypt, which you can restrict to the encryption context project, subjectType, epoch
HashiCorp VaultThe address (https), the transit engine and key, a token, optionally a namespaceupdate on transit/encrypt/<key> and transit/decrypt/<key>

Test the key provider wraps and unwraps a random key without saving anything. The secrets of a provider (a service account key, a secret access key, a token) are kept encrypted and never shown again.

Epochs, rotation and destruction

Every subject type has an active epoch. Rotate the key starts a new one: the next jobs write other pseudonyms, and lineage records the epoch each column was written with (pseudonym · Person Key person, epoch 2).

Destroy a retired epoch to make its pseudonyms unlinkable forever: Gigantics deletes its wrapped key, its links and its re-identification index, and gives a receipt (subject type, epoch, key provider, fingerprint of the wrapped key, reason, who or what, and its sha256). Download and keep it. The active epoch can't be destroyed: rotate first. A retention policy can destroy the retired epochs on its own.

Copies of the database made before the destruction still have the wrapped key: with them and the provider key, the epoch could be unwrapped. For a complete deletion with a cloud KMS, use a key (or key version) per epoch and destroy it in the provider too; the receipt names the key.

Re-identification

Off by default. With Re-identification on, jobs keep the identifiers seen of each pseudonym, encrypted with a key of their own (the pseudonym key can't open it). Then:

  1. Someone with Re-identify subjects asks for some pseudonyms, with the reason.
  2. Someone else with Approve re-identifications approves or denies it. Nobody approves their own request.
  3. The one who asked sees the identifiers once, within a day.

Every step is in the events of the project. Erasure requests of people can remove them from the index.

Pseudonyms computed outside

dbt jobs in BigQuery, or any pipeline, can compute the same pseudonyms for new rows with the pseudonym endpoint or gig-cmd admin person-key pseudonym. It is off by default; see the endpoint for the keys it takes and its quotas.

Whoever computes pseudonyms can recognise, in a pseudonymised dataset, the people whose identifiers they already know. Grant it only to the keys of the pipelines that need it, keep the quotas near their daily volume, and watch the events.

The algorithm

For a subject type T, the key K of its epoch and an identifier v of kind k:

  • digest of the identifier: HMAC-SHA256(K, objecthash(["gigantics:person-id", T, "id:" + k, ["normalised v"]]))
  • the root of the person: the digest of its first kind by precedence, or the one its links give
  • pseudonym: the format of HMAC-SHA256(K, objecthash(["gigantics:pseudonym", T, "pseudonym", root]))
  • the seed of its fake values: HMAC-SHA256(K, objecthash(["gigantics:person", T, "fake:" + label, root]))

This is the same construction as the consistent values of the dictionary. Security rests on the key alone.