通过网关实现微服务的auth0安全性

cgfeq70w  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(192)

在我的项目中,我需要使用auth0.com实现安全性来保护各个端点。
目前,我知道如何在没有SpringCloudGateway的情况下实现这个安全性,但是我找不到一个源代码来实现它

- Gateway (run on a server1)
 - Service1 (run on server2) -> all access to endpoints of this application need bearer token
 - Service2 (run on server3) -> 2 endpoint are open and the others need bearer (same that Service1)

起初,我考虑将安全配置放在网关级别,但在这种情况下,我不知道如何与网关进行仅服务对话。
我想确保安全措施得到实施,我们只能通过网关。不能直接在服务上提出请求。
你认为这有可能吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题