Grails Spring Security SAML 插件“未找到 SPSSODescriptor”

nia*_*loc 4 grails spring-security saml

我已经配置了 grails saml 插件并加载 SP 元数据文件。当我尝试访问应用程序上受保护的资源时,出现以下错误。我似乎找不到任何有关它的信息。

Metadata for entity testing-app and role {urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor wasn't found

Bur*_*ith 5

我尝试的第一件事(因为它起作用的时间比例令人沮丧)是在 Google 上搜索\xe2\x80\x9cSPSSODescriptor was\t find\xe2\x80\x9d(以及一些变体,但都带有引号以保留它作为一个短语),只有这个问题出现了。似乎查看生成该消息的代码是找出正在发生的情况的最快路径,因此我在插件代码中使用了 GitHub 的代码搜索,但仍然没有成功。谷歌搜索“SPSSODescriptor”(带引号以防止其被分割成较短的术语)有很多结果,但快速扫描后没有任何明显的帮助。

\n\n

仍在寻找代码,我尝试了第一次搜索的轻松版本:saml“wasn\'tfound”\' - 将“wasn\'tfound”放在一起 - 这导致在org.springframework.security.saml.context.SAMLContextProviderImpl春天的类中发现了这段代码 - GitHub 上的 security-saml 项目:

\n\n
if (entityDescriptor == null || ,aa,phrase and thatlead to this a/aibg -psroleDescriptor == null) {\n    throw new MetadataProviderException("Metadata for entity " + localEntityId + " and role " + localEntityRole + " wasn\'t found");\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

和宾果!- 这是插件使用的库。

\n\n

因此,它无法找到本地实体 id“testing-app”所需的<md:SPSSODescriptor>元素(包含在具有命名空间和 urn<md:EntityDescriptor>的描述符元素中,因此是错误消息的时髦部分)。mdurn:oasis:names:tc:SAML:2.0:metadata{urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor

\n\n

如果您查看Wikipedia 文章中的示例消息流,<md:SPSSODescriptor>您会发现如果没有元素中包含的断言消费者服务元数据,您将无法取得进展

\n