You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Appling <sa...@automatedlogic.com> on 2013/11/04 22:47:36 UTC

Re: [External] Re: Custom Authenticators

Konstantin Kolinko <kn...@gmail.com> wrote on 11/04/2013 03:11:52
PM:

> From: Konstantin Kolinko <kn...@gmail.com>
> To: Tomcat Users List <us...@tomcat.apache.org>
> Date: 11/04/2013 03:10 PM
> Subject: [External] Re: Custom Authenticators
>
> 2013/11/4 Steve Appling <sa...@automatedlogic.com>:
> >
> >
> > In Tomcat 7 I could use the org.apache.catalina.startup.Embedded class'
> > addAuthenticator method to set up my own custom authenticators.  This
> > allowed me to define a new authenticator that a web-app could select
with
> > <auth-method/> in web.xml.  Now that the Embedded class has been
removed
> > (in 8), I'm not sure how to accomplish this.  Is there some way to add
a
> > similar custom authenticator when using the Tomcat class?
>
> How to you configure it when running standalone?
>
> E.g (from TestDigestAuthenticator.java of Tomcat 7):
> .
>         ctxt.getPipeline().addValve(new DigestAuthenticator());
>
> Best regards,
> Konstantin Kolinko

Currently I am only running it embedded in another application.  I'm not
sure I understand your question about standalone.
I know that the containing application can manually add any authenticator
as a valve, but I have various web applications that are added to the
product at runtime.  The technique of using the addAuthenticator method
lets the developer of the web application select my custom authenticators
using the auth-method element.

Re: [External] Re: Custom Authenticators

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/11/5 Steve Appling <sa...@automatedlogic.com>:
>
> Konstantin Kolinko <kn...@gmail.com> wrote on 11/04/2013 03:11:52
> PM:
>
>> From: Konstantin Kolinko <kn...@gmail.com>
>> To: Tomcat Users List <us...@tomcat.apache.org>
>> Date: 11/04/2013 03:10 PM
>> Subject: [External] Re: Custom Authenticators
>>
>> 2013/11/4 Steve Appling <sa...@automatedlogic.com>:
>> >
>> >
>> > In Tomcat 7 I could use the org.apache.catalina.startup.Embedded class'
>> > addAuthenticator method to set up my own custom authenticators.  This
>> > allowed me to define a new authenticator that a web-app could select
> with
>> > <auth-method/> in web.xml.  Now that the Embedded class has been
> removed
>> > (in 8), I'm not sure how to accomplish this.  Is there some way to add
> a
>> > similar custom authenticator when using the Tomcat class?
>>
>> How to you configure it when running standalone?
>>
>> E.g (from TestDigestAuthenticator.java of Tomcat 7):
>> .
>>         ctxt.getPipeline().addValve(new DigestAuthenticator());
>>
>> Best regards,
>> Konstantin Kolinko
>
> Currently I am only running it embedded in another application.  I'm not
> sure I understand your question about standalone.
> I know that the containing application can manually add any authenticator
> as a valve, but I have various web applications that are added to the
> product at runtime.  The technique of using the addAuthenticator method
> lets the developer of the web application select my custom authenticators
> using the auth-method element.

The code in Embedded  class ultimately calls
ContextConfig.setCustomAuthenticators(...). Thar API is still
available, but it is not so easy to call it once the Context is
created.

I think the same code could be added to Tomcat.addWebapp(...) method.

Please file an enhancement request in Bugzilla.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org