Using Tyk as a forward proxy


#1

Imported Google Group message. Original thread at: https://groups.google.com/forum/#!topic/tyk-community-support/o-eFSk-xdGE Import Date: 2016-01-19 21:16:52 +0000.
Sender:Ming Fang.
Date:Sunday, 28 June 2015 04:51:14 UTC+1.

As a api consumer of external vendor apis, I would like to access those api via Tyk acting as a forward proxy.
By funneling all external api access thru a forward proxy, I can leverage Tyk’s analytics and api management capabilities sub as rate limiting.
Most importantly I would like Tyk to manage any secrets needed to connect to the external api such as api keys.
Tyk in the forward proxy role will also manage failover if my vendor provides multiple api endpoints.

Can Tyk act as a forward proxy in the way I describe?

As an example, here is how 3Scale’s APITools can use its middleware ability to authenticate api access with twitter


#2

Imported Google Group message.
Sender:Martin Buhr.
Date:Sunday, 28 June 2015 08:45:33 UTC+1.

By funneling all external api access thru a forward proxy, I can leverage Tyk’s analytics and api management capabilities sub as rate limiting

  • yes this should work, so long as those APIs are defined in Tyk
    Most importantly I would like Tyk to manage any secrets needed to connect to the external api such as api keys.

  • Yes you can do this using either Tyk header injection or custom middleware JSVM

Tyk in the forward proxy role will also manage failover if my vendor provides multiple api endpoints.

  • not currently supported, in an API definition there is one upstream URL

Can Tyk act as a forward proxy in the way I describe?

  • partially

As an example, here is how 3Scale’s APITools can use its middleware ability to authenticate api access with twitter

  • You can do something very similar using our JS middleware stack, in this case you would want a post-processor (one where rate limiting etc has been already applied). There is an example included with Tyk and also docs on the API on the site.

Someone else has asked about multiple upstream URLs, so it may be something we add in in a future version.