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

Simon Lundström simlu at su.se
Tue Nov 27 10:07:06 GMT 2012


On Fri, 2012-11-23 at 11:06:24 +0000, Simon MacMullen wrote:
> On 22/11/12 16:14, Simon Lundström wrote:
> >I'm starting to get somewhere now, still hitting walls = )
> >
> >Is there a reason why the module is named, e.g.,
> >rabbit_auth_backend_kerberos and that the folder/plugin is named, e.g.,
> >rabbitmq_auth_backend_kerberos?
> 
> The folder and plugin have to have the same naming pattern, so they
> share "rabbitmq". I think the rest is just history.
> 
> >I just did this:
> ><https://github.com/simmel/rabbitmq-auth-backend-kerberos/commit/a3bab882988771b6d07f1a436844c47426d0c7b6/src/rabbitmq_auth_backend_kerberos.erl#L2L1>
> >and it seems to work. I mainly do it because I want to be able to use
> >?MODULE in code:priv_dir.
> 
> Well, bear in mind that code:priv_dir/1 does *not* take the name of
> a module, but the name of an application. So using ?MODULE and then
> changing the module name to be the same as the application seems...
> misleading. I would just define ?APPLICATION and have done.

Is there a way to do this without using a seperate function?
<https://github.com/simmel/rabbitmq-auth-backend-kerberos/commit/8911bd68d729142d0d2b5b1959fb2d53de42800e>


While developing the plugin I've noticed a weird issue. When using the
API's /api/aliveness-test/%2F it makes a few authentication requests.
In the third (or so) request password is undefined. In all other
requests the password is a binary which is the password being used.

Is this a bug? Are auth plugins supposed to handle this? Why is it
undefined?

Thanks,
- Simon


More information about the rabbitmq-discuss mailing list