Skip to content

Conversation

@vgrozdanic
Copy link
Member

@vgrozdanic vgrozdanic commented Jun 5, 2025

Adds tink package that will be used in a first iteration of EncryptedField in Sentry

Closes TET-582: Add tink package to sentry pypi

@vgrozdanic vgrozdanic requested review from mdtro and oioki June 5, 2025 10:50
@vgrozdanic vgrozdanic marked this pull request as ready for review June 5, 2025 10:50
Copy link
Contributor

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as before, I really don't want us to use tink it is a huge maintenance liability and is significantly different from how most of the python community does things. #1375 (comment)

for example it alone would have delayed our python 3.13 upgrade by six months

@vgrozdanic
Copy link
Member Author

as before, I really don't want us to use tink it is a huge maintenance liability and is significantly different from how most of the python community does things. #1375 (comment)

for example it alone would have delayed our python 3.13 upgrade by six months

I agree with you, but tink will be used only in the first iteration so that we can start working on this, cause there is bunch of other things to figure out around this. There is a plan to add support for tink primitives in cryptography library in parallel with this work, so that we can replace tink as soon as it lands into the cryptography library. That would be drop-in replacement for tink. This should be replaced with cryptography way before next Python release.

The other option would be to use custom library/wrapper around Fernet (written by us), which is less secure than tink, and we might not be aware of some problems with the way tink does serialization of data (i am not expecting any problems here, but it's hard to tell) and the way we handle the data across the system and in backups.

We can even delay GA of this, until we have a functioning version without tink as a dependency, in case this is still not present in cryptography by the time we want to upgrade Python, we can just rip tink off and do a Python upgrade

@asottile-sentry
Copy link
Contributor

I'd rather we never introduce it at all. once it's available it's going to be nearly impossible to prevent / rip out.

@vgrozdanic
Copy link
Member Author

Understandable, closing this then. We can start the work with other libraries, and switch to a newer version of cryptography once it is ready

@vgrozdanic vgrozdanic closed this Jun 5, 2025
@asottile-sentry asottile-sentry deleted the vgrozdanic/crypto-add-tink branch July 1, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants