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 

User Name, Password and Time Slot Restrictions

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Shadow Slim



Joined: 17 Nov 2008
Posts: 3
Location: Queens

PostPosted: Tue Jun 12, 2012 10:23 pm    Post subject: User Name, Password and Time Slot Restrictions Reply with quote

Please forgive me. I know this might be a trending topic already but I'm new to this and I'm looking for a solution. I have a online radio station that I use to broadcast from my house. The only problem is that I'm trying to find a way of restricting certain DJ from broadcasting a specific time and/or day.

-------------------------------------------------------------------------------------

For example:

I'm using Sam Broadcaster

1. User Name (for each DJ on the station)
2. Password (for each DJ on the station)
3. Time Slot (for each DJ on the station)

DJ A only broadcast on Monday, Wednesday and Friday between the hours of 10pm - 12am.

DJ A only broadcast on Tuesday and Wednesday at two different times. On Tuesday between 3pm - 7pm and on Wednesday between 1pm-7pm

I'm looking to restrict DJ A and DJ B from broadcasting outside of their schedule time slot.

-------------------------------------------------------------------------------------

If anybody can help or already have done this please share some insight on this situation. I'm looking to implement this as soon as possible. I'm not a hard core programmer so there will be questions. I just need to make sure that I'm on the right track or direction of even if it is possible to implement.
Back to top
View user's profile Send private message AIM Address
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Jun 13, 2012 5:25 pm    Post subject: Reply with quote

With 2.3.2, you'll need to re-write the xml with a user/pass combination that is specific to the source connecting. With 2.3.3 and kh builds you have the option of using the "stream_auth" option, which operates like listener_add in that POST details are sent and a php script decides on whether to allow it or not.

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



Joined: 17 Nov 2008
Posts: 3
Location: Queens

PostPosted: Wed Jun 13, 2012 5:40 pm    Post subject: Reply with quote

To my understand this is what I am getting out of the whole ordeal.

Icecast listens for incoming connection. It needs to receive a acceptance code in order for the user to stream to the server. That's one thing.

The second thing is I need to setup a list of rules which is in a PHP Script that is totally separate from Icecast because Icecast is only concerned with the acceptance code.

Icecast (listens for acceptance code) <<----- PHP Script (sends code) <<----- User (trying to stream)

If so where do I setup the PHP script? And.. is there a tutorial I can following in order to setup a something like this?

You mention POST which also confuses me. I have been searching high low before I posted in this forum on the concept of what you're trying to say or how to execute this whole idea.

I'm not a code demon but I willing to learn the fundamentals. Icecast for dummies please because I'm the idiot that can not get it.
Back to top
View user's profile Send private message AIM Address
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jun 15, 2012 1:43 pm    Post subject: Reply with quote

The process is not that difficult. Assuming you understand the existing mechanism of source client connecting then it just follows on from there.

source connects to stream data on say /live using user and pass

icecast sees request and sees that there is a "stream_auth" setting for the requested mount so calls the url provided and fills in the POST details (http spec covers what POST is) which includes user, pass and mount.

The script on the url then uses whatever criteria it likes to validate the source. user, pass or time of day can be used to decide whether to allow the source to stream. All that the script needs to do is send icecast-auth-user: 1 in the response headers back to icecast.

When icecast sees the required response header from the url script, it then allows the source client to stream or drops it if not present.

There may be other reasons why a source is rejected, eg the mount point is already in use but that is separate from an auth question.

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



Joined: 27 May 2011
Posts: 7
Location: United Kingdom

PostPosted: Sun Jul 15, 2012 9:01 pm    Post subject: Reply with quote

karlH wrote:

source connects to stream data on say /live using user and pass icecast sees request and sees that there is a "stream_auth" setting for the requested mount so calls the url provided and fills in the POST details (http spec covers what POST is) which includes user, pass and mount.


Karl,

Does each source have to be on predefined mountpoint in the config xml somewhere for this to work?

I'd really like to be able to use an external process to check each source login attempt and if valid pass back the mountpoint parameters (max_listeners mainly), without having to have any per-mountpoint specific config in the xml files at all.

I'm currently using the <include> with auto-generated xml snippets for each mountpoint and a kill -HUP to force a config reload, but it would be really nice to be able to deal with it all externally.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 15, 2012 10:06 pm    Post subject: Reply with quote

a mount is required, although it could be a wildcard mount-name. Max-listeners is not something that can be set by the response headers but you could raise on the github tickets as I think it could be done.

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 -> Icecast Server 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