Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon PassThrough Auth系统如何使用DeepSeek-R1在Gloo Gateway中起作用


PassThrough Auth系统如何使用DeepSeek-R1在Gloo Gateway中起作用


Gloo Gateway中的通行身份验证系统旨在通过外部服务对请求进行身份验证,这在与DeepSeek-R1之类的模型集成时可能特别有用。这是其工作原理:

PassThrough Auth概述

Gloo网关中的PassThrough身份验证使您可以利用外部身份验证服务,而无需将其直接集成到Gloo中。这对于保持灵活性并避免使用每个Gloo版本更新[1] [4]进行重新编译插件是有益的。

Passhrough Auth的类型

Gloo Gateway支持两种主要类型的通行身份验证:

1。GRPCPassThrough Auth:这涉及使用实现Envoy的授权服务API的外部GRPC服务。它允许在外部服务中进行自定义逻辑,同时仍使用其他Gloo网关身份验证机制,例如OIDC或API密钥[1] [4]。

2。HTTPPassThrough Auth:此方法使用外部HTTP服务进行身份验证。它提供了与GRPC相似的好处,但使用HTTP协议[1] [8]。

##用DeepSeek-R1实施PassThrough Auth

当将DeepSeek-R1与Gloo Gateway集成时,您可以使用PassThrough身份验证来确保对模型的访问,而无需直接曝光API键。您可以如何实施它:

###实施步骤

1。设置外部身份验证服务:创建将处理身份验证请求的外部身份验证服务(GRPC或HTTP)。该服务应能够验证凭证或代币访问DeepSeek-R1。

2。配置Gloo网关:使用Gloo Gateway的“ authconfig”指向您的外部身份验证服务。对于GRPC,指定GRPC服务的地址,对于HTTP,提供HTTP Auth Server的URL [4] [8]。

3。应用身份验证配置:使用Kubernetes将身份验证配置应用于Gloo Gateway。这涉及创建一个“ authconfig”资源,该资源指定了通行身份验证设置[4] [8]。

4。路线请求:仅在外部服务成功身份验证后,将Gloo Gateway配置为DeepSeek-R1路由。这样可以确保未经授权的请求被阻止。

###好处和考虑因素

- 好处:通过身份验证允许自定义身份验证逻辑,而无需修改Gloo网关本身。它还同时支持多种身份验证方法,例如OIDC以及自定义逻辑[1] [6]。

- 注意事项:虽然PassThrough Auth提供了灵活性,但它引入了额外的网络跳跃,可以增加延迟。此外,如果外部服务失败或耗尽,则可以通过将`failureModeAllow'设置为`true'将GLOO配置为“打开”,即使身份验证失败,也可以继续请求[4] [8]。

deepseek-r1安全性

使用DeepSeek-R1时,实施强大的安全措施对于保护敏感数据并确保合规性至关重要。 Gloo Gateway的通行身份验证可以通过:

- 确保访问:确保仅使用安全的身份验证机制仅授权请求达到DeepSeek-R1。
- 数据保护:实施其他护栏以监视和控制从DeepSeek-R1发送和接收的数据,以确保不损害敏感信息[2] [5]。

通过利用Gloo Gateway的传递身份验证功能,您可以将DeepSeek-R1安全地集成到应用程序中,同时保持对访问和数据流的控制。

引用:
[1] https://docs.solo.io.io/gloo--------/ gguides/guides/security/auth/extauth/extauth/passthrough_auth/
[2] https://www.solo.io/blog/navigating-deepseek-r1-security-conconcerns-and-guardrails
[3] https://devops-scanner.com
[4] https://docs.solo.io.io/gloo--------/ guides/guides/security/auth/extauth/passauth/passthrough_auth/grpc/
[5] https://www.bigdatawire.com/this-just-in/solo-io-io-rease-gloo---------------------------------------------------------------------------------------------------------------
[6] https://docs.solo.io/gloo--mesh-gateway/main/security/external-auth/passthrough/
[7] https://www.solo.io/resources/video/demo-video-navigating-deepseek-r1-security-conconcorns-concorns-and-guardrails
[8] https://docs.solo.io.io/gloo---------/ guides/guides/security/auth/extauth/passauth/passthrough_auth/http/
[9] https://www.together.ai/models/deepseek-r1