-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL authentication not working #16
Comments
This is expected behavior. A mountpoint can be anything, actually. Even a static file. |
ok, what about the error then? |
Source connections are either |
Well, beside a
And regarding sources' auth (which should be handled via
So, by default source auth is handled in a really simple way: "source" user + pwd specified in icecast.xml. And this works fine here... until you enable URL auth :( |
@dm8tbr I think @simahawk is referring to the method that Icecast will use to request the script, which indeed should be @simahawk Your error looks like you are trying to authenticate with source client credentials, this is very confusing as you are doing listener auth. |
# icecast --version
Icecast 2.4.99.1 I pulled it from github and compiled it myself. The point is that sources' auth should not be altered by enabling URL auth, at least judging from what docs say. BUT in any case, even if this is supposed to work like that: it should work, as I'm supporting all known request method and returning always the right the header w/ no check (just to test). Still, my endpoint is not even called by source-whatsoever-handler as I don't see any request landing on it. So I don't really know who is calling what and how. |
Can you try using URL Auth for a specific mountpoint first instead of setting it as default for all mounts? |
tried. Does not work anyway... you can stream but cannot listen to it. If you play using pure html5 player it shows you a popup for authentication -> you cannot listen. If you go to icecast web UI you see that the mount point is locked and you can get to it only by login. Then once you are logged in you can download the m3u but when you open it (in Totem for instace) it bumps you saying "Authentication required". Practically the auth works only for pure http request to icecast webserver and not at stream level which would allow you to protect a streaming straight and not its icecast interface. All in all this auth thing sounds a bit broken IMO. A side note about the requests that were failing w/ bad method: I guess that is related to the fact that Liquidsoap does also GET request to fetch metadata
and sounds like those requests are locked beforehand. |
Forgot to add the logs. This is what happens when I open the m3u file: application side
Icecast side
as you see GET/HEAD request get unauthorized :( |
Sorry, I am not sure what you mean, everything works as expected. |
Of course if you require auth, your players will prompt you for authentication, that's the whole point of it…
The authentication will be applied to the actual stream, the "login" Icecast shows you is just an authentication helper, that generates a m3u with the username/password in it already. Some players handle this fine and will play the stream, others still require you to re-enter the username and password.
As expected. |
Or do you mean that you provide a username/password combination your auth script will accept but it still fails? |
well, no: the whole point is about letting a server side endpoint decide if you can listen to something... so NO, asking for password is not what you would expect :) |
Oh ok, in this case it is not supposed to ask for authentication but immediately work, afaik. |
Does this still apply? Do we have a ticket on the official ticket system at https://gitlab.xiph.org/xiph/icecast-server/-/issues ? Generally this sounds more like a misunderstanding/misconfiguration to me. If there is no reaction I would close this ticket. |
I have icecast compiled w/ all the required to support URL auth on mounts.
I create mounts on the fly using liquidsoap and I configured auth in icecast.xml as follow:
This should work only on listeners but is actually called for everything but that. EVERY http request is passed to it and prevents also admin to login. This is a raw print of POST data from icecast:
which are clearly not a "listener" request.
In the error log I see:
for each mount point. Whereas, if I deactivate auth=url I find:
meaning the source credentials are ok.
Am I missing anything?
The text was updated successfully, but these errors were encountered: