Passing user roles from query originator to other nodes#42537
Passing user roles from query originator to other nodes#42537Enmk wants to merge 16 commits intoClickHouse:masterfrom Enmk:ldap_remote_roles
Conversation
|
Missing tests. |
|
Is this PR still in work? |
src/Access/AccessControl.h
Outdated
There was a problem hiding this comment.
Why can't we combine those additional_roles with current_roles and use one parameter instead of two ones?
There was a problem hiding this comment.
Because there is also use_default_roles, that controls which roles are applied to the ContextAccess.
I'm not entirely sure why use_default_roles should be false or true, hence wasn't sure if the same logic should be applied to external_roles.
src/Access/AccessControl.h
Outdated
There was a problem hiding this comment.
What are those additional_roles used for?
src/Access/AccessControl.cpp
Outdated
There was a problem hiding this comment.
Isn't it enough logging for authentication already?
There was a problem hiding this comment.
Those are leftovers from debugging session and should be removed
src/Access/ContextAccess.cpp
Outdated
There was a problem hiding this comment.
What was wrong with just toString?
There was a problem hiding this comment.
Leftovers from debugging, will be removed.
src/Access/IAccessStorage.cpp
Outdated
There was a problem hiding this comment.
Leftovers from debugging, will be removed.
src/Interpreters/Session.h
Outdated
There was a problem hiding this comment.
If I understood correctly, additional roles == extra_roles == extra_granted_roles? Is it correct? So many names...
There was a problem hiding this comment.
Agree, renaming all that to just external_roles
There was a problem hiding this comment.
This part looks strange. What is it for?
There was a problem hiding this comment.
Roles UUIDs might be different on cluster nodes, while names 100% match, so it makes sense to send roles as list of names rather than list of UUIDs.
src/Interpreters/Session.cpp
Outdated
There was a problem hiding this comment.
Probably it's better to check this setting before sending those external roles (and don't send them if it's false).
There was a problem hiding this comment.
This is to address case when originator have access to remote auth provider (like LDAP server), but other nodes in cluster don't.
Sending roles only if `allow_extenral_roles_in_interserver_queries` setting is ON renamed various naming variants of 'additional', 'extra', 'externally granted' to 'external_roles' removed various debugging leftovers minor cleanup
|
Missing tests. |
Could you please mark this as "ready for tests", so we can execute produced binaries against LDAP suite from here: https://github.com/Altinity/clickhouse-regression/tree/main/ldap ? |
|
The tests should run in CI. |
Since it is not meant to be rebuilt by the CI/CD
|
This is an automated comment for commit 558c806 with description of existing statuses. It's updated for the latest CI running
|
Tests for PR 42537
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]>
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Co-authored-by: Enmk <[email protected]> fix memory access
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Push user roles from query originator to other nodes in cluster. Helpful when only originator has access to the external authenticator (like LDAP).
...
closes: #34130