[undertow-dev] Make Credential on IdentityManager be a generic parameter

Darran Lofthouse darran.lofthouse at jboss.com
Wed Jul 30 06:14:19 EDT 2014


Hello Miere,

Thank you very much for your comments, at the moment we are actually 
working on another project called wildfly-elytron - at a high level this 
project is providing APIs and SPIs to allow different identity providers 
to be plugged into WildFly for integration with authentication mechanisms.

We haven't started to touch Undertow yet but fairly soon we will need to 
start reviewing the integration with Undertow which will be impacting on 
the area you highlight here.

FYI negotiating supported credential types and strongly types 
acquisition of them is central to Elytron.

Regards,
Darran Lofthouse.


On 29/07/14 13:17, Miere Teixeira wrote:
> Hi devs,
> how you doing?
>
> I was checking out the security API proposed by Undertow and I've
> identified that io.undertow.security.idm.IdentityManager receive an
> empty credential as parameter in two of its methods. After taking a look
> into the Java Docs and the exemple codes I figure out why.
>
> As proposed in the original design, an IdentityManager should know which
> kind of credential was created by the AuthenticationMechanism, cast it,
> and then apply the desired identity match. It means that there's an
> existance relation between both IdentityManager and AuthenticationMechanism.
>
> Maybe, making Credential a generic parameter of IdentityManager it will
> make IdentityManager more plugable. It also forces us the improve
> SecurityContext with this new design.
>
> A little sample copied from BasicAuthenticationMechanism.java[106~110]
> as an exemple.
>
>     final IdentityManager<PasswordCredential> idm =
>     securityContext.getIdentityManagerFor( PasswordCredential.class );
>     final PasswordCredential credential = new PasswordCredential(password);
>     try {
>          final AuthenticationMechanismOutcome result;
>          Account account = idm.verify(userName, credential);
>
>
> Let me know if this makes sense for Undertow needs!
>
> Regards
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>


More information about the undertow-dev mailing list