Skip to content

Commit b56ce68

Browse files
committed
add addtional details based on feedback
1 parent 172677c commit b56ce68

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

text/0032-improved-api-tokens.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Improve on Sentry's API token implementation to a more secure pattern. Our major
3636
3. Allow users to _name_ the tokens ([Tracking Issue #9600](https://github.com/getsentry/sentry/issues/9600))
3737
- [#58945](https://github.com/getsentry/sentry/pull/58945)
3838
4. Use a predictable prefix and suffix to integrate with various secret scanning services (ex. Github's Secret Scanning)
39+
5. Deprecate use of full token values in API endpoints
40+
- https://github.com/getsentry/team-enterprise/issues/21
3941

4042
# Motivation
4143

@@ -161,7 +163,7 @@ Next, any remaining legacy tokens that do not have hashed values will need to be
161163
Lastly, after enough time and we are comfortable:
162164

163165
1. The codebase is updated to not access the `token` and `refresh_token` attributes of the `ApiToken` model.
164-
2. The `token` and `refresh_token` fields are removed from the model and the migration is applied.
166+
2. The `token` and `refresh_token` fields are removed from the model and the migration is applied, dropping the columns from the table.
165167

166168
> _These should be done in two separate deployments to ensure we have no release running in production that may try to use these fields before the migration removes the columns._
167169
@@ -190,3 +192,8 @@ We would then follow a similar approach to Option #1 or Option #2 to generate th
190192
- _This value could be used to inform how long we wait between versions for the migration that will edit pending rows in the database._
191193
- What is the best way to store `token_type`?
192194
- Can we use Django's `models.TextChoices` and store strings or should we use an integer-to-string mapping?
195+
196+
# Future Work
197+
198+
- Allow users to actually set the expiration durations on their API tokens
199+
- We can still support indefinite durations to maintain backwards compatibility

0 commit comments

Comments
 (0)