Does edge microgateway Oauth support company apps?

I have Oauth working with Consumer Key for my micro gateway using a developer app credentials. I I created a company applicaiton with access to my Micro Gateway proxy but getting a 403 forbidden. Wondering if anyone else has tried using a company app consumer key with success?

Company app details:

{ "accessType" : "", "appFamily" : "default", "appId" : "eaae9a22-3729-45bc-9521-ed2074f4f9bd", "attributes" : [ { "name" : "troux-app-name", "value" : "SteveCompanyapp1" }, { "name" : "troux-app-id", "value" : "07CCB5FB-9993-4A75-93BD-04F2880E0DC7" }, { "name" : "support_email", "value" : "steven.boyatsis@libertymutual.com" } ], "callbackUrl" : "", "companyName" : "stevedevcompany", "createdAt" : 1508162909031, "createdBy" : "steven.boyatsis@libertymutual.com", "credentials" : [ { "apiProducts" : [ { "apiproduct" : "SteveMicroTEST", "status" : "approved" } ], "attributes" : [ ], "consumerKey" : "WJZ4syOId99QI1G6RpYlYu6MEfsWt7dL", "consumerSecret" : "redacted", "expiresAt" : -1, "issuedAt" : 1508163397346, "scopes" : [ ], "status" : "approved" }, { "apiProducts" : [ { "apiproduct" : "SteveMicroTEST", "status" : "approved" } ], "attributes" : [ ], "consumerKey" : "rlP7SLKfjGlf3fDBFbOybxH7e8qLl4or", "consumerSecret" : "redacted", "expiresAt" : -1, "issuedAt" : 1508162909044, "scopes" : [ ], "status" : "approved" } ], "lastModifiedAt" : 1508163397336, "lastModifiedBy" : "steven.boyatsis@libertymutual.com", "name" : "SteveCompanyapp1", "scopes" : [ ], "status" : "approved" }

With company app key

curl -i http://localhost:8000/edgemicro_steve_proxy/ -H "x-api-key: WJZ4syOId99QI1G6RpYlYu6MEfsWt7dL" HTTP/1.1 403 Forbidden content-type: application/json Date: Mon, 16 Oct 2017 15:21:07 GMT Connection: keep-alive Content-Length: 69 Proxy-Connection: keep-alive {"error":"access_denied","error_description":"Internal Server Error"}

With developer app key

curl -i http://localhost:8000/edgemicro_steve_proxy/ -H "x-api-key: Ronbx6MFg6v7wHCDNvrBrYuZI49Xlw7U" HTTP/1.1 200 OK access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept access-control-allow-origin: * content-type: application/json; charset=utf-8 date: Mon, 16 Oct 2017 15:22:47 GMT etag: W/"1d-CimmYnaaaxXpCA1NOWDWGTqTk2g" server: Apigee Router x-powered-by: Express x-vcap-request-id: 697577b4-f961-41d4-5648-c1dec959535b, 86a09d94-1f21-4dce-6889-b2213a63a636 x-response-time: 1015 Connection: keep-alive Transfer-Encoding: chunked Proxy-Connection: keep-alive {"hello":"hello from cf app"}

Debug micro gateway server logs:

gateway:main selected proxy https://steveapi.sandbox.paas.lmig.com with base path /edgemicro_steve_proxy for request path /edgemicro_steve_proxy/ +2m gateway:main sourceRequest +2ms a18fa670-b285-11e7-b284-9168a6e09c7a GET /edgemicro_steve_proxy/ plugin:oauth api key cache miss WJZ4syOId99QI1G6RpYlYu6MEfsWt7dL +2m plugin:oauth verify apikey access_denied +318ms plugin:oauth auth failure 403 access_denied Internal Server Error { host: 'localhost:8000', 'user-agent': 'curl/7.54.0', accept: '*/*', 'proxy-connection': 'Keep-Alive', 'x-api-key': 'WJZ4syOId99QI1G6RpYlYu6MEfsWt7dL', connection: 'keep-alive', client_received_start_timestamp: 1508167266904 } GET /edgemicro_steve_proxy/ +0ms gateway:errors access_denied +324ms analytics flushing 1 records. 0 records remaining. +211ms gateway:main selected proxy https://steveapi.sandbox.paas.lmig.com with base path /edgemicro_steve_proxy for request path /edgemicro_steve_proxy/ +3m gateway:main sourceRequest +3ms d2c46410-b285-11e7-981a-8b2dbff8effa GET /edgemicro_steve_proxy/ plugin:oauth api key cache miss Ronbx6MFg6v7wHCDNvrBrYuZI49Xlw7U +3m plugin:oauth product only: false +200ms plugin:oauth matches proxy rules: /edgemicro_steve_proxy/ +1ms plugin:oauth api key cache store Ronbx6MFg6v7wHCDNvrBrYuZI49Xlw7U +0ms gateway:main targetRequest +207ms d2c46410-b285-11e7-981a-8b2dbff8effa GET steveapi.sandbox.paas.lmig.com NaN / gateway:main plugin healthcheck does not provide handler function for end_request +3ms gateway:main plugin oauth does not provide handler function for end_request +1ms gateway:main targetResponse +801ms d2c46410-b285-11e7-981a-8b2dbff8effa 200 gateway:main plugin oauth does not provide handler function for response +0ms gateway:main plugin healthcheck does not provide handler function for response +0ms gateway:main [ null, null, null ] +0ms gateway:main req data +4ms 29 gateway:main plugin oauth does not provide handler function for data_response +0ms gateway:main plugin healthcheck does not provide handler function for data_response +0ms gateway:main plugin analytics does not provide handler function for data_response +0ms gateway:main plugin oauth does not provide handler function for end_response +1ms gateway:main plugin healthcheck does not provide handler function for end_response +0ms analytics flushing 1 records. 0 records remaining. +1s

Thanks.

0 3 253
3 REPLIES 3

Former Community Member
Not applicable

No, company apps are not currently supported by MG

Thanks. I don't this this will be an issue for us in the short term. We are looking to use company and company apps for our private cloud environment to create entities at our organizational levels within our company . Do you know have plans to support that in future? Rough time frame?

Former Community Member
Not applicable

Steve, I tried API Key and OAuth. It seems to work for me. Perhaps there is something else on your setup that is causing the problem.