yadavvipinsonu commented on issue #2317: wsk api authentication issues
URL: 
https://github.com/apache/incubator-openwhisk/issues/2317#issuecomment-380551450
 
 
   @mdeuser  Thanks for your response!
   
   yes i am working on apache openwhisk backend. 
   
   Below is the error and output that i get when i tried to debug further
   
   [root@cvricapi01 bin]# ./wsk api list -d -v -i
   [-go/whisk.addRouteOptions]:051:[Inf] Adding options 
&{ApiOptions:{ActionName: ApiBasePath: ApiRelPath: ApiVerb: ApiName: 
SpaceGuid:23bc46b1-71f6-4ed5-8c54-816aa4f8c502 AccessToken:DUMMY TOKEN 
ResponseType:} Limit:30 Skip:0 Docs:false} to route 
'web/whisk.system/apimgmt/getApi.http'
   [-go/whisk.addRouteOptions]:076:[Inf] Returning route options 
'web/whisk.system/apimgmt/getApi.http?accesstoken=**DUMMY+TOKEN**&limit=30&skip=0&spaceguid=23bc46b1-71f6-4ed5-8c54-816aa4f8c502'
 from input struct &{ApiOptions:{ActionName: ApiBasePath: ApiRelPath: ApiVerb: 
ApiName: SpaceGuid:23bc46b1-71f6-4ed5-8c54-816aa4f8c502 AccessToken:DUMMY TOKEN 
ResponseType:} Limit:30 Skip:0 Docs:false}
   [/whisk.(*ApiService).List]:329:[Inf] Api GET/list route with api options: 
web/whisk.system/apimgmt/getApi.http?accesstoken=DUMMY+TOKEN&limit=30&skip=0&spaceguid=23bc46b1-71f6-4ed5-8c54-816aa4f8c502
   [k.(*Client).NewRequestUrl]:701:[Inf] basepath: https://172.17.0.1/api, 
version/namespace path: v1, resource path: 
web/whisk.system/apimgmt/getApi.http?accesstoken=DUMMY+TOKEN&limit=30&skip=0&spaceguid=23bc46b1-71f6-4ed5-8c54-816aa4f8c502
   [k.(*Client).addAuthHeader]:298:[Inf] Adding basic auth header; using authkey
   REQUEST:
   [GET]   
https://172.17.0.1/api/v1/web/whisk.system/apimgmt/getApi.http?accesstoken=DUMMY+TOKEN&limit=30&skip=0&spaceguid=23bc46b1-71f6-4ed5-8c54-816aa4f8c502
   Req Headers
   {
     "Authorization": [
       "Basic 
MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
     ],
     "User-Agent": [
       "OpenWhisk-CLI/1.0 (2018-04-09T03:50:54.484+0000)"
     ]
   }
   RESPONSE:Got response with code 404
   Resp Headers
   {
     "Connection": [
       "keep-alive"
     ],
     "Content-Length": [
       "70"
     ],
     "Content-Type": [
       "application/json"
     ],
     "Date": [
       "Wed, 11 Apr 2018 18:26:03 GMT"
     ],
     "Server": [
       "nginx/1.12.2"
     ]
   }
   Response body size is 70 bytes
   Response body received:
   {
     "error": "The requested resource does not exist.",
     "code": 430
   }
   [o/whisk.PrintResponseInfo]:499:[Inf] Response body received (ASCII quoted 
string):
   "{\n  \"error\": \"The requested resource does not exist.\",\n  \"code\": 
430\n}"
   [/whisk.parseErrorResponse]:514:[Inf] HTTP failure 404 + body
   [/whisk.parseErrorResponse]:525:[Inf] HTTP failure 404; server error The 
requested resource does not exist. (code 430)
   [/whisk.(*ApiService).List]:344:[Err] s.client.Do() error - HTTP req 
https://172.17.0.1/api/v1/web/whisk.system/apimgmt/getApi.http?accesstoken=**DUMMY+TOKEN**&limit=30&skip=0&spaceguid=23bc46b1-71f6-4ed5-8c54-816aa4f8c502;
 error 'The requested resource does not exist. (code 430)'
   [whisk-cli/commands/api.go]:526:[Err] 
Client.Apis.List(&whisk.ApiListRequestOptions{ApiOptions:whisk.ApiOptions{ActionName:"",
 ApiBasePath:"", ApiRelPath:"", ApiVerb:"", ApiName:"", 
SpaceGuid:"23bc46b1-71f6-4ed5-8c54-816aa4f8c502", AccessToken:"DUMMY TOKEN", 
ResponseType:""}, Limit:30, Skip:0, Docs:false}) error: The requested resource 
does not exist. (code 430)
   [main.main                ]:068:[Inf] err object type: *whisk.WskError
   [main.main                ]:072:[Err] Got a *whisk.WskError error: 
&whisk.WskError{RootErr:(*errors.errorString)(0xc4202fc6a0), ExitCode:1, 
DisplayMsg:true, MsgDisplayed:false, DisplayUsage:false, DisplayPrefix:true, 
ApplicationError:false, TimedOut:false}
   error: Unable to obtain the API list: The requested resource does not exist. 
(code 430) 
   
   As highlighted access token always comes as DUMMY TOKEN , not sure if this 
correct behavior or if that's causing some issue ? if yes , then how can i 
rectify that. 
   
   I am able to create action with web=true and get the accessible url .
   

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

Reply via email to