Re: [thredds] java opendap basic authentication

There is a better way to handle authentication without touching netCDF-java lib (Thanks to Robert B. Schmunk of NASA, the developer of Panoply) and it is well documented at

http://www.unidata.ucar.edu/software/netcdf-java/reference/HTTPauthentication.html

I got into this because I only have the source code of all netcdf-java, and this was the only way that I could use other software that is built on netcdf-java. I just wonder if this would be a good thing to do for developers to add some features like when netcdf-java lib sees a URL like http://user:passwd@host, it will automatically to turn on authentication Credential, and that is what I have done with just a few lines of change.



On Sep 28, 2010 2:41pm, Dennis Heimbigner <dmh@xxxxxxxxxxxxxxxx> wrote:
Can you send your changes (or the complete files)

to me at dmh@xxxxxxxxxxxxxxxx? I want to see what you did.

=Dennis Heimbigner

Unidata



Ying at NCCS wrote:


Hi John,

Sorry if this is not the right place to post this message.

I have problem to use netcdf java (along with opendap.jar etc) to access a remote data (via opendap) that requires basic authentication. Basic authentication does not provide security to the dataset ---but just a sort of limitation for public access. For example, a group researchers want to share datasets that are still under QC, and they certainly want to make sure it is not perceived as data product for all. Anyway popular data analysis software like GrADS and Ferret can all handle URL like http://usr:pass@... to read data. And that was the way I set up servers while I was in Hawaii. Right now, using matlab (if it calls use netCDF java lib) application and GISS Panoply can not read opendap that requires basic authentication. It seems to me that opendap-2.2.jar (by OPENDAP group) and netcdf-4.2.jar (by UNIDATA group) (specifically opendap.dap.DConnect2 and ucar.nc2.dataset.NetCdfDataset ) need basic authentication credential enabled.



I have fixed the problem but it is rather ugly -:) for distribution. I wonder if you developers can put this feature in your development or if there is any tip to share with me that it can be handled in the main method (like to create a static httpClient object that can take care all the authentication challenge all the way down to the lib.



Many thanks..





------------------------------------------------------------------------



_______________________________________________

thredds mailing list

thredds@xxxxxxxxxxxxxxxx

For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/


  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: