rabbah 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_r179643313
 
 

 ##########
 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:
   Why restrict this to a 64 bit int? Shouldn’t it be more generically a string 
of arbitrary length (32 or 64 or 128 characters)? 

----------------------------------------------------------------
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