[rabbitmq-discuss] custom plugin debugging
Tim Watson
tim at rabbitmq.com
Fri Nov 9 02:19:57 GMT 2012
Hi
On 9 Nov 2012, at 01:51, Prabodh Upreti wrote:
> Tim
>
> Thank you for that response. As you can see I am new to Erlang. I have
> briefly gone through the tutorial but will be going back to get a better
> handle.
No worries, we were all new to it at one time or another.
> Basically as a client(Java) I will get a service ticket from SSO server.
> What I was thinking was I will try to connect using the java client passing
> the service ticket(token) to rabbit(no password SSO server does not need
> it).
> This plugin rabbitmq_cas_authen will intercept the call and make a
> https GET call to the SSO server for validation. From the SSO server I will
> return back a string "login success". If I see that string back I will
> assume successful login. The GET URL for the SSO will look like
> ?ticket=xxxxxxxx where xxxx is the token I passed in as the username. I
> hope I have explained clearly.
>
Ok, so if you're passing the token in the username of the AMQP login then you really just need to change the 'q' function back to what Simon had. As you've prepended {ticket, Username} to the head of the list of auth properties, the original q function should create ?ticket="ticket" just as you want.
> I will work on the syntax based on your feedback. Could you please confirm
> that what I am even trying is the right thing to do or I am way off the
> track. thank you.
>
Well I can't say whether or not the design makes any sense I'm afraid, as I don't know enough about your application or its requirements, but it does sound like a reasonable approach from what you've said so far. I suspect there is a bit more to implementing a custom auth provider that you need to do besides logging in however, so you might find the complexity grows as you work on it.
More information about the rabbitmq-discuss
mailing list