On Sun, Dec 7, 2008 at 7:02 PM, Claudia Juergen <
[EMAIL PROTECTED]> wrote:

> Hi Andrew,
>
> it is possible to use wildcards and/or ranges.


>>> you can add ip based authentication to the authentication stack in
> >>> DSpace and define authentication rules via the config parameter
> >>> authentication.ip.GROUPNAME = iprange[, iprange ...].
>

Thanks again! This is really interesting. This made me go and look at the
source, where I found IPMatcher.java. This does indeed do the job. It also
confirms something I have been thinking about this last week. I was tasked
with implementing something similar only using data stored in a relational
DB. The DB access is via the ORM tool Hibernate. The table in question is
populated with rows that correspond to the expanded definition given by the
initial IP address range specifier. A very early thought of mine was that it
would be much more efficient and much simpler to just expand the specifier
and compare against an incoming IP address without using a table.

Unfortunately this idea was rejected. I was told that using the DB should
present no performance problems and might even be quicker than what I was
going to do. They may have been right with my implementation. Mine did not
make use of the netmask optimisation like IPMatcher does. But using netmask
I think the IPMatcher approach will be beat any DB implementation hands
down!

I wonder if the syntax accepted by IPMatcher could be extended. At the
moment you can say 12.34.56 which means 12.34.56.0 to 12.34.56.255. How
about using hyphens for ranges, e.g 12.34.56.0-255. '*' would be a synonym
for 0-255 so you could also say 12.34.56.*. But you could say 12.34.56.0-100
for a slightly more restrcted range. Do people think this might be useful?

-- 
Regards,

Andrew M.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to