-
Notifications
You must be signed in to change notification settings - Fork 562
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
Large MC Update ( encryption flags, functional test suite, removal of session code, minor cleanup, vuln. updates ) #4882
Conversation
@zveinn is it a hard requirement for us to rename |
It's not a hard requirement, but even if we rename the flags they will not function the same. So it's better to change the name entirely to prevent confusion. Originally we were going to keep backwards compatibility on this, but we decided that was not a good idea. But I am neutral on the renaming tbh, if we want to keep the old names then that's all good. |
@kannappanr it might be nice to flesh out how exactly we want to time deprecations, this conversation is also at hand in minio/operator#2032 (comment) |
I don't think we're doing a deprecation phase for this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial minor ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor stuff.
a33beaf
to
d7ea482
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just did a small refactor for the encryption key parsing, there was a method that was forcing the use of only one type of key at a time. It's been removed and the code paths simplified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few minor ones only
Change encrypt-key to enc-c Keys cannot end in "=" See minio/mc#4882
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Note
This is a rather large update to the mc so let's take our time to review and discuss
The test suite
The new test suite is created to run an mc binary against an endpoint. The idea is to be able to run any version of mc against any version of minio by just changing .env variables. Our ci pipeline is currently not set up for that, so the test suite will not run automatically for now.
The test suite is a replacement for the bash functional suite we had before and was hard to modify and maintain. The new suite covers all tests cases that the bash test suite used to cover, hence why it took so long to submit this PR.
Along with the old test cases we have a lot of new ones as well, especially regarding the new encryption flags.
MC updates
This PR contains a few items that needed a fix and have been sittin in the backlog.
Normally I would not bundle so many things together but since the core change
for this PR was to deprecate the --encrypt --encrypt-kms and --encrypt-s3 flags it
was a good chance to also include the new functional test suite to cover the changes.
During the update I discovered that some of the mc methods have documentation stating
that they can accept encryption flags, but in reality these methods do not need
encryption at all. This lead to a small refactor of certain methods.
Another change that kind of just happened during this refactor was the removal of the
--continue flag. This flag was behaving in an insecure way and after a discussion with
AB, we decided to completely remove this code from the mc client.
Things that were fixed/changed
Changed encryption flag functionality
The new encryption flags (--enc-s3, --enc-kms, --enc-c) will only accept RawBase64 encoded keys and
the cli parameters are now '[]string' instead of 'string'. This allows us to properly parse the keys.
Deprecated flags
New flags
Types of changes
Checklist: