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

added encrypted key to struct #41

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@ type (
UploadTaskParams struct {
URL string `json:"url,omitempty"`
Encryption struct {
Key string `json:"key"`
Algorithm string `json:"algorithm,omitempty"`
EncryptedKey string `json:"encryptedKey,omitempty"`
Copy link
Member

@victorges victorges May 4, 2023

Choose a reason for hiding this comment

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

Should we have the public key used for encryption as a field here as well? Would be future-proof and safer

Key string `json:"key,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment saying why this is still here? We should not have both/never pass unencrypted keys around, so it needs at least a TODO to remove it once we kill the other experiment.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To me, it's also not clear why we need both encrypted and decrypted keys here. Looking at the design VOD Access Control V2, I don't see any place where Catalyst would need to fetch encrypted and descrypted keys from Studio. Could you maybe update the design or add some comments here?

Copy link
Member

@victorges victorges May 8, 2023

Choose a reason for hiding this comment

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

I think this was a reminiscent of an old experiment I had implemented where the key came unencrypted in this field. No one is using the experiment anymore and I don't think it should stay around, so I'd rather remove the field (and the whole experiment) and avoid the confusion in the schema.

Algorithm string `json:"algorithm,omitempty"`
} `json:"encryption,omitempty"`
RecordedSessionID string `json:"recordedSessionId,omitempty"`
UploadedObjectKey string `json:"uploadedObjectKey,omitempty"`
Expand Down