mdeuser commented on a change in pull request #267: --web-secure generated 
integer must be within api gw max int range
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/267#discussion_r179511741
 
 

 ##########
 File path: commands/action.go
 ##########
 @@ -1194,10 +1195,12 @@ func printSavedActionCodeSuccess(name string) {
                        }))
 }
 
-// Generate a random int64 number to be used as a web action's
+// Generate a random number to be used as a web action's require-whisk-auth 
secret
 func genWebActionSecureKey() int64 {
        r := rand.New(rand.NewSource(time.Now().Unix()))
-       return r.Int63()
+
+       // Truncate integer for API GW interoperability
+       return r.Int63() & MAX_JS_INT
 
 Review comment:
   not well.  i think the better validation test might be in the api creation 
(would be a separate pr) to validate this value before using it to create the 
api.
   
   https://github.com/apache/incubator-openwhisk-cli/issues/269

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to