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

VaultId and the removal of GenericIdTypes #337

Closed
6 tasks done
tegefaulkes opened this issue Feb 15, 2022 · 0 comments · Fixed by #266
Closed
6 tasks done

VaultId and the removal of GenericIdTypes #337

tegefaulkes opened this issue Feb 15, 2022 · 0 comments · Fixed by #266
Assignees
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management

Comments

@tegefaulkes
Copy link
Contributor

tegefaulkes commented Feb 15, 2022

Specification

The VaultId is the last holdout of GeneridIdTypes.ts, this file and associated types and errors should be removed from PK in this PR thus solving #299.

VaultId should be updated to be an Opaque type of Id from js-id. GenericIdTypes.ts should be completely removed. There should be 3 types total. VaultId, VaultIdEncoded and VaultIdString. Converting from VaultId to `vaultIdEncoded should use the encode/decode functions inside the vaults utils.

Additional context

Tasks

  1. Update VaultId to be a Opaque type of Id.
  2. add encode/decode functions to vaults utils.
  3. add parseVaultId function for validation in the validation utils.
  4. Update usage of VaultId to do conversions where needed. convert to VaultIdEncoded when it can be seen by user and GRPC. Use VaultIdString where string is needed internally.
  5. make sure the user/ network boundary applies proper validation where needed.
  6. Remove the GenericIdTypes.ts and related tests.
@tegefaulkes tegefaulkes added the development Standard development label Feb 15, 2022
tegefaulkes added a commit that referenced this issue Feb 28, 2022
tegefaulkes added a commit that referenced this issue Mar 9, 2022
- `VaultId` usage,
- updated validation
- removal of `GenericIdTypes.ts`
@teebirdy teebirdy added the r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management label Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management
2 participants