Class IPRangeAccessControl

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
    • Constructor Detail

      • IPRangeAccessControl

        public IPRangeAccessControl()
        Constructor.
    • Method Detail

      • setAllowedRanges

        public void setAllowedRanges​(@Nonnull @NonnullElements
                                     Collection<IPRange> ranges)
        Set the CIDR address ranges to allow.
        Parameters:
        ranges - ranges to allow
      • checkAccess

        public boolean checkAccess​(@Nonnull
                                   javax.servlet.ServletRequest request,
                                   @Nullable
                                   String operation,
                                   @Nullable
                                   String resource)
        Determine whether the request to the resource should be granted.
        Specified by:
        checkAccess in interface AccessControl
        Parameters:
        request - request to check
        operation - operation being performed
        resource - target resource
        Returns:
        true iff access should be granted
      • getLogPrefix

        @Nonnull
        private String getLogPrefix()
        Get logging prefix.
        Returns:
        prefix