Well you are welcome to make a change request; pass in some kind of factory
that provides the HttpHandler as needed? It may be similar to Gabriel's patch
(perhaps you can look and report back).
--
Jody Garnett
On Friday, 30 September 2011 at 9:16 PM, Chris Brundick wrote:
>
> I'm working strictly on the client side. On the server side are government
> services that I need to access and are only available with smart card based
> certificate authentication. I've got the authentication piece working using
> PKCS#11 libraries. I am able to configure an HttpHandler with this
> authentication and call the handlers executeMethod() and get a
> GetCapabilities response from the WMS. I was hoping there might be some way
> to get the geotools classes (e.g. WebMapServer, WMSCapabilities, ...) to use
> my HttpHandler.
>
> Chris
>
> Date: Fri, 30 Sep 2011 10:42:12 +1000
> From: jody.garn...@gmail.com (mailto:jody.garn...@gmail.com)
> To: andrea.a...@geo-solutions.it (mailto:andrea.a...@geo-solutions.it)
> CC: cbrund...@hotmail.com (mailto:cbrund...@hotmail.com);
> geotools-gt2-users@lists.sourceforge.net
> (mailto:geotools-gt2-users@lists.sourceforge.net)
> Subject: Re: [Geotools-gt2-users] Using geotools with certificate
> authentication
>
> I uDig we use this code and configure Java to prompt the user for basic
> authentication:
> -
> https://github.com/uDig/udig-platform/blob/master/plugins/net.refractions.udig.ui/src/net/refractions/udig/internal/ui/UDIGAuthenticator.java
>
> Summary: you can register your own "authenitcator" in Java (recommended if
> you are using this on the server side without access to a user).
> - http://download.oracle.com/javase/6/docs/technotes/guides/net/http-auth.html
>
> GeoTools also contains a WFSAuthenticator for this purpose in order to supply
> the user name and password connection parameters to the WFSDataStore.
> --
> Jody Garnett
>
>
> On Friday, 30 September 2011 at 2:21 AM, Andrea Aime wrote:
>
> > On Thu, Sep 29, 2011 at 5:49 PM, Chris Brundick <cbrund...@hotmail.com
> > (mailto:cbrund...@hotmail.com)> wrote:
> > >
> > > I've just started playing with the geotools libraries (and web services
> > > in general). Has anyone here used geo-tools to access sites that require
> > > authentication through smart card certificates? I've sucessfully
> > > configured the authentication piece. I am able to perform a
> > > GetCapabilities request using an HttpHandler with authentication. But,
> > > I'm not sure how I can use this handler to configure a geotools
> > > WebMapServer object. If I just pass the constructor the URL, the security
> > > checks fail. Is there a way to use my HttpHandler with these components?
> > >
> > > As I mentioned, I'm new to all this so if I've left out any important
> > > information or something I've said doesn't make sense please let me know
> > > and I'll attempt to explain better.
> >
> > The current code does not even support basic authentication, but Gabriel,
> > cc'ed, is adding a patch
> > for that, see here:
> > http://jira.codehaus.org/browse/GEOT-3860
> >
> > The patch is about to be committed (on trunk at least, not sure if on 2.7.x
> > as well) and
> > introduces a interface to isolate from the actual HTTP library used in the
> > background,
> > with two implementations, commons http client and plain jdk, not sure if
> > it's pluggable,
> > but if it is you may be able to build and inject your version too
> >
> > Hopefully Gabriel will see this one, otherwise you may also comment on the
> > above
> > ticket
> >
> > Cheers
> > Andrea
> >
> >
> >
> > --
> > -------------------------------------------------------
> > Ing. Andrea Aime
> > GeoSolutions S.A.S.
> > Tech lead
> >
> > Via Poggio alle Viti 1187
> > 55054 Massarosa (LU)
> > Italy
> >
> > phone: +39 0584 962313
> > fax: +39 0584 962313
> >
> > http://www.geo-solutions.it
> > http://geo-solutions.blogspot.com/
> > http://www.youtube.com/user/GeoSolutionsIT
> > http://www.linkedin.com/in/andreaaime
> > http://twitter.com/geowolf
> >
> > -------------------------------------------------------
> > ------------------------------------------------------------------------------
> > All the data continuously generated in your IT infrastructure contains a
> > definitive record of customers, application performance, security
> > threats, fraudulent activity and more. Splunk takes this data and makes
> > sense of it. Business sense. IT sense. Common sense.
> > http://p.sf.net/sfu/splunk-d2dcopy1
> > _______________________________________________
> > Geotools-gt2-users mailing list
> > Geotools-gt2-users@lists.sourceforge.net
> > (mailto:Geotools-gt2-users@lists.sourceforge.net)
> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users