Web Agents

Access

The following sections describe how to restrict non-essential access to your deployment, and reduce the amount of non-essential information that it provides.

Remove non-essential features

The more features you have turned on, the more features you need to secure, patch, and audit. If something is not being used, uninstall it, disable it, or protect access to it.

Remove non-essential access

Make sure only authorized people can access your servers and applications through the appropriate network, using the appropriate ports, and presenting strong-enough credentials.

Make sure users connect to systems through the latest versions of TLS, and audit system access periodically.

Provide access only as necessary; restrict to required users, and limit their access to the information they need.

Update patches

Prevent the exploitation of security vulnerabilities by using up-to-date versions of the agent and third-party software.

Review and follow the Ping Identity security advisories. Follow similar lists from all of your vendors.

Manage agent sessions

On startup, Web Agent uses the following properties to obtain a session from AM:

The session lifetime is defined by the AM version and configuration, and is essentially indefinite. Consider the following when you configure the agent session lifetime in AM:

  • If the lifetime is too short, the agent has to re-authenticate with AM too frequently, using network bandwidth and delaying user requests.

  • If the lifetime is too long, the CTS can be cluttered with zombie sessions that are no longer in use.

  • A value between 60 minutes and 1440 minutes (24 hours) is suitable for many use cases.

To set the agent session lifetime in AM, add the property com.iplanet.am.session.agentSessionIdleTime to the JVM properties in the AM container, and restart the container. The following example sets the agent session lifetime to 1440 minutes (24 hours):

JAVA_OPTS="$JAVA_OPTS -Dcom.iplanet.am.session.agentSessionIdleTime=1440"

Expire Advanced Identity Cloud and AM sessions

To minimize the time an attacker can attack an active session, set expiration timeouts for every Advanced Identity Cloud and AM session. Set timeouts according to the context of the deployment, balancing security and usability, so that the user can complete operations without the session frequently expiring.

Learn more in OWASP’s Session Management Cheat Sheet.

Set a maximum session lifetime and idle time in Advanced Identity Cloud:
  • In the Advanced Identity Cloud admin UI, select open_in_new Native Consoles > Access Management.

  • In the AM admin UI, select Services > Add a Service and add a Session service.

  • Specify the following properties in minutes:

    • Maximum Session Time

    • Maximum Idle Time

Set a maximum session lifetime and idle time in AM:
  • In the AM admin UI, select Services > Add a Service and add a Session service.

  • Specify the following properties in minutes:

    • Maximum Session Time

    • Maximum Idle Time

Manage cookies

Increase the security of cookies generated by Web Agent or the protected application in the following ways:

  • Change default cookie names: Change the default name of key cookies to prevent cookies from being easily associated with an application. Learn more in Cookies.

  • Configure the secure flag: Ensure all cookies set by the agent are sent only over secure connections by setting Enable Cookie Security to true.

  • Enable support for SameSite rules: Set the SameSite attribute of cookies in SameSite Cookie Attribute to reduce the risk of cross-site request forgery (CSRF) attacks.

    If you set SameSite Cookie Attribute to None, you must also set Enable Cookie Security to true. Browsers reject a SameSite=None cookie without the Secure attribute.

  • Configure the HttpOnly flag: Set Enable HTTP Only Mode to true to create cookies with the HttpOnly flag. This prevents client-side scripts from accessing the cookies, which can help mitigate XSS attacks.

  • Prefix cookie names with __Secure-: Make cookies accessible only from HTTPS sites by prefixing the cookie name with __Secure-. A forged insecure site can’t overwrite a secure cookie.

  • Prefix cookie names with __Host-: Make cookies accessible only on the same host where they are set by prefixing the cookie name with __Host-. A subdomain can’t overwrite the cookie value.

  • Enable RFC 6265 cookie compliance: Set Enable RFC Compliant Cookies to true to enable strict RFC 6265-compliant cookie handling. This limits the cookie value to US-ASCII characters and excludes control characters, whitespace, ", ,, ;, and \\.

    When RFC-compliant mode is enabled, the outcome for a non-compliant cookie value depends on whether Encode Special Characters in Cookies is enabled:

    • When encoding is enabled, any non-compliant characters are percent-encoded before the Set-Cookie header is set.

    • When encoding is disabled, the cookie value is rejected and the Set-Cookie header isn’t set. Web Agent logs a warning advising you to enable encoding.