Execute Only for Shared Actions#4935
Merged
tysonnorris merged 8 commits intoapache:masterfrom Aug 25, 2020
Merged
Conversation
…bout package binding
Tests merged with PackageActionsApiTests.scala
Tests merged with PackagesApiTests.scala
Member
rabbah
reviewed
Jul 28, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Outdated
Show resolved
Hide resolved
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Outdated
Show resolved
Hide resolved
| val value = entityName.path | ||
| terminate(StatusCode.int2StatusCode(403), s"GET not permitted for '$value' since it's an action in a shared package") | ||
| } else { | ||
| code match { |
Member
There was a problem hiding this comment.
Nit: I'd suggest the simpler/cleaner if (code) { } else { }.
28def2b to
aa845f0
Compare
Changed Flag to shared-packages-execute-only with default value set to false.
aa845f0 to
38880d9
Compare
tysonnorris
reviewed
Aug 7, 2020
common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala
Outdated
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 7, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Outdated
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 7, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 7, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Outdated
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 7, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala
Outdated
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 7, 2020
|
|
||
| /** Here's where I check package execute only case with package binding. */ | ||
| val packagePath = wp.namespace.asString | ||
| val bindingPath = wp.binding.iterator.next().toString |
Contributor
There was a problem hiding this comment.
is wp.binding.iterator guaranteed to not be empty?
Contributor
Author
There was a problem hiding this comment.
Yes, because this code falls within a binding case so binding has to hold some value.
Contributor
There was a problem hiding this comment.
ah not enough context shown in the diff; then I think you can replace wp.binding.iterator.next().toString with b.toString to make this more clear
tysonnorris
reviewed
Aug 11, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 12, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala
Outdated
Show resolved
Hide resolved
tysonnorris
reviewed
Aug 12, 2020
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Outdated
Show resolved
Hide resolved
9d9db52 to
13c7f50
Compare
13c7f50 to
3b0338a
Compare
tysonnorris
added a commit
to adobe-apiplatform/incubator-openwhisk
that referenced
this pull request
Aug 17, 2020
Member
|
thanks for the contribution @bkemburu 🎉 |
This was referenced Aug 27, 2020
tysonnorris
pushed a commit
to adobe-apiplatform/incubator-openwhisk
that referenced
this pull request
Nov 10, 2020
* Initial Commit of Execute Only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Execute Only For Shared Actions/Packages
Shared packages/bindings of shared packages and actions within shared packages/bindings. currently allows both READ and EXECUTE operations for all users of the system. The config option supports EXECUTE-only on shared packages such that the actions within the package are able to be EXECUTED but not READ by users who do not own the namespace. I wrote tests in the PackageApiTests and PackageActionApiTests that verify the functionality of EXECUTE-only
Description
Related issue and scope
My changes affect the following components
Types of changes
Checklist: