Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-485

Restrict HTTP requests to localhost

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:
      HTTP

      Description

      I needed a way to restrict administration operations on a HTTP-based system; it has to be out-of-the-box configuration (the user can then make changes). The solution was to limit access to localhost.

      Attached are:

      • LocalhostFilter for HTTP requests - request must come from localhost (IPV4 or IPv6). Unlike HostFilter, this is specifically localhost.
      • AuthorizationFilter403 for HTTP requests - if denied, give a 403 response.
      • DenyFilter - deny, always (for testing).

      Tested with Jetty.

      Taken from https://svn.apache.org/repos/asf/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/authz/. This location should to (probably) https://svn.apache.org/repos/asf/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/authz/ at some point in the future.

        Attachments

        1. LocalhostFilter.java
          2 kB
          Andy Seaborne
        2. DenyFilter.java
          1 kB
          Andy Seaborne
        3. AuthorizationFilter403.java
          2 kB
          Andy Seaborne

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andy Andy Seaborne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: