Re: Limiting access to resources, based on username, not on the user role

2011-09-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 9/23/2011 5:59 AM, Pid wrote: > Your code could request.forward() to another Servlet which > actually returned the image, or could read the image from where it > was stored & serve it directly into the outputstream. Direct-serving would be be

Re: Limiting access to resources, based on username, not on the user role

2011-09-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chema, On 9/23/2011 6:49 AM, Chema wrote: >> >> In your code, you would examine the Principal & see if it had >> permission to proceed. Then return the resource or an error, >> accordingly. >> > > On my way , I would put "your code that examine t

Re: Limiting access to resources, based on username, not on the user role

2011-09-23 Thread Chema
> > In your code, you would examine the Principal & see if it had permission > to proceed.  Then return the resource or an error, accordingly. > On my way , I would put "your code that examine the Principal & see if it had permission " into a custom realm class. This custom realm can check only u

Re: Limiting access to resources, based on username, not on the user role

2011-09-23 Thread Omar Belkhodja
Thanks. It's clear now :) 2011/9/23 Pid > On 22/09/2011 23:23, Omar Belkhodja wrote: > > Thanks Pid. What do you mean by "a mapping" ? Is it some kind of servlet > > that would read the file, and create the HTTP answer after having checked > > the login ? > > An arbitrary URL structure: > > /im

Re: Limiting access to resources, based on username, not on the user role

2011-09-23 Thread Pid
On 22/09/2011 23:23, Omar Belkhodja wrote: > Thanks Pid. What do you mean by "a mapping" ? Is it some kind of servlet > that would read the file, and create the HTTP answer after having checked > the login ? An arbitrary URL structure: /images/{user}/{imageid} If /images/* was secured, then any

Re: Limiting access to resources, based on username, not on the user role

2011-09-22 Thread Jose María Zaragoza
El 23/09/2011, a las 00:10, Pid escribió: > On 22/09/2011 23:03, Omar Belkhodja wrote: >> Hello, >> >> I'm trying to create some kind of web application, that will provide access >> to sensitive data for users. Each user, should login first, then after that >> he will be able to display a set of

Re: Limiting access to resources, based on username, not on the user role

2011-09-22 Thread Omar Belkhodja
Thanks Pid. What do you mean by "a mapping" ? Is it some kind of servlet that would read the file, and create the HTTP answer after having checked the login ? 2011/9/22 Pid > On 22/09/2011 23:03, Omar Belkhodja wrote: > > Hello, > > > > I'm trying to create some kind of web application, that wil

Re: Limiting access to resources, based on username, not on the user role

2011-09-22 Thread Pid
On 22/09/2011 23:03, Omar Belkhodja wrote: > Hello, > > I'm trying to create some kind of web application, that will provide access > to sensitive data for users. Each user, should login first, then after that > he will be able to display a set of pictures. So the url for pictures, > should have a

Limiting access to resources, based on username, not on the user role

2011-09-22 Thread Omar Belkhodja
Hello, I'm trying to create some kind of web application, that will provide access to sensitive data for users. Each user, should login first, then after that he will be able to display a set of pictures. So the url for pictures, should have a protected access, based on the user name. The problem