Skip to content

RBAC-1#7235

Merged
vitlibar merged 5 commits intoClickHouse:masterfrom
vitlibar:RBAC-1
Oct 11, 2019
Merged

RBAC-1#7235
vitlibar merged 5 commits intoClickHouse:masterfrom
vitlibar:RBAC-1

Conversation

@vitlibar
Copy link
Copy Markdown
Member

@vitlibar vitlibar commented Oct 8, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Category (leave one):

  • Improvement

Just refactoring in order to implement RBAC, no new functionality here.

@vitlibar vitlibar force-pushed the RBAC-1 branch 13 times, most recently from 2ba6859 to 3aae6aa Compare October 9, 2019 10:34
@vitlibar vitlibar requested a review from abyss7 October 9, 2019 12:23
@vitlibar vitlibar force-pushed the RBAC-1 branch 2 times, most recently from 5bb3333 to 5796f00 Compare October 9, 2019 21:46
@vitlibar vitlibar mentioned this pull request Oct 10, 2019
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like unneeded for public interface.

Copy link
Copy Markdown
Member Author

@vitlibar vitlibar Oct 10, 2019

Choose a reason for hiding this comment

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

Looks like unneeded for public interface.

The public function getPasswordHashBinary() is already used by MySQLProtocol. I suppose the setPasswordHashBinary() can be public too for consistency.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to the usage pattern, I suggest to set type and password only once in constructor - and interpret the password string according to type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

explicit

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggest to remove this method from interface - passing user_name can be replaced with outer call to contains() where the username is known.

Copy link
Copy Markdown
Member Author

@vitlibar vitlibar Oct 10, 2019

Choose a reason for hiding this comment

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

I suggest to remove this method from interface - passing user_name can be replaced with outer call to contains() where the username is known.

The code generating an error message for that purpose isn't very simple, and I'd like to keep this kind of details inside this specific AllowedClientHosts class, not inside the more generic class User (which has other work to do).

@vitlibar vitlibar merged commit 8c24d5e into ClickHouse:master Oct 11, 2019
@vitlibar vitlibar deleted the RBAC-1 branch October 11, 2019 14:16
@akuzm akuzm added the pr-feature Pull request with new product feature label Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants