Skip to content

feat(identity): Encrypt Identity.data field with EncryptedJSONField#108429

Merged
vgrozdanic merged 1 commit intomasterfrom
encrypt-identity-data-field
Feb 19, 2026
Merged

feat(identity): Encrypt Identity.data field with EncryptedJSONField#108429
vgrozdanic merged 1 commit intomasterfrom
encrypt-identity-data-field

Conversation

@vgrozdanic
Copy link
Copy Markdown
Member

@vgrozdanic vgrozdanic commented Feb 18, 2026

  • Replace models.JSONField with EncryptedJSONField on the Identity.data field to encrypt sensitive identity data (OAuth tokens, credentials) at rest

This is SQL no-op since the encrypted field is almost a drop-in replacement

Closes TET-1540: Migrate Identity - data to encrypted field

Replace the plain JSONField on the Identity model with EncryptedJSONField
to encrypt sensitive identity data (tokens, credentials) at rest. The
EncryptedJSONField is a drop-in replacement that stores encrypted payloads
in jsonb format, maintaining backward compatibility with existing
unencrypted data.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 18, 2026
@linear
Copy link
Copy Markdown

linear bot commented Feb 18, 2026

@github-actions
Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1031_encrypt_identity_data_field.py

for 1031_encrypt_identity_data_field in sentry

--
-- Alter field data on identity
--
-- (no-op)

@vgrozdanic vgrozdanic marked this pull request as ready for review February 18, 2026 10:22
@vgrozdanic vgrozdanic requested a review from a team as a code owner February 18, 2026 10:22
@vgrozdanic vgrozdanic requested a review from oioki February 19, 2026 11:42
@vgrozdanic vgrozdanic merged commit a098950 into master Feb 19, 2026
106 checks passed
@vgrozdanic vgrozdanic deleted the encrypt-identity-data-field branch February 19, 2026 15:04
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
…108429)

- Replace `models.JSONField` with `EncryptedJSONField` on the
`Identity.data` field to encrypt sensitive identity data (OAuth tokens,
credentials) at rest

This is SQL no-op since the encrypted field is almost a drop-in
replacement

Closes [TET-1540: Migrate Identity - data to encrypted
field](https://linear.app/getsentry/issue/TET-1540/migrate-identity-data-to-encrypted-field)
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
…108429)

- Replace `models.JSONField` with `EncryptedJSONField` on the
`Identity.data` field to encrypt sensitive identity data (OAuth tokens,
credentials) at rest

This is SQL no-op since the encrypted field is almost a drop-in
replacement

Closes [TET-1540: Migrate Identity - data to encrypted
field](https://linear.app/getsentry/issue/TET-1540/migrate-identity-data-to-encrypted-field)
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants