You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Joao Costa <la...@gmail.com> on 2017/03/20 17:11:58 UTC

Custom Authentication

Hello,

I'm trying to create a custom authentication and I was wondering if anyone
could give me some help.

Is there any kind of documentation regarding the authentication process?

What about examples and/or "templates"? (i.e. getting the credentials from
a database?

Any kind of help is more than welcome.


Thanks

Re: Custom Authentication

Posted by Joao Costa <la...@gmail.com>.
Hi Alexander,

Thanks for your answer. For sure it will be useful. I will have to look
carefully to your answer and to those files and see if I can get there.

I'm not used to program in C++, so I was hopping there was some kind of
high level explanation or some step-by-step guide (simple example) on how
to create a custom authenticator. I have found something on how to create a
framework (Apache Mesos Essentials and Mesos in Action books) but not on
how to create custom authentication nor authorization.

It will probably take me a little longer but at least I already have a
starting point.

Thanks

2017-03-21 15:55 GMT+00:00 Alexander Rojas <al...@mesosphere.io>:

> Hi Joao,
>
> Mesos authenticators, both HTTP and Crammd5 can be loaded as modules if
> you need a custom one. Documentation for modules is in the docs folder [1].
> If you want to use HTTP authenticator, you need to implement the interface
> `process::http::authentication::Authenticator` [2], the same file where
> the interface is declared includes an example of an authenticator, you can
> check in the code for the definition. Once you have your own interface
> implementation ready, you can check the examples directory [3] as a
> guideline on how to make your authenticator available to mesos (that file
> combined with the modules documentation).
>
> I hope that had been of help.
>
>
> [1] http://mesos.apache.org/documentation/latest/modules/ <
> http://mesos.apache.org/documentation/latest/modules/>
> [2] https://github.com/apache/mesos/blob/master/3rdparty/
> libprocess/include/process/authenticator.hpp <https://github.com/apache/
> mesos/blob/master/3rdparty/libprocess/include/process/authenticator.hpp>
> [3] https://github.com/apache/mesos/blob/master/src/examples/test_http_
> authenticator_module.cpp <https://github.com/apache/mesos/blob/master/src/
> examples/test_http_authenticator_module.cpp>
>
> Alexander Rojas
> alexander@mesosphere.io
>
>
>
>
> > On 20 Mar 2017, at 18:11, Joao Costa <la...@gmail.com> wrote:
> >
> > Hello,
> >
> > I'm trying to create a custom authentication and I was wondering if
> anyone
> > could give me some help.
> >
> > Is there any kind of documentation regarding the authentication process?
> >
> > What about examples and/or "templates"? (i.e. getting the credentials
> from
> > a database?
> >
> > Any kind of help is more than welcome.
> >
> >
> > Thanks
>
>

Re: Custom Authentication

Posted by Alexander Rojas <al...@mesosphere.io>.
Hi Joao,

Mesos authenticators, both HTTP and Crammd5 can be loaded as modules if you need a custom one. Documentation for modules is in the docs folder [1]. If you want to use HTTP authenticator, you need to implement the interface `process::http::authentication::Authenticator` [2], the same file where the interface is declared includes an example of an authenticator, you can check in the code for the definition. Once you have your own interface implementation ready, you can check the examples directory [3] as a guideline on how to make your authenticator available to mesos (that file combined with the modules documentation).

I hope that had been of help.


[1] http://mesos.apache.org/documentation/latest/modules/ <http://mesos.apache.org/documentation/latest/modules/>
[2] https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/authenticator.hpp <https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/authenticator.hpp>
[3] https://github.com/apache/mesos/blob/master/src/examples/test_http_authenticator_module.cpp <https://github.com/apache/mesos/blob/master/src/examples/test_http_authenticator_module.cpp>

Alexander Rojas
alexander@mesosphere.io




> On 20 Mar 2017, at 18:11, Joao Costa <la...@gmail.com> wrote:
> 
> Hello,
> 
> I'm trying to create a custom authentication and I was wondering if anyone
> could give me some help.
> 
> Is there any kind of documentation regarding the authentication process?
> 
> What about examples and/or "templates"? (i.e. getting the credentials from
> a database?
> 
> Any kind of help is more than welcome.
> 
> 
> Thanks