简体   繁体   English

如何使用Elixir(或Erlang)向受Kerberos保护的站点发出HTTP GET请求?

[英]How do I make a HTTP GET request to a Kerberos protected site using Elixir (or Erlang)?

Essentially I would like to do this ( Python ) but in Elixir: 本质上,我想这样做( Python ),但在Elixir中:

import requests
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
kerberos_auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)
r = requests.get("http://example.org", auth=kerberos_auth)

I know I can just do : 我知道我可以做到

HTTPotion.get "http://example.org"

But I cannot find an example (with HTTPotion or any other Elixir library) that supports kerberos negotiation for Elixir (or Erlang) 但是我找不到一个示例(使用HTTPotion或任何其他Elixir库)来支持Elixir(或Erlang)的kerberos协商。

Is crafting a command line call of curl the only path forward? 编写curl的命令行调用是前进的唯一途径吗?

This library claims to support SPNEGO, which is what is required for kerberos based http. 该库声称支持SPNEGO,这是基于kerberos的http所必需的。 I have no idea how well it actually works. 我不知道它的实际效果如何。

https://github.com/mikma/egssapi https://github.com/mikma/egssapi

It's pretty old, but SPNEGO and kerberos API's haven't changed much in the last 7 years. 它已经很老了,但是SPNEGO和kerberos API在过去7年中变化不大。

As a general rule, unless the underlying library driving the web connection is libcurl, SPNEGO is not well supported in most languages. 通常,除非驱动Web连接的基础库是libcurl,否则大多数语言都不能很好地支持SPNEGO。 Java and C are pretty much it when it comes to robust working kerberos implementations; 就健壮的kerberos实现而言,Java和C差不多了。 the easier it is for the language to interact with those libraries, the more likely kerberos support will be available. 语言与这些库进行交互的越容易,就越有可能使用kerberos支持。

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

相关问题 如何使用 Erlang 执行 HTTPS 请求? - How do I do an HTTPS request with Erlang? 如何通过HTTPS从Erlang发出对Cloudant的GET请求 - How to make a GET request to Cloudant from Erlang over HTTPS 在网站上使用SSL后,如何在网址栏中显示https而不是http - How do I display https instead of http in url bar after using SSL on my site 如何使用 php Http_Request2() 发出 https 请求 - how to make https request using php Http_Request2() 我如何使用带有请求或任何内容的node.js通过HTTP代理通过https获取数据 - how do i use node.js with request or anything to get data over https through a http proxy 如何从 HTTPS 网站发出 HTTP 请求? - How can I make an HTTP request from an HTTPS website? 我该如何发出与其他方竞争并试图成为最快方的HTTPS GET请求? - How do I make a HTTPS GET Request that competes against other parties and tries to be the fastest? 如何使用Python对此发出HTTPS请求? 并取回ACCESS_TOKN? - How do I use Python to make a HTTPS request to this? and get the ACCESS_TOKN back? 我的网站是https,现在我想包含http的iframe,那么如何才能仅通过https创建一个页面。 - My site is https, now i want to include iframe that are http, so how can i make a page only http from https. 如何从HTTPS对HTTP时间服务器站点进行Ajax调用? - How can I make an Ajax call to an HTTP time server site from HTTPS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM