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

Validate object lock when setting replication config #10200

Merged
merged 1 commit into from Aug 5, 2020

Conversation

poornas
Copy link
Contributor

@poornas poornas commented Aug 4, 2020

check if object lock is enabled on
destination bucket while setting replication
configuration on a object lock enabled bucket.

Description

Motivation and Context

identified above issues while reviewing replication

How to test this PR?

mc mb myminio/source --with-lock
mc versioning enable myminio/source
mc mb myminio/dest
mc versioning enable myminio/dest
mc admin bucket remote set myminio/source http://minio:minio123@localhost:9001/dest --type replica 
mc replicate import myminio/source < replication-config.json  // use latest [pr](https://github.com/minio/mc/pull/3335/files)
this should fail to set replication config 

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation needed
  • Unit tests needed

Check if object lock is enabled on
destination bucket while setting replication
configuration on a object lock enabled bucket.
@poornas poornas changed the title Enforce replica delete permissions Validate object lock when setting replication config Aug 4, 2020
@poornas
Copy link
Contributor Author

poornas commented Aug 4, 2020

Removing ReplicateDelete permission enforcement for DeleteObject(s) from the PR. Found that this is as good as s3:DeleteObject permission and not enforced in Aws.

@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-xl.sh ✔️
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-gateway-azure.sh ✔️
mint-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-dist-xl.sh more...

10200-e9d79ee/mint-dist-xl.sh.log:

Running with
SERVER_ENDPOINT:      minio-c3.minio.io:30844
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 6dffebc64f36:/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 2 seconds
(2/15) Running aws-sdk-java tests ... done in 1 seconds
(3/15) Running aws-sdk-php tests ... done in 43 seconds
(4/15) Running aws-sdk-ruby tests ... done in 4 seconds
(5/15) Running awscli tests ... FAILED in 59 seconds
{
  "name": "awscli",
  "duration": 1377,
  "function": "make_bucket\n",
  "status": "FAIL",
  "error": "An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it."
}
(5/15) Running healthcheck tests ... done in 0 seconds
(6/15) Running mc tests ... done in 43 seconds
(7/15) Running minio-dotnet tests ... done in 52 seconds
(8/15) Running minio-go tests ... done in 1 minutes and 53 seconds
(9/15) Running minio-java tests ... done in 1 minutes and 25 seconds
(10/15) Running minio-js tests ... done in 51 seconds
(11/15) Running minio-py tests ... done in 2 minutes and 43 seconds
(12/15) Running s3cmd tests ... done in 22 seconds
(13/15) Running s3select tests ... done in 5 seconds
(14/15) Running security tests ... done in 0 seconds

Executed 14 out of 15 tests successfully.

Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

@kannappanr kannappanr merged commit 88daaef into minio:master Aug 5, 2020
@poornas poornas deleted the fixrepl branch June 13, 2022 22:48
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.

None yet

4 participants