[icecast-dev] Client auth with mysql

oddsock oddsock at oddsock.org
Wed May 12 12:20:24 PDT 2004



Mathieu,

This is a great idea, and I'm sure many people would like to take advantage 
of it.  Since the release of 2.0.0, we've added an "authenticator" 
framework which allows us to create authentication modules for handling 
listener (client-based) authentication.  We currently have one 
authentication module (htpasswd) which uses a simple file to store users 
and encrypted passwords.  With this new framework, adding additional 
authenticators (URL, mysql, etc.) should be fairly simple, or at least 
that's the intent...

as you patch stands right now, I'm not sure it will be adopted, however the 
chances are very good if you re-write it using the authenticator framework 
that is currently in the most current Subversion repository...

oddsock
At 12:24 PM 5/12/2004, you wrote:
>Hi,
>
>I have a customer (a small french music producer) who's putting up a "paid"
>radio, it's not really paid, because you don't buy an access, you just by a
>cd, and you get radio access.
>So, I needed to check access to the radio, in an intelligent manner :-)
>A collegue of mine started doing things, he ended up with scripts adding ip's
>to the server's firewall...
>
>I though better of it and I told myself that it should not be that difficult
>to add mysql support in icecast (no, no, don't run, please).
>
>So, that's what I did :-)
><http://mat.cc/distfiles/icecast-mysql.diff>
>
>it adds some config params to a <mount> section :
>
><sql_server>sql-server</sql_server>
><sql_login>login</sql_login>
><sql_password>password</sql_password>
><sql_dbname>database</sql_dbname>
><sql_field>url-field</sql_field>
><sql_query>select cle from client where radio = 1 and cle = '%s'</sql_query>
>
>which are passed to the source it correspond to.
>
>and when you call a source say, /foo.mp3?url-field=something
>It'll put the something in the sql query.
>
>It should be connection loss tolerant, but I'm not sure about it :-)
>
>For those wanting to try it, you'll have to have mysql/mysql.h in your
>include path, and to add -llibmysqlclient -Lpath to have it compile :-)
>If I had known a bit of autoconf & Co, I'd have added a --with-mysql with
>proper #ifdef things to comment out my mess, but I don't, if you have a hint
>on that, I'll happily do it :-)
>
>ps: all and every comment welcome ;-)
>--
>Mathieu Arnold
>--- >8 ----
>List archives:  http://www.xiph.org/archives/
>icecast project homepage: http://www.icecast.org/
>To unsubscribe from this list, send a message to 
>'icecast-dev-request at xiph.org'
>containing only the word 'unsubscribe' in the body.  No subject is needed.
>Unsubscribe messages sent to the list will be ignored/filtered.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list