You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by David Leangen <ap...@leangen.net> on 2020/06/12 11:30:55 UTC

Custom Authentication

Hi!

Looking at this page:

  https://james.apache.org/server/3/config-users.html

It looks like there are 4 ways to configure the user repository:

 * JPA
 * JDBC
 * File
 * LDAP


Is it possible to use a custom authentication system?

Ideally, I would like to use my existing useradmin / auth system, which has a REST interface.

How would one go about doing that?


Cheers,
=David



Re: Custom Authentication

Posted by David Leangen <ap...@leangen.net>.
> It would be more helpfull if you can name your integration target. What
> is your Identity Provider?

Hi Eugen,

I have my own custom provider based on Firebase Auth (long story), but OpenID Connect would be a great (and very general) solution!

Cheers,
=David


Re: Custom Authentication

Posted by Eugen Stan <eu...@netdava.com>.
Hello David,

It would be more helpfull if you can name your integration target. What
is your Identity Provider?

I'm planing to make it work with Keycloak and there are two ideas that
I'm currently exploring:

- Integrate via OpenID Connect with Keycloak - probably with some caching ?!

- Use SCIM to sync data from Keycloak to a James user store in the same
DB, nmore work than the first option, but James can work while keycloak
is down for maintenance.


-- 
Eugen Stan
+40720 898 747 / netdava.com


Re: Custom Authentication

Posted by David Leangen <ap...@leangen.net>.
> We don't have examples for this yet.
> 
> The closer could be
> https://github.com/apache/james-project/blob/master/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/CassandraLdapJamesServerMain.java
> bringing in LDAP UsersRepository for cassandra-guice server.

Thanks. I’ll see what I can do with that.

Cheers,
=David


Re: Custom Authentication

Posted by Tellier Benoit <bt...@apache.org>.
We don't have examples for this yet.

The closer could be
https://github.com/apache/james-project/blob/master/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/CassandraLdapJamesServerMain.java
bringing in LDAP UsersRepository for cassandra-guice server.

The "main server" module is overriden with the module bringing in the
custom UsersRepository.

Cheers,

Benoit

Le 15/06/2020 à 12:08, David Leangen a écrit :
>>> Ideally, I would like to use my existing useradmin / auth system, which has a REST interface.
>>
>> Nowadays, you would write a UsersRepository implementation interacting
>> with your REST interface. You would define your custom server reusing
>> jpa-guice prepackages server guice module but specifying your
>> UsersRepository rather than the JPA one.
>>
>> (Guice also allows overrides).
> 
> Cool, thanks!
> 
> Are there any examples anywhere I could take a look at?
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Custom Authentication

Posted by David Leangen <ap...@leangen.net>.
>> Ideally, I would like to use my existing useradmin / auth system, which has a REST interface.
> 
> Nowadays, you would write a UsersRepository implementation interacting
> with your REST interface. You would define your custom server reusing
> jpa-guice prepackages server guice module but specifying your
> UsersRepository rather than the JPA one.
> 
> (Guice also allows overrides).

Cool, thanks!

Are there any examples anywhere I could take a look at?



Re: Custom Authentication

Posted by Tellier Benoit <bt...@apache.org>.

Le 12/06/2020 à 18:30, David Leangen a écrit :
> Hi!
> 
> Looking at this page:
> 
>   https://james.apache.org/server/3/config-users.html
> 
> It looks like there are 4 ways to configure the user repository:
> 
>  * JPA
>  * JDBC
>  * File
>  * LDAP
> 
> 
> Is it possible to use a custom authentication system?
> 
> Ideally, I would like to use my existing useradmin / auth system, which has a REST interface.
> 
> How would one go about doing that?

Hello David,

Nowadays, you would write a UsersRepository implementation interacting
with your REST interface. You would define your custom server reusing
jpa-guice prepackages server guice module but specifying your
UsersRepository rather than the JPA one.

(Guice also allows overrides).

Cheers,
Benoit

> 
> 
> Cheers,
> =David
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org