| View previous topic :: View next topic |
| Author |
Message |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Fri Jul 11, 2008 10:06 pm Post subject: Make Server Status page only accessable after uname & pw |
|
|
Hi,
Is it possible to make the server status page only viewable after a valid username and password has been entered (like the Administration page)?
The server status page is the one that comes up when navigating to my.domain.com:<port>/ and my.domain.com:<port>/status.xsl
Thanks in advance. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jul 11, 2008 10:20 pm Post subject: |
|
|
yes, just define a <mount> for /status.xsl with an authentication block
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sat Jul 12, 2008 10:10 pm Post subject: |
|
|
Hi Karl,
Thanks for your reply. First of all I tried:
| Code: |
<mount>
<mount-name>/status.xsl</mount-name>
<username>hackme</username>
<password>hackmesomemore</password>
<public>0</public>
<hidden>1</hidden>
</mount>
|
Then I re-read your reply and think you meant that I do something like:
| Code: |
<mount>
<mount-name>/status.xsl</mount-name>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
<public>0</public>
<hidden>1</hidden>
</mount>
|
Is this what you mean?
The reason that I'm querying this is that for the second configuration example, the documentation says that this is to be used for listener authentication and what I am after is admin authentication.
Please could you give me a bit more detail on the above.
Thank you. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 13, 2008 1:00 am Post subject: |
|
|
The second is what I meant as you want to authenticate the client listening for data. You do have an unbalanced tag in that second snippet, but that might be a copy/paste thing.
admin requests go via /admin, you wanted to auth the status.xsl page, so it is not an admin request. If the request does not match a source then the request is checked as files in webroot, which is where status.xsl is located.
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sun Jul 13, 2008 8:53 am Post subject: |
|
|
Hi Karl,
Thanks for your reply, yes I hadn't spotted the end tag and I just copy/pasted from the documentation, as I hadn't put my second config example in my config file just then.
I've been reading http://www.icecast.org/docs/icecast-2.3.1/icecast2_listenerauth.html
This is where is seems to get a bit messy, as the content that I want authentication on is a web page, not an audio stream.
With an audio stream, the content source is a source client (E.G. simplecast) that connects to the mount and the content clients are audio players (E.G. Windows Media Player)
With a web page, the content source is a text editor (that wrote the status.xsl page) and the content clients are web browsers (E.G. Internet Explorer)
Once reading the section of "Configuring Users and Passwords" and following through what it says, I could only get management visibility of /status.xsl from admin/stats.xsl by temporarily reconfiguring my simplecast to stream to the /status.xsl mount point and starting to stream to it.
Once I could manage /status.xsl, I was able to click on the "Manage Authentication" link and get to the screen to set up usernames and passwords.
Have I mis-interpreted anything or is this really how it has to be done?
My revised config for this mountpoint is below:
| Code: |
<mount>
<mount-name>/status.xsl</mount-name>
<password>hackme</password>
<public>0</public>
<hidden>1</hidden>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="1"/>
</authentication>
</mount>
|
Thank you. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 13, 2008 9:18 am Post subject: |
|
|
looks like you have it sorted now. The admin link for administering the htpasswd file does not show unless a source is registered (you could of setup an on-demand relay to /status.xsl to show it up). A nice mechanism for on-demand files hasn't been worked out yet.
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sun Jul 13, 2008 9:32 am Post subject: |
|
|
Hi Karl,
Thanks for confirming that I'm not doing something really silly!!
I've now entered a username and password and can see that a myauth file has been created, with a username in clear text and passwoed encrypted.
I can still access / and /status.xsl without submitting a username and password.
I have tried restarting icecast and from a different web browser, in case anything was being cached and it's still letting me view the page straight away.
Here is an extract from my error log file for when the page was viewed:
| Code: |
[2008-07-13 10:29:01] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:01] DBUG stats/modify_node_event update node connections (1)
[2008-07-13 10:29:01] DBUG admin/admin_handle_request Admin request (/admin/stats)
[2008-07-13 10:29:01] DBUG admin/admin_handle_request Got command (stats)
[2008-07-13 10:29:01] DBUG admin/command_stats Stats request, sending xml stats
[2008-07-13 10:29:01] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:02] DBUG stats/modify_node_event update node client_connections (1)
[2008-07-13 10:29:02] DBUG stats/modify_node_event update node clients (0)
[2008-07-13 10:29:07] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:07] DBUG stats/modify_node_event update node connections (2)
[2008-07-13 10:29:07] DBUG connection/_handle_get_request alias has made / into /status.xsl
[2008-07-13 10:29:07] DBUG connection/_handle_get_request Stats request, sending XSL transformed stats
[2008-07-13 10:29:07] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node client_connections (2)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (0)
[2008-07-13 10:29:08] INFO fserve/fserve_client_create checking for file /style.css (/usr/local/share/icecast/web/style.css)
[2008-07-13 10:29:08] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:08] INFO fserve/fserve_client_create checking for file /icecast.png (/usr/local/share/icecast/web/icecast.png)
[2008-07-13 10:29:08] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:08] INFO fserve/fserve_client_create checking for file /corner_topleft.jpg (/usr/local/share/icecast/web/corner_topleft.jpg)
[2008-07-13 10:29:08] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:08] INFO fserve/fserve_client_create checking for file /corner_bottomleft.jpg (/usr/local/share/icecast/web/corner_bottomleft.jpg)
[2008-07-13 10:29:08] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node connections (3)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (2)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node connections (4)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (3)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node connections (5)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (4)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node connections (6)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node client_connections (3)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node file_connections (1)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node client_connections (4)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node file_connections (2)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node client_connections (5)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node file_connections (3)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (3)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (2)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node client_connections (6)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node file_connections (4)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:08] DBUG stats/modify_node_event update node clients (0)
[2008-07-13 10:29:11] INFO fserve/fserve_client_create checking for file /corner_topright.jpg (/usr/local/share/icecast/web/corner_topright.jpg)
[2008-07-13 10:29:11] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node connections (7)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node clients (2)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node connections (8)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node client_connections (7)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node file_connections (5)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node clients (1)
[2008-07-13 10:29:11] INFO fserve/fserve_client_create checking for file /corner_bottomright.jpg (/usr/local/share/icecast/web/corner_bottomright.jpg)
[2008-07-13 10:29:11] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node client_connections (8)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node file_connections (6)
[2008-07-13 10:29:11] DBUG stats/modify_node_event update node clients (0)
|
Please could you let me know what I can try to make it work.
Thank you. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 13, 2008 4:30 pm Post subject: |
|
|
I copied what you posted straight into an xml here and run 2.3.2 on it and it asked for a username and password
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sun Jul 13, 2008 4:43 pm Post subject: |
|
|
Hi Karl,
Thanks for your reply.
I'm on version 2.3.1, so I'll plan to upgrade to 2.3.2 soon and try it then. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sun Jul 13, 2008 7:22 pm Post subject: |
|
|
Hi Karl,
I have upgraded my test environment to icecast version 2.3.2 and it's still not prompting me for a username and password.
What can I look at/try next?
Thank you. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 13, 2008 8:18 pm Post subject: |
|
|
The setting does work but maybe you have it commented out.
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Sun Jul 13, 2008 10:02 pm Post subject: |
|
|
Hi Karl,
Thanks for your reply, yes you're right, I hadn't copy and pasted the config in the right icecast.xml file!
I'm now prompted with the username and password, which I've forgotton the password for.
I cannot login to change it now, as the page I've got protected with a username and password is the one I need to use to access the page to change the username and password!
Is there a CLI standalone application or something that can put entries into the myauth file so that access can be granted?
Thank you. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Jul 14, 2008 12:00 am Post subject: |
|
|
The admin pages are via /admin/ which is not protected by the mount auth section. The entries for htpasswd are just user:md5pass
karl. |
|
| Back to top |
|
 |
cmodyssey
Joined: 28 Mar 2008 Posts: 63
|
Posted: Thu Jul 17, 2008 7:13 pm Post subject: :D |
|
|
Hi Karl,
Thanks for the advice to go via the /admin/ pages.
I've reset my password and it's all working how I want it.
Thank you again.  |
|
| Back to top |
|
 |
|