Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Authorization] Fix producer/consume permission can’t get v1/schema #16018

Merged
merged 2 commits into from
Aug 22, 2022
Merged

[Authorization] Fix producer/consume permission can’t get v1/schema #16018

merged 2 commits into from
Aug 22, 2022

Conversation

yuruguo
Copy link
Contributor

@yuruguo yuruguo commented Jun 11, 2022

Fixes #12419

Motivation

The pr-#15956 has been fixed the problem that role has producer/consume permission can’t get v2/schema, but it
missed v1/schema. So this pr solves the permission problem to get v1/schema.

Modifications

  • Get v1/schema need GET_METADATA permission

Documentation

  • doc-not-needed

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jun 11, 2022
@yuruguo yuruguo added area/schema release/2.10.1 release/important-notice The changes which are important should be mentioned in the release note labels Jun 11, 2022
@nodece
Copy link
Member

nodece commented Jun 11, 2022

Could you make these methods async?

@yuruguo yuruguo closed this Jun 11, 2022
@yuruguo yuruguo reopened this Jun 11, 2022
@yuruguo yuruguo added this to the 2.11.0 milestone Jun 11, 2022
@codelipenghui
Copy link
Contributor

@yuruguo There is a mailing list for discussing the V1 topic name https://lists.apache.org/thread/t3w9wjjkz4tfl5zwrmj44827vdpk2f4p

I will remove the 2.10.1 label to unblock 2.10.1 release.

@yuruguo
Copy link
Contributor Author

yuruguo commented Jun 12, 2022

@yuruguo There is a mailing list for discussing the V1 topic name https://lists.apache.org/thread/t3w9wjjkz4tfl5zwrmj44827vdpk2f4p

I will remove the 2.10.1 label to unblock 2.10.1 release.

Thanks for your sharing @codelipenghui
In fact, this should belong to the same kind of question, that is, whether to continue to update or maintain the existing problems in the v1 version. And I will continue to track it.

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jul 14, 2022
@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.12.0 Jul 26, 2022
@yuruguo yuruguo merged commit 95c1778 into apache:master Aug 22, 2022
@Jason918
Copy link
Contributor

@yuruguo Can you help cherry-pick this PR to branch-2.10

@yuruguo
Copy link
Contributor Author

yuruguo commented Sep 4, 2022

@yuruguo Can you help cherry-pick this PR to branch-2.10

We can do nothing after #16026 merged, because v1 & v2 schema both use SchemasResourceBase and this problem has
been resolved in SchemasResourceBase.

@Jason918
Copy link
Contributor

Jason918 commented Sep 5, 2022

We can do nothing after #16026 merged, because v1 & v2 schema both use SchemasResourceBase and this problem has
been resolved in SchemasResourceBase.

OK, I will remove release/2.10.2. Thanks.

poorbarcode pushed a commit that referenced this pull request Nov 21, 2023
…16018)

* [Authorization] Fix producer/consume permission can’t get v1/schema

(cherry picked from commit 95c1778)
@poorbarcode
Copy link
Contributor

@yuruguo

This PR also fixed another issue that responds an incorrect HTTP header Content-Encoding. See the detail below:

curl -X GET -H "Content-Type:application/json" http://127.0.0.1:50040/admin/v2/schemas/my-property/my-ns/test-client-version/schema 

{"version":0,"type":"STRING","timestamp":1700539331898,"data":"","properties":{}}                                                                                                                                                                  

HTTP/1.1 200 OK
Date: Tue, 21 Nov 2023 06:33:45 GMT
broker-address: localhost
Content-Encoding: application/json
Content-Type: application/json
Content-Length: 81
Server: Jetty(9.4.51.v20230217)

https://github.com/apache/pulsar/pull/16018/files#diff-4bd0e9058034ada018ee4d5a4e8b950163b851e6933bf22298eb563947d54d2eL361-L362

I cherry-picked this PR into branch-2.11, @yuruguo Could you cherry-pick this PR into branch-2.10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema cherry-picked/branch-2.11 doc-not-needed Your PR changes do not impact docs release/important-notice The changes which are important should be mentioned in the release note release/2.10.7 release/2.11.3 Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust the judgment logic of topic schema operation permissions
10 participants