mdeuser commented on a change in pull request #3388: Update require-whisk-auth behavior to secure web action URL: https://github.com/apache/incubator-openwhisk/pull/3388#discussion_r172189903
########## File path: core/controller/src/main/scala/whisk/core/controller/WebActions.scala ########## @@ -483,7 +483,24 @@ trait WhiskWebActionsApi extends Directives with ValidateRequestSize with PostAc provide(fullyQualifiedActionName(actionName)) { fullActionName => onComplete(verifyWebAction(fullActionName, onBehalfOf.isDefined)) { case Success((actionOwnerIdentity, action)) => - if (!action.annotations.getAs[Boolean]("web-custom-options").exists(identity)) { + val requireWebAuthIsBool = (action.annotations.getAs[Boolean]("require-whisk-auth") != None) + val annotationRequireWebAuthIsIntOrString = ((action.annotations + .getAs[String]("require-whisk-auth") != None) || (action.annotations + .getAs[Int]("require-whisk-auth") != None)) + val annotationRequireWebAuth = (action.annotations + .getAs[Int]("require-whisk-auth") + .getOrElse(action.annotations.getAs[String]("require-whisk-auth").getOrElse(""))) + .toString Review comment: i like it :+1: ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services