Re: URL pattern /admin/*
Vijay Balakrishnan <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I was wondering if somebody (Sergey) could show me
some code that overrides the ApplicationGateway and
Also the method of mapping the event classes to
url-patterns like "/Common/*"
I am thinking of overriding the handleDefaultExt() method in
ApplicationGateway to check for /Common/*.event and then apply
security policies.We have a requirement to implement a
Role Based Access Control(hierarchical) authorization scheme
using web.xml as well as the Master gateway filtering of roles.
Thanks,
Vijay
From the archives:
http://barracudamvc.org/lists/archives/barracuda/2003-January/005729.html
Hi Christian,
Yes, I think it would be really helpful to have the app gateway store =
the path information somewhere near the event. Currently we are parsing =
the URI second time in order to get this path.
Our security scheme is somehow cross between the Barracuda' way and the =
"standard" way:
- we map allowed event patterns on security roles in web.xml
- we define base events classes, something like CommonEvent,=20
UserManagementEvent, SysAdminEvent, etc. Concrete=20
application events are extending these base classes.
- we define a mapping between the base event classes and path=20
patterns:
CommonEvent=3DCommon
SysAdminEvent=3DSysAdmin
...
where the right part is the path (i.e. /Common/Login.event)
Now, when the event arrives, we only permit the events with the correct =
path prefix (defined by our event class to path map). The rest will be =
handled by the servlet container - security role check, login forms, =
session time-outs, etc.
This scheme works well for us. Need to maintain the event-to-path map =
could be seen as a bad idea, but in our case, the simple XSLT script =
construct this map directly from the events.xml file during the build.
Sergey