简体   繁体   English

Spring 带 SAML 的云网关

[英]Spring Cloud Gateway with SAML

I want to use Spring Cloud Gateway with SAML.我想将 Spring 云网关与 SAML 一起使用。 Is this possible?这可能吗? It seems that the Saml extension for spring security is based on the old Spring Stack and won't work with Gateway. spring 安全性的 Saml 扩展似乎基于旧的 Spring 堆栈,不适用于网关。

Has anybody got any experience on this?有没有人有这方面的经验?

I'm afraid SAML is not supported as of time of writing.恐怕在撰写本文时不支持 SAML。 Spring Cloud Gateway has been redeveloped using Reactive programming and is now based on Spring WebFlux. Spring 云网关已使用响应式编程重新开发,现在基于 Spring WebFlux。 Only the following authentication methods are currently supported:当前仅支持以下身份验证方法:

  1. OAuth 2.0 or OpenID Connect 1.0 OAuth 2.0 或 OpenID Connect 1.0
  2. x509 authentication x509 认证

This is stated on SCG page :这在SCG 页面上有说明:

Spring Cloud Gateway is built on Spring Boot 2.x, Spring WebFlux, and Project Reactor. Spring 云网关基于 Spring Boot 2.x、Spring WebFlux 和 Project Reactor 构建。 As a consequence, many of the familiar synchronous libraries (Spring Data and Spring Security, for example) and patterns you know may not apply when you use Spring Cloud Gateway.因此,许多熟悉的同步库(例如 Spring Data 和 Spring Security)和您知道的模式在您使用 Spring 云网关时可能不适用。 If you are unfamiliar with these projects, we suggest you begin by reading their documentation to familiarize yourself with some of the new concepts before working with Spring Cloud Gateway.如果您不熟悉这些项目,我们建议您在使用 Spring 云网关之前先阅读他们的文档以熟悉一些新概念。

The previous gateway spring-cloud-netflix-zuul , based on Servlets and which supported SAML, has been removed from Spring Cloud 2020 .之前的网关spring-cloud-netflix-zuul基于 Servlets 并支持 SAML,已从Spring Cloud 2020中删除。

Here is an open issue on GitHub, SAML2 for reactive environment , where we can vote for asking for this to be implemented. 是关于 GitHub 的一个未解决问题, SAML2 用于响应式环境,我们可以在其中投票要求实现这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM