Shibboleth 和 .NET

发布于 2024-08-02 18:26:02 字数 85 浏览 4 评论 0 原文

我需要 ASP.NET Web 应用程序使用 Shibboleth 进行身份验证。以前有人这样做过吗?是否有库支持方法调用?或者这是 Java 独有的东西?

I've got a requirement that a ASP.NET web app use Shibboleth for the authentication. Has anyone done this before? Are there libraries out there to support the method calls? Or is this a Java only thing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情魔剑神 2024-08-09 18:26:02

这绝对不仅仅是 Java 的东西,Shibboleth 网站上有一个 Apache 模块可供下载。

我不知道是否有任何特定于.NET 的内容。

我们不久前实现了 Shibboleth,最初尝试使用 Java 解决方案 - 这是一场噩梦。 Java 应用程序编写得很糟糕,有很多错误,而且文档也很糟糕。麻烦不断,我们最终决定在专用服务器上使用 Apache 模块,并将成功验证的用户转发到我们的 Tomcat 应用程序上。
Apache 模块的安装、配置和工作非常简单。

不知道您是否已经意识到,Shib 文档和网站非常难以浏览 - 寻找任何有用的信息都是一场斗争。我确实去那里寻找 .NET 实现,但放弃了!

如果我们的 Java 经验可以作为参考,我会认真建议您设置一个安装了 Shibboleth 模块的 Apache 服务器,这样可以避免您陷入痛苦的世界。

这是一个很好的网站,用于在设置好 Shibboleth 安装后对其进行测试: http:// www.testshib.org/testshib-two/index.jsp

如果您确实找到了一个好的.NET 解决方案,那么我将非常有兴趣了解它。祝你好运!

It's definitely not a Java-only thing, there's an Apache module available for download on the Shibboleth site.

I don't know if there's anything specific for .NET.

We implemented Shibboleth a while back and we originally tried to use the Java solutions - it was a nightmare. The java apps were badly-written, buggy and badly documented. It was hassle after hassle and we eventually decided to use the Apache module on a dedicated server and forward successfully authenticated users onto our Tomcat app.
The Apache module was a breeze to setup, configure and get working.

Don't know if you've already realised but the Shib documentation and website are incredibly hard to navigate - it's a fight to find any useful information. I did go and look for a .NET implementation on there but gave up!

If our Java experiences are anything to go by I would seriously suggest setting up an Apache server with the Shibboleth module installed and saving yourself a world of pain.

This is a good site for testing your Shibboleth install once you have it set up: http://www.testshib.org/testshib-two/index.jsp

If you do find a good .NET solution then I'd be very interested to hear about it. Good luck!

陪你搞怪i 2024-08-09 18:26:02

我知道这是一个非常古老的问题,但我认为我可以为那些从谷歌寻找答案的人做更好的扩展。

正如上面所建议的,您确实想要配置 Web 服务器来加载模块。 shibboleth 的困难部分是配置文件,但假设您组织中的其他人已经使用了 shibboleth,您可以使用他们的模板作为模板,并且它相当简单。

对于基于 .NET 的身份验证,您需要在 IIS 中配置 Shibboleth。 IIS 的默认配置创建一个名为 /secure 的目录,放置在该目录下的任何内容都需要 shibboleth 身份验证(即,它将重定向到身份提供者)。您可以将其配置为覆盖其他目录,甚至可以进行延迟身份验证。

一旦您完成了身份验证,您就可以检查标头以“读取”身份提供商传递给您的信息。 IIS 处理事情的方式与 Apache 略有不同,但仍然相当简单。如果您只想要用户名,您可以使用 HTTP_REMOTEUSER,尽管可能有更好的选择;即俄亥俄州立大学建议使用eduPersonPrincipalName

I know this is a really old question, but I thought I might be able to do a bit better expanding for those who are finding the answers from Google.

As recommended above, you really want to configure your web server to load a module. The hard part of shibboleth is the configuration file, but assuming some one else in your organization has utilized shibboleth you can use theirs as a template and its fairly easy.

For .NET based authentication, you'll need to configure Shibboleth in IIS. The default configuration for IIS creates a directory called /secure, and anything put under there will require shibboleth authentication (i.e. it will redirect to the identity provider). You can configure it to cover other directories or even do lazy authentication.

Once you have the authentication piece in place, you can check headers to "read" the information the identity provider is passing to you. IIS handles things a bit differently then Apache, but its still pretty easy. If you just want username you could use HTTP_REMOTEUSER although there could be better options; i.e. Ohio State University recommends using the eduPersonPrincipalName.

方觉久 2024-08-09 18:26:02

正如 MatthewMartin 所说,Shibboleth 只是一个 SAML 服务器,Windows Identity Foundation 支持 SAML,如此博客文章

As MatthewMartin says Shibboleth is just a SAML server, Windows Identity Foundation supports SAML as explained in this blog post.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文