Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-254

IPAddressAccessControlHandler should allow for alternative error codes

    XMLWordPrintable

Details

    • Low

    Description

      The `IPAddressAccessControlHandler` returns an 403 (Forbidden) when a caller is not allowed through. This handler is a nice bit of functionality for the use of CIDR rules.

      However, sometimes an application may want to return a 404 (Not Found) when they don't want to expose sensitive administrative endpoints. This is important when a service is exposed externally.

      The `IPAddressAccessControlHandler` can be subclassed and the `handleRequest` method overwritten, but both the return code can not be altered and the `isAllowed` function is package private.

      To solve this either the `isAllowed` should be changed to be protected or allow the return code to be set.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            vonnagy Ivan von Nagy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: