Skip to content
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

Auth & Flash Player #9

Closed
Allmoz opened this issue May 8, 2012 · 8 comments
Closed

Auth & Flash Player #9

Allmoz opened this issue May 8, 2012 · 8 comments

Comments

@Allmoz
Copy link

Allmoz commented May 8, 2012

testing/using this flash player - > http://www.fastserv.com/kb/article/icecast_embedded_flash_player/
i notice that when ppl conect it send the auth to the mount but as ...&mount=/stream?type=.flv&...
should it be "...&mount=/stream&type=.flv&..." or "...&mount=/stream&type=flv&..." or "...&mount=/stream&..."??

@karlheyes
Copy link
Owner

If you are talking of the url auth then mount=X where X is the escape encoded version of the url including the type= info. The encoding is there to keep it separate from the other POST fields.

karl.

@Allmoz
Copy link
Author

Allmoz commented May 9, 2012

but "/mount?type=.flv" has no mount_add or mount_remove
so whi a dedicated listener_add listener_remove ??

if flash player connects to "/stream?type=.flv" , then icecast ask the url auth script, permission for the "/stream?type=.flv" mount and not the "/stream"

source - > server:port:8000/mount
client- > server:port:8000/mount
flv client -> server:port:8000/mount?type=.flv

client auth -> ?action=listener_add&server=&port=&client=&mount=/mount&user=&pass=&ip=&agent=
flv clien auth -> ?action=listener_add&server=&port=&client=&mount=/mount?type=.flv&user=&pass=&ip=&agent=

shouldn't be ?

flv clien auth -> ?action=listener_add&server=&port=&client=&mount=/mount&type=.flv&user=&pass=&ip=&agent=

@karlheyes
Copy link
Owner

the mount add and remove are triggers for the mountpoint start and exit, whether relay or source client so the flv aspect is unrelated. listener_add is for per listener attempts so requires any arguments passed in the url.

the mount arg is encoded (including args) as that is the only safe way to handle it. we do not want listeners to do http://.../stream?ip=127.0.0.1 and risk a fake ip setting to override the expected one. If you do provide auth in the style of /stream?client=123456 then you would have a clash in meaning, client for the web portal or client id of icecast. This way, the encoded string has to be specially handled by the script and the args won't clash.

@Allmoz
Copy link
Author

Allmoz commented May 9, 2012

but cant be truncated ?

if it is working as if the end of mount is "?type=.flv" --> get(make) stream from /mount for a flv player
then in the same logic it can be said
if the end of mount is "?type=.flv" -> get(make) stream from mount whiout "?type=.flv" for a flv player and get the auth as mount whiout "?type=.flv"

cose for the auth logic... /mount and /mount?type=.flv are the same mount

by the same logic it gets more difficult from the auth script to detect if it is

"/stream" + "?type=.flv" ( flv of /stream)

or

"/stream?type=.flv" (the actual name)

the auth can give access to users based on server, port and mount,
and im pretending to add to it schedules time too. so the auth is not only about user & pass

right now im using regex -> |^(/.*)?type=.flv$|isU
so if it is true y get only the /stream
but is not as infallible, as getting the same mount in both cases by the server

plus! it gets the data for the auth url for the auth call from "/stream?type=.flv" whiout "type=.flv" ergo "/stream"
(if not, then it should not be able to auth)

so whi tell the url auth script it is from the mount "/stream?type=.flv" when it actualy it uses the the data from /stream ?

.< so hard to explain myself

@Allmoz
Copy link
Author

Allmoz commented May 9, 2012

plus!
if i connected source stream to /stream?type=.flv , it gets the /stream configuration

and call the source_auth

action=stream_auth&mount=/stream&ip=....

and gets mounted on /stream

action=mount_add&mount=/stream&server=...
action=mount_remove&mount=/stream&server=...

then why the listeners auth ?

action=listener_add&mount=/stream?type=.flv&server=...
action=listener_remove&mount=/stream?type=.flv&server=...

why is not ?

action=listener_add&mount=/stream&server=...
action=listener_remove&mount=/stream&server=...

@karlheyes
Copy link
Owner

the idea is you url unescape the mount value, and then put that into something like explode ("?&", args), no regex needed.

I'm not sure why you are having an issue with the type setting, there are cases where people use auth in a way like /stream?session=123456789, so the args are required to be sent and are required to not clash with the other settings in the POST.

karl.

@Allmoz
Copy link
Author

Allmoz commented May 10, 2012

hoo....ok.... well... is not an issue if you know how it works ( i know now )
but isnt beter to separate mount and arguments ?

action=listener_remove&mount=/stream&args=type=.flv&server=

that way... mount... is the mount ( that is my kind of paradigma issue, that now the mount is not just the mount)
and the args is the args

@karlheyes
Copy link
Owner

If there is a good enough reason to change then it can be changed, but currently having args= or params= as a separate setting would work. At the moment, I'm keeping consistent first.

karl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants