[rabbitmq-discuss] Creating an auth plugin (Kerberos)

Simon Lundström simlu at su.se
Wed Dec 5 11:05:30 GMT 2012

On Mon, 2012-12-03 at 11:21:55 +0000, Tim Watson wrote:
> If you want to avoid getting the exit signals, you can pass 'eof' in
> the options which (as per the open_port/2 docs) will change this
> behaviour such that:

Thanks, this is what I did. Code got much less messy = )

> If you want to avoid blocking (the reader! yes you do I would've
> thought) then you might consider using an 'insulator' process in
> which to open and interact with the port. This allows you to timeout
> and/or terminate the port without blocking the reader process - some
> port commands are blocking and if your C code (or external
> application or whatever) gets stuck then you could be in trouble.

Please elaborate on this. I've tried to find any information about using
an 'insulator' process. It's mentioned in the source code of eunit but that's
the only relevant hit I got. I understand what you mean by not blocking
the read process though but I thought using a port was async?
When I tested this, I could authenticate multiple users while
authentication was hanging?

I thought using
would solve all my timeout problems? I'm going to lower timeout though,
it's way to high ATM = )

One thing that bothers me though is that if my auth backend refuses a user it
takes several seconds for the internal one to respond. Ideas about this and how
I can troubleshoot this?

=INFO REPORT==== 5-Dec-2012::10:36:54 ===
accepting AMQP connection <0.492.0> ( ->

=ERROR REPORT==== 5-Dec-2012::10:36:54 ===
exit_status: 1

=ERROR REPORT==== 5-Dec-2012::10:36:54 ===
eof: [false]

=ERROR REPORT==== 5-Dec-2012::10:36:54 ===
kinit: false!

=ERROR REPORT==== 5-Dec-2012::10:36:57 ===
closing AMQP connection <0.492.0> ( ->

AFAICT, it tries to find the hash in the internal DB but fails because there is no password for that user.

Thank you, both Simon and Tim, once again for your time,
- Simon

More information about the rabbitmq-discuss mailing list