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

Add "mc support upload" encryption #5113

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

klauspost
Copy link
Contributor

Description

  • Add --enc parameter to mc support upload to encrypt the file content.
  • Add file size as zstd frame content size.
  • Test opening the file before doing more.
  • Uses same key as mc support inspect.

How to test this PR?

@anjalshireesh - would it be possible for you to test the upload? We will probably need to make changes to inspect but I would need a test file to verify

Types of changes

  • New feature (non-breaking change which adds functionality)

* Add `--enc` parameter to `mc support upload` to encrypt the file content.
* Add file size as zstd frame content size.
* Test opening the file before doing more.
* Uses same key as "mc support inspect".
Copy link
Contributor

@dormanze dormanze left a comment

Choose a reason for hiding this comment

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

LGTM

@anjalshireesh
Copy link
Contributor

Sure @klauspost I will test and update

Co-authored-by: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com>
Copy link
Contributor

@anjalshireesh anjalshireesh left a comment

Choose a reason for hiding this comment

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

LGTM, tested, working fine. (tested mc support inspect also)

@klauspost the inspect command allows using custom keys.

publicKey, e = os.ReadFile(filepath.Join(mustGetMcConfigDir(), "support_public.pem"))
I feel it will be useful to support that here also.

@klauspost
Copy link
Contributor Author

@anjalshireesh We never use it, so didn't bother. We can always add it, if we ever should get a use for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants