Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PB-1379] Feat:password protected sharing #247

Merged
merged 11 commits into from
Dec 21, 2023

Conversation

apsantiso
Copy link
Collaborator

@apsantiso apsantiso commented Dec 15, 2023

Users need to share their public links with a password to protect their data. To accomplish this with zero knowledge, the next changes are proposed.

  • Add encryptedPassword field to the sharingModel.
  • encryptedPassword needs to be encrypted with the public code (which we don't store).
  • Allow frontend to create a public sharing with password in one step (just enable encryptedPassword in the DTO)
  • Enable one endpoint to edit/create password for an already created public sharing.
  • Enable one endpoint to remove password protection from a public sharing.
  • Enable one endpoint to return public shared item info. We need to show users basic information of the item they are going to access to. (we just return size, plainName and type).

@apsantiso apsantiso added the enhancement New feature or request label Dec 15, 2023
@apsantiso apsantiso self-assigned this Dec 15, 2023
src/modules/sharing/sharing.controller.ts Outdated Show resolved Hide resolved
src/modules/sharing/sharing.controller.ts Show resolved Hide resolved
src/modules/sharing/sharing.service.ts Show resolved Hide resolved
src/modules/sharing/sharing.service.ts Show resolved Hide resolved
src/modules/sharing/sharing.service.ts Show resolved Hide resolved
src/modules/sharing/sharing.service.ts Show resolved Hide resolved
sg-gs
sg-gs previously approved these changes Dec 20, 2023
Copy link
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

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

Please change the labels of the tests to accommodate 'When, then' pattern. Apart from that is all OK.

src/modules/sharing/sharing.controller.ts Show resolved Hide resolved
src/modules/sharing/sharing.service.spec.ts Outdated Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
81.5% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@sg-gs
Copy link
Member

sg-gs commented Dec 21, 2023

Sequelize CLI [Node: 20.3.1, CLI: 6.6.2, ORM: 6.35.0]

Loaded configuration file "src/config/sequelize.js".
Using environment "production".
== 20231211135328-add-encrypted-password-field-to-sharings: migrating =======
== 20231211135328-add-encrypted-password-field-to-sharings: migrated (0.170s)

✨  Done in 2.96s.

@sg-gs sg-gs merged commit f00296a into master Dec 21, 2023
6 of 7 checks passed
@sg-gs sg-gs deleted the feat/password-protected-sharing branch December 21, 2023 11:11
apsantiso pushed a commit that referenced this pull request Jul 11, 2024
[PB-1379] Feat:password protected sharing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants