EMG Configuration with proxy Tag failing api-key validation

I have configured my EMG to use only ony Proxy as below

 plugins:
    sequence:
      - oauth
  proxies:
    - edgemicro_helloword
oauth:
  allowNoAuthorization: false
  allowInvalidAuthorization: false
  verify_api_key_url: 'https://hpcorp-stage.apigee.net/edgemicro-auth/verifyApiKey'

When I do the apikey validation , all the call fails . Further investigating I found when I set the proxy tag in EMG config file the node js config object created at the starting of the emg startup does not contain product api resource and proxynnames.. below is the trace of my config object with proxy tag in the config file ..

With Proxy configuration:


{


 
  "allowNoAuthorization":
false,


 
"allowInvalidAuthorization": false,


 
"verify_api_key_url": "https://hpcorp-stage.apigee.net/edgemicro-auth/verifyApiKey",


  "public_key":
"-----BEGIN
CERTIFICATE-----\nMpubkey\n-----END
CERTIFICATE-----",


  "product_to_proxy": {},


  "product_to_api_resource": {},


  "key":
"xxx",


  "secret":
"xxx"


}



Without proxy tag in the EMG configuration I get below

Without Proxy configuration:


 


{



 
"allowNoAuthorization": false,


 
"allowInvalidAuthorization": false,


 
"verify_api_key_url": "https://hpcorp-stage.apigee.net/edgemicro-auth/verifyApiKey",


  "public_key":
"-----BEGIN
CERTIFICATE-----\npubkeyn-----END
CERTIFICATE-----",


 
"product_to_proxy": {


   


    "MPS-HPTCOe
API Product": [


     
"/hpcorp-mps/api/",


     
"/hpcorp-mps/mps/oauth/",


     
"/hpcorp-mps/tcoe/**",


     
"/hpcorp-mps/mps/oauth/**",


     
"/hpcorp-mps/api/**",


     
"/hpcorp-mps/tcoe/"


    ]


  },


  "key":
"xxx",


  "secret":
"xxx"


}


 
1 2 264
2 REPLIES 2

Hi @krishnaprasadm,

It looks like the proxy you entered under "proxies" might be misspelled in your config file. This would result in no proxies being downloaded.

proxies:
    - edgemicro_helloword

maybe should be:

proxies:
    - edgemicro_helloworld

Will

No that is my proxy helloword :). No matter prioxy mispelled why product product arrays ste empty ..!