Enhancement to microgateway to customize an auth style plugin

I came across a shortcoming of edgemicro custom plugins where standard plugins do not have access to Apigee Edge properties which are pulled periodically and updated.

Properties such as: product_to_proxy (matches products to proxies), or the public_key are passed to auth proxies such as oauth and apikeys plugins.

Our organization's use case requires us to customize the default behavior of these plugins.

I have come up with a way to add in the name of the custom auth plugin in the config and for these properties to be added to the config object of that plugin.

So the steps to use this enhancement would be to:
1. Add the name of a custom plugin you would like to have this config added in config.yaml
under edgemicro.plugins.custom_auth

edgemicro:
  plugins:
    sequence:
      - my_custom_auth_plugin
    custom_auth: my_custom_auth_plugin

2. Use the additional properties in your plugin similar to the default plugins (https://github.com/apigee/microgateway-plugins/blob/master/apikeys/index.js#L231)
Or use one of these plugins as a base and modify as required.

I am looking for some feedback on this enhancement and if it would be useful to other users of microgateway.

I already have a github issue and pull request pending if this change is beneficial to the community.

https://github.com/apigee/microgateway-config/issues/50
https://github.com/apigee/microgateway-config/pull/51

Thanks

1 2 320
2 REPLIES 2

Nice work. I'm sure people will be interested in looking at this.

babuk0930
Participant III
@srinandans

@Srinandan Sridhar

Could you please let us know why this pull was reverted back. As currently we have similar use case