mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4212] [MERGED] HSB-473 feat: encrypt sensitive data before storing in db #4704
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4704
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4212
Author: @mirarifhasan
Created: 7/25/2024
Status: ✅ Merged
Merged: 8/14/2024
Merged by: @balub
Base:
next← Head:feat/infra-config-encryption📝 Commits (10+)
1e997c7feat: encryption added on onMuduleInit8cbe7b2feat: encryption changes added on sh admin mutations and query5dcaefechore: fetch minimum column from DB8025afbfeat: data encryption added on account table9c6f7catest: infra config test case updatee529293chore: env example modified1b0a82bchore: update variable namec91fd3achore: refactor the code1ef2b6dfeat: client-ids made encrypted0a4a77echore: encrypted auth client id's📊 Changes
8 files changed (+213 additions, -26 deletions)
View changed files
📝
.env.example(+3 -0)➕
packages/hoppscotch-backend/prisma/migrations/20240725043411_infra_config_encryption/migration.sql(+2 -0)📝
packages/hoppscotch-backend/prisma/schema.prisma(+7 -6)📝
packages/hoppscotch-backend/src/infra-config/helper.ts(+69 -13)📝
packages/hoppscotch-backend/src/infra-config/infra-config.service.spec.ts(+23 -0)📝
packages/hoppscotch-backend/src/infra-config/infra-config.service.ts(+55 -4)📝
packages/hoppscotch-backend/src/user/user.service.ts(+3 -3)📝
packages/hoppscotch-backend/src/utils.ts(+51 -0)📄 Description
Closes HSB-473
This PR introduces data encryption before storing sensitive data in the database. For example, previously we stored SSO's secret key as plain text in the infraConfig table. From now on, before saving to DB, the value will be encrypted.
Also, after fetching the data from the DB, we decrypt it to the original value to use.
What's changed
In
AccountandInfraConfigtables, we added encryption and decryption logic to store/ fetch sensitive data.Notes to reviewers
Nil
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.