Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mount-specific admin accounts

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Wed Mar 21, 2012 10:54 pm    Post subject: Mount-specific admin accounts Reply with quote

Some source clients, such as SAM Broadcaster presently have an option to retrieve current listener counts from Icecast. It does this by using the admin username + password.

This obviously isn't a good idea when it comes to shared icecast servers, so I figure it'd be swell if you could define admin accounts within the specific mountpoint definitions, and limit the account to actions that affect that mountpoint.
Back to top
View user's profile Send private message Visit poster's website
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Thu Mar 22, 2012 6:13 pm    Post subject: Reply with quote

As a workaround, I made a file called stats.xml and put it in an 'admin' folder on my webhost. (SAM requires the path to be server:port/admin/stats.xml).

Using .htaccess, I processed the xml file as PHP, and cURLed the real stats.xml from icecast.

Works fine, and I didn't have to give anybody the real admin password.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Mar 22, 2012 6:28 pm    Post subject: Reply with quote

the per-mount stats are available using the source user/pass in the kh tree, including listener details. most of the stats are also available in the webroot pages by just supplying mount= as an arg

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Thu Mar 22, 2012 7:30 pm    Post subject: Reply with quote

Unfortunately SAM doesn't give you any choice when it comes to that, which is why I needed to do this. It doesn't even allow you to use a username other than 'source' for the encoder.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Mar 22, 2012 8:37 pm    Post subject: Reply with quote

I don't know what the possibilities are to work around this without trying it against the app. If no mountpoint is given then how do you decide which stats to retrieve. You could use alias to redirect to a mountpoint that could do something via auth url but what options are available to you.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Thu Mar 22, 2012 9:05 pm    Post subject: Reply with quote

karlH wrote:
If no mountpoint is given then how do you decide which stats to retrieve.

SAM asks for the mountpoint when you set this up.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Mar 22, 2012 10:26 pm    Post subject: Reply with quote

I agree, SAM does know the mountpoint, but what makes you think icecast knows which mountpoint stats SAM wants if the name is not passed? easy in the case of 1 stream, if there are 100 streams then which?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Thu Mar 22, 2012 10:58 pm    Post subject: Reply with quote

SAM downloads the entire stats.xml, then looks through it for the mountpoint you specify. If said mountpoint doesn't exist, it throws an error.

My feature request for mount-specific admin accounts would mean, I guess, that when stats.xml is accessed with an admin account that is defined in a <mount> block, it only includes that mount. (And doesn't allow admin functions on any mount that it isn't defined in, within the web interface.)

It's difficult to explain, and probably a bit too complicated. I don't require it now that I have the workaround, though.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Mar 23, 2012 1:27 am    Post subject: Reply with quote

The fact that it is difficult to explain would indicate that it would be next to impossible to implement. /admin access using source auth has always been allowed for metadata updates for example, but defining some sort of per-mount setting so that only those mountpoints would be included on a stats.xml sounds like trying to work around an old fixed problem.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
greatmenjmt



Joined: 18 Jan 2012
Posts: 23

PostPosted: Wed Apr 18, 2012 8:50 pm    Post subject: Reply with quote

karlH wrote:
the per-mount stats are available using the source user/pass in the kh tree, including listener details. most of the stats are also available in the webroot pages by just supplying mount= as an arg

karl.


hi karl. how do i access to such stats per mount using source user/pass, i mean beside the ones you can find this way: http://ip:port/status.xsl?mount=/xxxxxxxx

would be great if icecast could allow (on a shared server) users to administrate his/her mount by letting them access to a admin zone which include only his mount/stream beside the server admin zone that let the server admin to handle all.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 19, 2012 12:38 am    Post subject: Reply with quote

in the kh tree, you can use many of the admin routines with source user pass, certainly the stats /admin/stats and the xsl pages, you do need to provide the ?mount=/.... though or else icecast will assume the request is for all mounts.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
greatmenjmt



Joined: 18 Jan 2012
Posts: 23

PostPosted: Thu Apr 19, 2012 12:51 am    Post subject: Reply with quote

karlH wrote:
in the kh tree, you can use many of the admin routines with source user pass, certainly the stats /admin/stats and the xsl pages, you do need to provide the ?mount=/.... though or else icecast will assume the request is for all mounts.

karl.


but how do i introduce the source user/pass to access such features? or if is trough the url in what format to doit?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 19, 2012 1:50 pm    Post subject: Reply with quote

as with any auth passed into a url, either in the url form of

http://user:pass@host:port/....

or if you are dealing at the lower level of http then send the header

Authorization: Basic ....

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber