jerrypeng commented on a change in pull request #4241: [pulsar-function] fix
backward compatibility with 2.2 auth not working
URL: https://github.com/apache/pulsar/pull/4241#discussion_r283154512
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
##########
@@ -1510,8 +1516,15 @@ public void uploadFunction(final InputStream
uploadedInputStream, final String p
}
}
- public StreamingOutput downloadFunction(final String path) {
+ public StreamingOutput downloadFunction(final String path, String
clientRole) {
+ if (worker().getWorkerConfig().isAuthorizationEnabled()) {
+ // skip authorization if client role is super-user
+ if (!isSuperUser(clientRole)) {
Review comment:
@rdhabalia this is not correct. This means that only super users will be
able to download jars. Currently, for the kubernetes runtime, we are relying
on this API to download the JARs into containers. We shouldn't restrict this
to only super users, we should come up of a way for users to have ACLs to what
they can or cannot download.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services