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

Improve and add authorization to function download and upload #4644

Merged
merged 4 commits into from
Jul 2, 2019

Conversation

jerrypeng
Copy link
Contributor

Motivation

Currently, the download and upload function endpoints do not have any authorization which allows any authenticated user to download or upload anything.

Modifications

For the existing download or upload endpoints, only allow superUsers be able to access these endpoints.

Add a download endpoint with authorization that allows users to download function package. The endpoint takes parameters tenant, namespace, and name. Then the latest function package will be returned.

Allow pulsar-admin to use that endpoint as well.

Change KubernetesRuntime to use that as well

Not sure why we have an upload endpoint. Not really used anywhere. We should probably just remove it in the future.

@jerrypeng jerrypeng added this to the 2.4.1 milestone Jun 30, 2019
@jerrypeng jerrypeng self-assigned this Jun 30, 2019
@jerrypeng
Copy link
Contributor Author

rerun java8 tests

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@merlimat merlimat merged commit 20cf739 into apache:master Jul 2, 2019
easyfan pushed a commit to easyfan/pulsar that referenced this pull request Jul 26, 2019
…e#4644)

* Improve and add authorization to function download and upload

* cleaning up

* fix bug
jiazhai pushed a commit that referenced this pull request Aug 28, 2019
* Improve and add authorization to function download and upload

* cleaning up

* fix bug

(cherry picked from commit 20cf739)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants