[fix][admin] Fix producer/consume permission can’t get schema - #15956
Conversation
|
I suggest introduce the |
| } | ||
|
|
||
| @Test | ||
| public void testGetCreateDeleteSchema() throws Exception { |
There was a problem hiding this comment.
Just a trivial suggestion, maybe we could add a data provider to test different cases.
There was a problem hiding this comment.
Ah, because there are tests to cover no auth case, so this test only enables auth to test the right permission.
|
@nodece It seems that the |
yes, right. So use |
|
OK |
|
This is an important security related change. |
|
@eolivelli It should be a bug. From the binary protocol, the And, only the tenant admin can get schema is unreasonable. It looks like the PR fixed a BUG that |
|
@Technoboy- @eolivelli @codelipenghui This pr should be related to issue12419 and the problem to be solved is that |
#16026) Cherry-pick #15956. ### Motivation Currently, we need admin permissions to operate the schema API. This is because the admin permission was defined when the schema API was first added. See #1381. Later, then adding authentication granularity with #6428, we don't change the schema API part. So leave the admin permission today. But the binary protocol allows the produce/consume permission to get the schema, so change the related method permission to `produce/consume`.
…#15956) (apache#16026) Cherry-pick apache#15956. ### Motivation Currently, we need admin permissions to operate the schema API. This is because the admin permission was defined when the schema API was first added. See apache#1381. Later, then adding authentication granularity with apache#6428, we don't change the schema API part. So leave the admin permission today. But the binary protocol allows the produce/consume permission to get the schema, so change the related method permission to `produce/consume`. (cherry picked from commit f3b4e86)
|
This PR also needs to cherry-pick to branch-2.9. |
Done. |
Motivation
Currently, we need admin permissions to operate the schema API. This is because the admin permission was defined when the schema API was first added. See #1381.
Later, then adding authentication granularity with #6428, we don't change the schema API part. So leave the admin permission today.
But the binary protocol allows the produce/consume permission to get the schema, so change the related method permission to
produce/consume.Modifications
get schemaneedGET_METADATApermissionDocumentation
doc-not-needed(Please explain why)