[rabbitmq-discuss] Creating an auth plugin (Kerberos)
Simon Lundström
simlu at su.se
Thu Nov 29 17:11:35 GMT 2012
On Thu, 2012-11-29 at 17:46:00 +0100, Simon Lundström wrote:
> Sorry to revisit an old message, but it's kind of related...
>
> On Tue, 2012-11-13 at 17:21:19 +0000, Simon MacMullen wrote:
> > On 13/11/12 14:35, Simon Lundström wrote:
> > >>So make sure to receive that message in your plugin...
> > >
> > >In my receive, here
> > ><https://github.com/simmel/rabbitmq-auth-backend-kerberos/blob/213a831a61e1524cb187273b7d78ff5bc415a678/src/rabbit_auth_backend_kerberos.erl#L42-55>,
> > >I tried to add:
> > >
> > > {'EXIT', Port, PosixCode} ->
> > > rabbit_log:error("EXIT: ~p~n", [PosixCode]),
> > > false;
> > >
> > >however I still get the same error.
> > >I even tried to add:
> > > {A, B, C} ->
> > > rabbit_log:error("EXIT: ~p : ~p : ~p~n", [A,B,C]),
> > > false;
> > >
> > >just to see so I could "catch" every case but I still got the same error.
> >
> > You don't want to add that message to the existing receive block -
> > since you will receive the {Port, {exit_status, A}} message as well,
> > and you'll only receive one message per receive block. So you need a
> > second block after the first to receive the 'EXIT' message.
>
> When trying to handle when password is undefined I have found that the
> {'EXIT', Port, normal} message is only sent when a user logs in via AMQP
> (and probably STOMP).
>
> I never receive an EXIT-message when a user logs in via the API/mgmt.
>
> Why is that? How can I handle the EXIT-message "sometimes"?
>
> The way it "works" now is that my timeout is hit by using "after 1000"
> in
> <https://github.com/simmel/rabbitmq-auth-backend-kerberos/blob/8911bd68d7/src/rabbit_auth_backend_kerberos.erl#L85-L93>
> but it's not nice to the API/mgmt users to have them wait 1000 ms for
> every auth request = )
Sorry, or rather it only sends the EXIT-message when the last auth
request in the series of auth requests an call to the API URL
/api/aliveness-test/%2F generates.
/api/nodes/<nodename> uses two auth requests but never sends an EXIT-message at all.
Thanks,
- Simon
More information about the rabbitmq-discuss
mailing list