apisix icon indicating copy to clipboard operation
apisix copied to clipboard

request help: How does apisix support two ways certificate of upstream service such as auth?

Open souzens opened this issue 5 years ago • 5 comments

Issue description

We have a problem, there is a certification auth service needs to be a two-way client certificate verification, the traditional approach is to provide a certificate issued by the application itself and provide HTTPS service, but as the upstream, the certificate validation https request is currently unity process by apisix , and then pass the request transparently to the upstream service.

The problem caused by this the certificate on APISIX and the certificate issued by the auth authentication service may not be the same set of certificates, and it is not suitable to put the certificate on apisix for management.

The method I thought of: One is to transfer the request directly to the upstream service through apisix's tcp transparent transmission The second is that instead of using apisix, use slb to forward tcp requests to upstream services

Can APISIX pass the request directly to the back end without verifying the certificate? Is there a better way?

Environment

  • apisix version (cmd: apisix version): 2.4
  • OS (cmd: uname -a): k8s
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API): 3.4.9
  • apisix-dashboard version, if have: 2.5
  • luarocks version, if the issue is about installation (cmd: luarocks --version):

souzens avatar Apr 22 '21 08:04 souzens

If APISIX supports upstream mTLS, it should solve your problem, right? For example this PR: https://github.com/apache/apisix/pull/4005

Firstsawyou avatar Apr 22 '21 09:04 Firstsawyou

If APISIX supports upstream mTLS, it should solve your problem, right? For example this PR: #4005

Now we temporarily use the route of openshift to solve this problem, mainly using the passthough feature of route, which is directly transmitted to the backend service.

and apisix and support passthough feature like openshift route?

OpenShift passthrough route:这种 route 的 SSL 连接不会在 router 上被 TLS 终止(termination),而是router 会将 TLS 链接透传到后端。下文有解释。 passthrough:加密网络包直接被发给 pod,router 上不做TLS 终结,因为不需要在 router 上配置证书或密钥。

souzens avatar Apr 26 '21 03:04 souzens

You can try the stream proxy http://apisix.apache.org/docs/apisix/stream-proxy.

tokers avatar Apr 26 '21 15:04 tokers

This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Apr 12 '22 11:04 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Apr 27 '22 10:04 github-actions[bot]