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

Simon Lundström simlu at su.se
Tue Dec 11 16:20:45 GMT 2012

That was easy. The only hard thing was to get it to compile correctly on
OS X = ).
(Note to future readers see

The NIF needs to be loaded at some point and from the examples and
documentation I've found that it's done via -on_load, like this:

However, I've tried using -on_load before in my plugin and it didn't
work. I suspected that the -behaviour had some magic which involved
-on_load and using -on_load in your model bricks that. I worked around
needing -on_load and forgot about it. However, now I need it again. This
is from the error log:

When logging in via AMQP:

=ERROR REPORT==== 11-Dec-2012::09:57:02 ===
closing AMQP connection <0.287.0> ( ->

when using the API (this is in the sasl log):

=CRASH REPORT==== 11-Dec-2012::11:51:04 ===
    initial call: mochiweb_acceptor:init/3
    pid: <0.256.0>
    registered_name: []
    exception error: undefined function rabbit_auth_backend_kerberos:check_user_login/2
      in function  rabbit_access_control:'-check_user_login/2-fun-0-'/4
      in call from lists:foldl/3
      in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4
      in call from mochiweb_http:headers/5
    ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.132.0>]
    messages: []
    links: [<0.252.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 4181
    stack_size: 24
    reductions: 1467

- Simon

More information about the rabbitmq-discuss mailing list