[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #RFA-833968]: file's thredds catalog uri



Hi Jason:

Yes, I think you are right. I was thinking that you couldnt access thredds code 
from a filter, but now that i think about it, it seems ok.
The TDS will do the restriction for you, why do you want it in a filter?

John 

> John,
> 
> I figured out a solution but I would like to run it past you to see what you 
> think. The DatasetHandler has a public static method which is used by the 
> TomcatAuthorizer to make this very determination:
> 
> public Boolean isRestrictedAccess(HttpServletRequest httpRequest) {
> 
> String resourceControl = 
> DatasetHandler.findResourceControl(httpRequest.getPathInfo());
> 
> if (resourceControl == null) {
> return false;
> }
> 
> return true;
> }
> 
> Jason
> 
> Jason Cunning
> 303-497-1297
> address@hidden
> 
> 
> On May 21, 2014, at 11:13 AM, Jason Cunning <address@hidden> wrote:
> 
> > John,
> >
> > I guess it might be easier if I tell you what I'm trying to figure out 
> > first. Maybe there's a better way.
> >
> > I'm trying to figure out if the threads catalog to which the file belongs 
> > has the restrictAccess attribute set, that is, if authentication and 
> > authorization are necessary for that file. Is there a way to do that within 
> > a filter only knowing the file being served? My original thought was to 
> > create the InvDataset Java object with the thredds catalog uri and query it 
> > but maybe that's not necessary.
> >
> > Thank you!
> >
> > Jason
> >
> > Jason Cunning
> > 303-497-1297
> > address@hidden
> >
> >
> > On May 20, 2014, at 4:49 PM, "Unidata THREDDS Support" <address@hidden> 
> > wrote:
> >
> >> Hi Jason:
> >>
> >> No theres no way to determine that, sorry.
> >>
> >> John
> >>
> >>
> >>> Hi,
> >>>
> >>> My name is Jason Cunning and I work up at the MESA lab on the ESG Gateway.
> >>>
> >>> Question:
> >>>
> >>> Within a filter configured in the web.xml file of the Tomcat instance 
> >>> running Thredds, is there a way to determine the thredds catalog uri to 
> >>> which the file being served actually belongs?
> >>>
> >>> Appreciate any help!
> >>>
> >>> Jason
> >>>
> >>> Jason Cunning
> >>> 303-497-1297
> >>> address@hidden
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >> Ticket Details
> >> ===================
> >> Ticket ID: RFA-833968
> >> Department: Support THREDDS
> >> Priority: Normal
> >> Status: Open
> >>
> >
> 
> 

Ticket Details
===================
Ticket ID: RFA-833968
Department: Support THREDDS
Priority: High
Status: Open


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.