Skip to content

HDDS-4905. Add prefix CLI.#1995

Merged
xiaoyuyao merged 4 commits intoapache:masterfrom
xiaoyuyao:HDDS-4905
Mar 10, 2021
Merged

HDDS-4905. Add prefix CLI.#1995
xiaoyuyao merged 4 commits intoapache:masterfrom
xiaoyuyao:HDDS-4905

Conversation

@xiaoyuyao
Copy link
Contributor

@xiaoyuyao xiaoyuyao commented Mar 5, 2021

What changes were proposed in this pull request?

Draft patch that adds the Prefix ACL CLI.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-4905

Please replace this section with the link to the Apache JIRA)

How was this patch tested?

New acceptance tests added.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @xiaoyuyao for working on this. LGTM, some typos noted.

Key and prefix ACL CLI code is mostly the same. Would it make sense to add --prefix flag for existing key *acl operations to let them work on prefixes, instead of introducing separate prefix *acl commands?

import java.io.IOException;

/**
* Add ACL to bucket.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Add ACL to bucket.
* Add ACL to prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had the similar thought at the beginning. But Moving forward, we want to remove the support of individual key level acl SET/ADD/REMOVE with native authorizer. The prefix acl CLI is intend to make it different from the deprecated key level acl support.

Assert.assertEquals("vol1", address.getVolumeName());
Assert.assertEquals("bucket", address.getBucketName());
Assert.assertEquals("prefix", address.getKeyName());
Assert.assertTrue("this not be a prefix",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Assert.assertTrue("this not be a prefix",
Assert.assertTrue("this should be a prefix",

@xiaoyuyao
Copy link
Contributor Author

Thanks @adoroszlai for the review. I've fixed the typos in the new commit.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @xiaoyuyao for updating the patch.

@xiaoyuyao xiaoyuyao merged commit 2fc1022 into apache:master Mar 10, 2021
@xiaoyuyao
Copy link
Contributor Author

Thanks @adoroszlai for the review. PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants