Skip to content

Security Configuration

Anthony Sena edited this page Dec 18, 2020 · 6 revisions

WebAPI Security Configuration

This guide will guide through the details required to configure the WebAPI security mechanisms.


Security in WebAPI involves authentication and authorization. Authentication verifies you and who you say you are while authorization decides if you have permission to access a resource. The WebAPI security subsystem is built on top of Apache Shiro framework to facilitate this functionality. For more details on the implementation of security in WebAPI, please refer to the Security Implementation guide.

Authentication Configuration

By default, security is disabled for WebAPI. This guide will provide an overview of how to enable security and go through the various options for securing the REST endpoints. This guide assumes you have read through the WebAPI Installation Guide and are familiar with modifying your settings.xml to configure the application.

Enable Security & Secure Socket Layer (SSL)

The <security> settings are controlled via the settings.xml. The relevant security-related settings are shown below

  • security.provider: The default is DisabledSecurity. To enable security in the application this value is set to AtlasRegularSecurity.
  • security.token.expiration: The expiration for the security bearer token.
  • security.origin: Use * to allow any client to connect to the REST endpoints. This setting is used to narrow the scope of clients that are able to connect to the REST endpoints. You may set this to a specific client application (i.e. and WebAPI will only accept connections originating from this domain.
  • server.port: This setting specifies the port to use to listen for client connections. The default is 8080 and this value is generally switched to 443 when using a secured connection.
  • security.ssl.enabled: Set to true to enable SSL for encrypting connections to the REST endpoints. Check the SSL Configuration In Tomcat guide for more information on how to set up a server to use SSL.
  • server.ssl.key-store, server.ssl.key-store-password: Specify the location of the server.ssl.key-store and server.ssl.key-store-password for use with the SSL Configuration In Tomcat.
  • security.cors.enabled: Set to true to enable Cross-Origin Resource Sharing CORS

Once AtlasRegularSecurity is enabled, you will be able to utilize the authentication mechanisms detailed below.

Lightweight Directory Access (LDAP)

The following settings are used to control LDAP settings:

  • security.ldap.dn: The LDAP distinguished name
  • security.ldap.url: The LDAP URL
  • security.ldap.baseDn: The LDAP base distinguished name
  • security.ldap.system.username: User name for accessing LDAP
  • security.ldap.system.password: Password for the username

Active Directory (AD)

The following settings are used to control Active Directory settings:

<>30000</> <!-- 0 means no limit -->
  • The LDAP endpoint for AD
  • The search base for AD
  • The user principal name suffix
  • The username for accessing AD
  • The password for username above.
  • Use to configure a search filter
  • true/false
  • Limit the number of AD results to 0 means no limit
  • The group to use for importing users from AD into WebAPI's configuration database.
  • The name of field in AD where user login is stored

Some additional details around Active Directory configuration can be found in this WebAPI GitHub Issue (#1373).


Please see the setup notes included in the WebAPI Repository.

OpenID configuration

The following settings are used to control OpenID settings:

  • security.oid.clientId: The OpenID client ID
  • security.oid.apiSecret: The API secret key provided by the OpenID provider
  • security.oid.url: The OpenID URL to use for authentication
  • security.oid.redirectUrl: The callback URL to use for redirecting users to the application

Central Authentication Security (CAS)

The following settings are used to control CAS settings:

  • security.cas.loginUrl: The login URL
  • security.cas.callbackUrl: The callback URL to call after a successful login
  • security.cas.serverUrl: The CAS server URL
  • security.cas.cassvcs: The CAS service
  • security.cas.casticket: The CAS ticket

OAuth configuration

WebAPI uses pac4j to provide support for several OAuth authentication services. Here are the relevant settings.xml entries to utilize OAuth for authentication. It is important to note that if you plan to use OAuth with the providers below you must ensure that the machine hosting WebAPI has Internet & Firewall access to the OAuth endpoints.


  • security.oauth.callback.ui: Specifies the callback URL to use when authentication is complete.
  • security.oauth.callback.api: Specifies the callback URL for OAuth - this will need to point to your WebAPI instance.
  • security.oauth.<provider>.apiKey, security.oauth.<provider>.apiSecret: Currently WebAPI supports OAuth through Google, Facebook and GitHub. The corresponding OAuth provider will provide the values for the API Key and API Secret for these settings.

Google Cloud Identity-Aware Proxy (IAP)

The following settings are used to control Google IAP settings:

  • security.googleIap.cloudProjectId: The Google cloud project ID.
  • security.googleIap.backendServiceId: The Google backend service ID.

Basic Security Configuration

Please see the Basic Security Configuration guide for a set up that allows for a separate credential data store.


Authorization is handled based on the REST endpoint URL and HTTP method of the request. This portion of the configuration is data-driven with the relative endpoint paths stored in the sec_permission table of the WebAPI database. For more details, please see the Authorization section of the Security Implementation.

ATLAS Role Based Security

Authorized routes can be grouped into roles in the system and applied to users. See the Atlas Security section to see how this is facilitiated through a user interface in ATLAS.