maoyuan121 / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

PATCH: Allow remote access by subnet #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I added in the following patch to allow remote access, but restrict it by 
subnet.  This way you can give remote access to only the subnets you wish.

The security node on the config now can be this:

<security allowSubnetAccess="1" 
allowedSubnetMasks="192.168.3.*;192.168.4.*;192.168.5.*" />

Subnets must be ';', ',', or '|' delimited.  No spaces.

Enjoy.

Original issue reported on code.google.com by miketrio...@gmail.com on 19 Nov 2010 at 11:39

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for submitting this patch. Have you incidentally looked into request 
authorization that is already part of ELMAH? It is precisely designed to allow 
adding more complex authorization rules in a more modular and pluggable 
fashion. I think it would be interesting to rewire your patch/feature as an 
IRequestAuthorizationHandler implementation.

The biggest benefits of this approach would be modularity as well as not 
requiring changes existing code, such as ErrorLogPageFactory. Since we are 
getting close to the 1.2 release, it would be easier to accept your changes for 
the coming milestone as a separate module. It won't require a review of changes 
to existing code and especially when it concerns security.

If you have questions about IRequestAuthorizationHandler mechanics then I'd be 
happy to help. Meanwhile, you'll find pleny of information, including a sample, 
in the following thread:
https://groups.google.com/group/elmah/t/520d9cc827176d85

Original comment by azizatif on 20 Nov 2010 at 3:04

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 6 Jan 2011 at 6:42

GoogleCodeExporter commented 9 years ago
This has been migrated to the ELMAH Sandbox project for now and implemented[1] 
as a stand-alone module.

[1] 
http://code.google.com/p/elmah-sandbox/source/detail?r=4f0ece3f55b549e94b5f6f67e
166c9c0b688987e

Original comment by azizatif on 6 Jan 2011 at 7:08