如何为不是来自 tyk 的呼叫保护远程 api? [英] How to secure remote api for calls not coming from tyk?

查看:29
本文介绍了如何为不是来自 tyk 的呼叫保护远程 api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道保护远程 api 以供 tyk 使用的最佳方法是什么.

I want to know what is the best way to secure a remote api for use by tyk.

让我解释一下:

当代理 tyk 完成调用时,它是安全的,因为它需要一个令牌或其他.

When a call this done by the proxy tyk it is secure because it takes a token or other.

现在,如果我想直接调用远程 API 而无需通过 tyk 代理,则会出现问题,因为不需要令牌或其他.

Now if I want to make calls directly to the remote API without going through the tyk proxy there is a problem because there is no need for token or other.

如何保护不是来自 tyk 的调用的远程 api?

How to secure remote api for calls not coming from tyk ?

推荐答案

可能最简单的方法是在网络级别执行此操作,本质上是将 Tyk 实例的 IP 列入防火墙中的白名单并阻止所有其他流量.只有这样,通过 Tyk 发送的流量才能访问您的上游 API.

Probably the simplest way to do this would be at the network level, essentially by whitelisting your Tyk instance's IP in your firewall and blocking all other traffic. That way only, traffic sent via Tyk will be able to access your upstream API.

另一种保护 API 访问的方法是将标头注入通过 Tyk 发送的请求中,以便可以执行检查以确保收到的任何请求都包含正确的标头.

Another way to secure access to your API would be to inject a header into requests sent via Tyk so that a check can be performed to ensuring that any requests received contain the correct header.

这篇关于如何为不是来自 tyk 的呼叫保护远程 api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆