Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

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 1,108
2 REPLIES 2