1

Essentially I would like to do this (Python) but in 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)

Is crafting a command line call of curl the only path forward?

Luxspes
  • 6,268
  • 2
  • 28
  • 31
  • Why do you expect it to be implemented already? `HTTPotion` has [`ibrowse`](https://github.com/cmullaparthi/ibrowse) as a http backend and the latter does not support any authentication besides `Basic`, AFAIK. – Aleksei Matiushkin Mar 06 '17 at 08:04
  • I don't expect HTTPottion to have it, But I do expect some sort of solution to be available (maybe with some other http client for Elixir or for Erlang that I could use?) – Luxspes Mar 06 '17 at 14:35
  • Is command line invocation of curl truly the only way to have a fully featured http client in elixir/erlang? https://gist.github.com/wolves/3b13903ef8c8322b191c3510334cff90 – Luxspes Mar 06 '17 at 14:45
  • 1
    You might consider contributing to the community by extending any http client to support Kerberos. That is how open sourse lives. – Aleksei Matiushkin Mar 06 '17 at 14:55
  • I might. Does that mean you know for a fact Kerberos is not (currently) supported in the Elixir/Erlang ecosystem? – Luxspes Mar 06 '17 at 14:59
  • 2
    Well, I know that there are no widely known implementations, that said, nothing that would be robust enough. Elixir is not yet as mature as say Perl. I believe, there could be erlang implementations, but there is nothing I could duckduckgo in a matter of minutes. We all would appreciate your effort, if any :) – Aleksei Matiushkin Mar 06 '17 at 15:10
  • 2
    After all, that would be an implementation you will 100% in trust with. – Aleksei Matiushkin Mar 06 '17 at 15:11

1 Answers1

2

This library claims to support SPNEGO, which is what is required for kerberos based http. I have no idea how well it actually works.

https://github.com/mikma/egssapi

It's pretty old, but SPNEGO and kerberos API's haven't changed much in the last 7 years.

As a general rule, unless the underlying library driving the web connection is libcurl, SPNEGO is not well supported in most languages. Java and C are pretty much it when it comes to robust working kerberos implementations; the easier it is for the language to interact with those libraries, the more likely kerberos support will be available.