[undertow-dev] Access control examples

Stuart Douglas sdouglas at redhat.com
Fri Aug 10 02:47:40 EDT 2018


It depenends a bit on what you want to do.

If you just want to block /CFIDE you can just use a PredicateHandler, with
a PathPrefixPredicate, and if it matches use ResponseCodeHandler to return
the desired response code. You could combine it
with io.undertow.server.handlers.AccessControlListHandler
or io.undertow.server.handlers.IPAddressAccessControlHandler if you want to
limit the IP range.

Basically you just use a predicate to decide what you want to restrict, and
then map it to a handler that either rejects the request outright or
performs an access control check.

Stuart


On Fri, Aug 10, 2018 at 3:59 PM Brad Wood <bdw429s at gmail.com> wrote:

> Anyone?
>
> Thanks!
>
> ~Brad
>
> *Developer Advocate*
> *Ortus Solutions, Corp *
>
> E-mail: brad at coldbox.org
> ColdBox Platform: http://www.coldbox.org
> Blog: http://www.codersrevolution.com
>
>
>
> On Sat, Aug 4, 2018 at 4:48 PM Brad Wood <bdw429s at gmail.com> wrote:
>
>> Hi, I'm looking for some examples of locking down access to certain
>> directories, similar to how IIS has "hidden segments".  For instance, I'd
>> like all URLs starting with /CFIDE to be blocked, or perhaps only access to
>> a certain range of IPs
>>
>> I swear I had looked at some examples of this about a year ago, but after
>> quite a lot of Googling today I was coming up empty handed.  I found some
>> basic information on the access control handlers, but couldn't find a
>> single example of using them.
>>
>> Thanks!
>>
>> ~Brad
>>
>> *Developer Advocate*
>> *Ortus Solutions, Corp *
>>
>> E-mail: brad at coldbox.org
>> ColdBox Platform: http://www.coldbox.org
>> Blog: http://www.codersrevolution.com
>>
>> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20180810/721400f9/attachment.html 


More information about the undertow-dev mailing list