如何从我自己的应用程序与 kerberos 服务器交互

发布于 2024-07-10 22:55:27 字数 320 浏览 4 评论 0原文

我的网络有一个用于用户名/密码身份验证的 kerberos 服务器。 运行我的应用程序的计算机具有正常运行的 kerberos 客户端,因此用户可以使用 kinit 等。

如何从我自己的自定义应用程序以编程方式与服务器交互? 示例的首选语言是 C。

我希望应用程序的用户在访问某些功能之前先针对 kerberos 服务器进行身份验证。 我预计必须向他们询问用户名和密码 - kinit 可能尚未被调用。

托管应用程序的计算机运行 OS X 和 Debian/Linux。

我相信答案很可能涉及 GSSAPI。 如果是这样,有很好的教程吗?

My network has a kerberos server for username/password authentication. Machines that run my application have functioning kerberos clients, so users can use kinit, etc.

How do I interact with the server programatically, from my own custom applications? The preferred language for an example is C.

I want users of my application to authenticate against a kerberos server before access to certain functions. I anticipate having to ask them for their username and password - kinit may not have been called.

The machines hosting the applications run OS X and Debian/Linux.

I believe the answer might well involve GSSAPI. If so, are there good tutorials for this?

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

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

发布评论

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

评论(3

小…楫夜泊 2024-07-17 22:55:27

Sun 在他们的书中介绍了这一点Solaris 开发人员安全指南。 对您特别有帮助的可能是 附录 A -基于 C 的 GSSAPI 程序示例章节5 - GSS-API 客户端示例

Sun covers this in their book Solaris Security for Developers Guide. Specifically helpful to you will probably be Appendix A - Sample C-based GSSAPI programs and Chapter 5 - GSS-API Client Example.

鸵鸟症 2024-07-17 22:55:27

看看 Heimdal,他们有一个广泛的 kerberos API,下面的站点有一个很棒的 doxygen 安装,描述了该 API。

http://www.h5l.org

Have a look at Heimdal, they have an extensive kerberos API, and the site below has a great doxygen install that describes the API.

http://www.h5l.org

本王不退位尔等都是臣 2024-07-17 22:55:27

GSSAPI 确实是推荐的方法,但具体细节取决于您的语言环境以及是否需要与 Windows 进行互操作。 您的 kerberos 提供商是 Windows 还是其他?

在 Windows 上,Kerberos 是操作系统支持的本机协议,许多高级 Win32 API 将有效地免费为您提供它。 使其与非 Windows kerberos 服务器互操作是可能的,但并非易事。

在 UNIX 上,您可能首先需要安装 kerberos 客户端支持并使其正常工作 - 但如果您的网络已经有 kerberos 服务器,那么这可能已经为您完成了。

Windows 与 Java 一样包含 GSSAPI 的实现,并且大多数 UNIX 风格都有一个实现。 我相信 GSSAPI 插件也适用于 PHP。

如果您可以根据您的要求添加更多细节,我可以稍微确定一下这个答案。

GSSAPI is indeed the recommended approach, but the precise details will depend on your language environment and whether you need interop with Windows. Is your kerberos provider Windows or something else?

On Windows, Kerberos is a native protocol supported by the OS, and many high level Win32 APIs will effectively give you it for free. Making it interop with a non Windows kerberos server is possible but not trivial.

On UNIX, you may first need to install kerberos client support and get that working - but if your network already has a kerberos server, this may have been done for you already.

Windows includes an implementation of GSSAPI as does Java, and most UNIX flavors have an implementation. I believe GSSAPI addons are available for PHP also.

If you can add more specifics on your requirements I can firm this answer up a bit.

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