[Broker] Adjust the validation for policy schemaCompatibilityStrategy - #14061
[Broker] Adjust the validation for policy schemaCompatibilityStrategy#14061codelipenghui merged 2 commits intoapache:masterfrom yuruguo:schema_compatibility_strategy_policy_should_use_validateTopicPolicyOperation
Conversation
eolivelli
left a comment
There was a problem hiding this comment.
Lgtm
CN you please remember me the PIP in which we are changing all the permissions?
@eolivelli Sorry, I should make a PIP for #13297. Do we need to make PIR for these changes? |
|
I mean that during the past months I have seen many patches around permission validation. |
|
Could we add a test for this? |
|
@yuruguo The change looks good to me, could you please help add a test? |
|
@eolivelli We don't have a release that contains #13297, so it will not have a big impact on security. The issue is #13297 implementation does not follow the current topic policy permission handling way.
😭, looks this is a feature #6428 that was added almost 2 years ago, and no PIP there. |
|
@codelipenghui @315157973 @gaoran10 The test has added and PTAL again, thx! |
|
After checking the current implementation, looks like the PolicyName and PolicyOperation are only for the exception messages, only the tenant admin can access the topic policies. |
Motivation
In #13297, We should not add
GET_SCHEMA_COMPATIBILITY_STRATEGYandSET_SCHEMA_COMPATIBILITY_STRATEGYtopic operation and complete the permission check on policy schemaCompatibilityStrategy by methodvalidateTopicOperationAsync(), because schemaCompatibilityStrategy is a topic policy not a topic operation, we should use methodvalidateTopicPolicyOperation()to complete.Documentation
no-need-doc