Introduce APP_SECRET to replace SECRETS
Context
We currently have 4 environment variables to specify our SECRETS in packages/twenty-server/.env:
- ACCESS_TOKEN_SECRET
- LOGIN_TOKEN_SECRET
- REFRESH_TOKEN_SECRET
- FILE_TOKEN_SECRET
We would like to replace those by a unique APP_SECRET env variable and to generate those 4 when needed as:
- ACCESS_TOKEN_SECRET=SHA256({APP_SECRET}+{workspaceId}+"ACCESS")
- LOGIN_TOKEN_SECRET=SHA256({APP_SECRET}+{workspaceId}+"FILE")
- ...
What & How
- Remove those 4 secrets from the code base
- introduce APP_SECRET instead (this needs to be introduced in several places, I would recommend look for ACCESS_TOKEN_SECRET and to mimick it)
- compute accessTokenSecret based on the formula above whenever it's needed
I have updated the tickets desc, ready to be picked!
/oss.gg 500
Thanks for opening an issue! It's live on oss.gg!
@Devessier Let's go with sha as discussed together!
/assign
Assigned to @vishnud05! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
This issue is already assigned to another person. Please find more issues here.
@vishnud05, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
This issue is already assigned to another person. Please find more issues here.
/unassign
Issue unassigned.
/assign
Assigned to @amit-y11! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
@vishnud05, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
/unassign
Issue unassigned.
/assign
Assigned to @HarshithAlfred! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
@vishnud05, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
@HarshithAlfred, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.