Interface Agent

All Superinterfaces:
Component, IdentifiedComponent
All Known Implementing Classes:
BasicAgent

@ThreadSafe public interface Agent extends IdentifiedComponent
Represents a deployment of an SP "Agent", the stub that operates in a web server or application and leverages the Hub to secure access to resources.

This interface primarily houses the security information used to protect access to the Hub and acts as a container for one or more Application definitions.

  • Field Details

  • Method Details

    • getAllowedAddressRanges

      @Nonnull Set<IPRange> getAllowedAddressRanges()
      Get the network addresses or ranges of addresses from which requests from this agent may originate.
      Returns:
      set of address ranges
    • getAuthenticationMethod

      @Nullable @NotEmpty String getAuthenticationMethod()
      Get the authentication method to use for the agent.

      Authentication methods are in addition to address restrictions.

      The only currently defined value is AUTH_METHOD_BASIC.

      Returns:
      authentication method/type, null for none
    • getCredentials

      @Nonnull Map<String,String> getCredentials()
      Get the credentials configured to authenticate requests from this Agent.

      The map keys expose the "identifiers" usable by the Agent when authenticating itself (service account username(s) in other words). The values MAY be null in the case that actual authentication is handled using LDAP, Kerberos, etc., but MAY be populated for direct configuration of shared secrets.

      If a map key is null, then the Agent's unique ID can be used as a "username".

      Returns:
      set of username/shared secret mappings, either of which may be null
    • isAllowed

      boolean isAllowed(@Nonnull InetAddress address)
      Returns true iff the supplied address matches one of the allowed ranges.
      Parameters:
      address - address to test
      Returns:
      true iff the supplied address matches one of the allowed ranges
    • isSupportsCachedAuthentication

      boolean isSupportsCachedAuthentication()
      Returns true iff the agent supports cached authentication via cookie.
      Returns:
      true iff the agent supports cached authentication via cookie
    • isSupportsPostPreservation

      boolean isSupportsPostPreservation()
      Returns true iff the agent is permitted to submit form data to preserve during SSO.

      Defaults to false.

      Returns:
      true iff the agent is permitted to submit form data to preserve
    • getPostLimit

      @NonNegative long getPostLimit()
      Gets the size limit to apply to form data preservation attempts.

      The default is 1024 * 1024.

      Zero indicates no inherent limit.

      Returns:
      size limit for form data preservation
    • getCharacterEncoding

      @Nonnull Charset getCharacterEncoding()
      Gets the character encoding to apply during URI processing and POST recovery.

      Defaults to UTF-8.

      Returns:
      name of encoding
    • getApplication

      @Nullable Application getApplication(@Nonnull @NotEmpty String id)
      Get an Application associated with this agent.
      Parameters:
      id - application id
      Returns:
      the corresponding application or null
    • getApplications

      @Nonnull Collection<Application> getApplications()
      Get all Application instances associated with this agent.
      Returns:
      collection of applications