Skip to main content

Monitoring the Authorization Server

HTTP Monitoring

There are different ways to monitor the functioning of the FPX Authorization server.

Public HTTP Endpoint

One of the methods is through a public HTTP endpoint that will indicate whether the application is running properly or not. This method uses the following endpoint:

/.well-known/fpx/version

A request to the above endpoint returns an HTTP 200 status code with information about the application (version, name, release date, etc).

Sample response:

{
"version":"2.x.x",
"name":"The Federated Privacy Exchange Authorization Server was built by Identos",
"release_date":"yyyy-mm-dd",
"homepage":"https://identos.ca"
}
note

There are also additional endpoints available that can be used to test the functionality of the FPX Authorization Server that do not require authentication such as the public registry endpoints. However, these should be avoided as their use can cause additional load on the server.

Spring Actuator

Spring Actuator can be used to monitor the health of the application. Spring Actuator, a sub-project of the Spring Boot Framework, has various features that allow us to monitor and manage an application. One of those features is the actuator endpoints. The actuator endpoints, based on the endpoints that are enabled, allow us to retrieve specific information about the application.

In order to monitor the health of the Authorization Server using Spring Actuator, you can enable the health endpoint and make use of the built-in "liveness" and "readiness" health checks. These health checks are designed to provide information about the availability of your application. The information on the liveness and readiness of your application is retrieved from "ApplicationAvailability". This information is then presented as Health Indicators called LivenessStateHealthIndicator and ReadinessStateHealthIndicator, which you can access at the global health endpoint /actuator/health.

The /actuator/health endpoint returns a JSON response (as shown below) that includes information on the liveness and readiness states, allowing you to gauge the current health status of your application.

{
"status": "UP",
"groups": [
"liveness",
"readiness"
]
}

This information is also exposed through separate HTTP Probes using Health Groups such as /actuator/health/liveness and /actuator/health/readiness, as elaborated below.

Liveness State

The liveness status indicates whether an application's internal state allows it to work properly or recover if it's failing. A broken liveness state means the application cannot recover and should be restarted.

The following response is received when making a call to the /actuator/health/liveness endpoint.

{
"status": "UP"
}

Readiness State

The readiness status indicates whether an application is ready to handle traffic. A failing readiness state means that traffic should not be routed to the application.

The following response is received when making a call to the /actuator/health/readiness endpoint.

{
"status": "UP"
}

Configuration

The Spring Actuator feature is configured through the Admin API. Refer to the following link for configuration details.

Logs

The logs output by the Authorization Server can also be used to monitor the usage of the Authorization Server. It is important to monitor all instances of the Authorization Server that are running and aggregate the logs into a SIEM product of choice.

Alert Levels

Logs will include two pieces of information including alert level and error code that can be used to analyze the logs. Alert level can be extracted using the regular expression

Alert\-Level: [1,2,3]

As an example:

01-10-2020 20:43:10.469 [https-jsse-nio-8080-exec-7] ERROR audit.error - Activity: GET https://authserver.identos.ca/registry/resource/resource_definition/identos-client, Alert-Level: 1, Message: No such resource identos-client found, Code: 40280, Request-Address: 100.117.182.129

There are three different alert levels that can be generated:

  • Level 1: malicious user or simple security breach attempt (eg: invalid username/password combo), incorrect configuration.
  • Level 2: partner using bad program logic (no such permission), bad state (resource does not exist), more serious bad configuration (IDP signature incorrect), an authenticated user with bad data
  • Level 3: bad state, bad configuration, authenticated user or system attempting dangerous action (the scope was not requested/authorized), potential malicious actor successfully impersonating user/system (refresh token has already been refreshed).

Alert levels of 3 should trigger action to remedy and/or investigate the issue.

Authorization Server Exception Types

The following tables list the different Exception Type messages that are part of the Authorization Server log output along with the alert severity levels:

note

The Alert Level of 0 indicates an informational message and does not have any severity level associated with it.

IDN Exceptions and Show Error Page Exception

Alert LevelLookup CodeMessage
101.001.001"An internal server error occurred: {0}"
101.001.002"Resource of type [{0}] is invalid."
101.001.003"Ticket [{0}] was not found"
201.001.004"The JWT could not be parsed"
101.001.005"Invalid Request: {0}"
101.001.006"Access denied"
101.002.001"No scope named [{0}] was found in the access token"
101.002.002"Permission [{0}] was not found on the ID token."
301.002.003"The permission uses a resource type not requested in the ticket."
301.002.004"The scope [{0}] was not required in the ticket"
201.002.005"No access to a permission with ID [{0}]"
101.002.006"Permission/permissions were not found: {0}"
301.002.007"Client is not able to request the requested resource"
101.003.001"The scope [{0}] is not allowed to be used on this resource type"
201.003.002"Resource with ID [{0}] was not found"
301.003.003"No resource was found of resource definition type [{0}] at Resource Server [{1}]"
201.003.004"No resource definition of the type [{0}] has been found"
301.003.005"Non-unique resource was found of resource definition type [{0}] at Resource Server [{1}]"
101.004.001"The requested resource capability for resource ID [{0}] was not found."
201.005.001"Resource Server corresponding to audience claim [{0}] is not registered."
201.006.001"The identity request is invalid: {0}"
101.007.001"No scope named [{0}] found"
201.007.002"The Resource Server does not provide the [{0}] scope"
101.008.001"The Request ID is invalid: {0}"
101.009.001"The login hint [{0}] is invalid."
201.009.002"Wallet with ID [{0}] is not registered."
201.009.003"OAuth Client with ID [{0}] is not registered as a Wallet."
101.010.001"Administrator has disabled entity used in the request"
101.010.002"This Wallet has been disabled by an administrator"
301.011.001"No data converter is suitable to convert the data to or from the internal data format. {0}"
201.011.002"The requested scope [{0}] is currently not supported"
101.011.003"The permission request was invalid: {0}"
201.011.004"The resource was not found for resource server [{0}] and resource definition of type [{1}]."
201.011.005"The scope [{0}] is not allowed to be used on this resource type"
101.012.001"Uma Client with ID [{0}] was not found"
201.012.002"OAuth Client with ID [{0}] is not set up as an UMA client"
101.013.001"No claims gathering request was found with ID [{0}]"
301.013.002"Unauthorized access to Capability Ticket [{0}] by OAuth Client [{1}]"
101.013.003"The client credentials were not valid: {0}"
101.014.001"Ticket [{0}] has been redeemed or is not the most recent ticket"
301.014.002"Ticket [{0}] was redeemed by another client"
101.015.001"The requested permission was not found: {0}"
301.016.001"JTI has already been redeemed"
201.016.002"JTI claim must be present in JWT"
200.000.000"Internal server error occurred"

OAuth2 Exceptions

Alert LevelLookup CodeMessage
201.009.001"invalid_client"
101.009.002"invalid_grant"
201.009.003"invalid_client_metadata"
101.009.004"invalid_grant"
201.009.005"invalid_resource_id"
201.009.006"invalid_scope"
001.009.007"need_info"
201.009.008"request_denied"
201.009.009"unsupported_grant_type"

OAuth Provider Exceptions

Alert LevelLookup CodeMessage
306.001.000"An internal server error occurred."
206.001.001"Malformed application/x-www-form-urlencoded request"
306.001.002"An internal server error occurred. {0}"
206.001.003"Authorization header was invalid."
206.001.004"No matching access token found."
206.001.005"No matching refresh token found."
106.001.006"Access token has expired."
106.001.007"Access token has been disabled and is no longer valid."
106.001.008"Refresh token has expired."
106.001.009"The refresh token provided is invalid, please obtain authorization again"
206.001.010"Client with ID [{0}] was not found."
206.001.011"Proof Key for Code Exchange (PKCE) authentication failed."
206.001.012"The code challenge is invalid - must be between 43 and 128 characters."
206.001.013"Code challenge is required"
206.001.014"The code verifier is invalid."
206.001.015"Code challenge method is missing or must be set to S256"
206.001.016"Authorization code was not found or has been redeemed"
206.001.017"Authorization code is expired."
306.001.018"This authorization code is for a different client."
306.001.019"This refresh token is for a different client."
306.001.020"This token was issued for a different client and cannot be revoked by the requesting client with ID [{0}]"
206.001.021"This response type [{0}] is not supported."
206.001.022"No request authorization could be retrieved."
206.001.023"The client credentials were not valid or not supported: {0}"
306.001.024"Failed to retrieve the tokens."
206.001.025"The redirect URI [{0}] is not registered for OAuth Client with ID [{1}]"
106.001.026"The redirect_uri cannot be empty or null"
206.001.027"The redirect_uri does not match the initial request redirect_uri"
306.001.028"The request is invalid"
206.001.029"The client secret is incorrect."
206.001.030"The provided grant type [{0}] is not supported."
206.001.031"This access token does not provide sufficient scopes."
306.001.032"The requested scope [{0}] is invalid or exceeds the scope granted by the resource owner."
306.001.033"No data converter is suitable to convert the data to or from an internal data format."
206.001.034"Invalid parameter or malformed request supplied, no request type found."
206.001.035"Invalid parameter or malformed request supplied: {0}"
106.001.036"The request is invalid: {0}"
306.001.037"No suitable request converter, {0}"

OAuth Client Exceptions

Alert LevelLookup CodeMessage
204.001.100"Unable to retrieve the access token"
304.001.101"Unable to create client auth for token endpoint"
304.001.102"No ongoing transaction found for this state value: [{0}]"
204.001.103"OAuth transaction has expired, please try again"
204.001.104"UMA transaction took too many trips without completing"
304.001.105"Unable to retrieve provider metadata from well-known endpoint"
304.001.106"OAuth Provider did not have a JWK set registered."
304.001.107"OAuth Provider with issuer URI [{0}] is not registered."
204.001.108"Unable to fetch UserInfo"
204.002.001Message from an OAuth Client Token Error varies, returned from downstream provider.

Service Provider Exceptions and Need Info Exception

Alert LevelLookup CodeMessage
305.001.001"Could not parse FPX RPT. The subject of the RPT did not match the ticket_value of the Permission Ticket"
305.001.002"Could not parse FPX RPT. The resource_type and/or resource_location of an Access Token are null."
305.001.003"Could not parse FPX RPT. Please contact your administrator."
305.002.001"Received unexpected response from RS: {0}"
205.003.001"Could not find Capability Ticket with name [{0}]"
305.003.002"Could not exchange Capability Ticket at the Authorization Server."
205.004.001"No active transactions found for state value: [{0}]"
005.000.001"need_info"

Claim Restriction Exceptions

Alert LevelLookup CodeMessage
206.000.001"claim has been restricted"

JWT Exceptions

Alert LevelLookup CodeMessage
307.001.001"unable to load jwks from url"
307.001.002"provided jwt is invalid"
307.001.003"JWT could not be parsed"
307.001.004"JWT signature is invalid"
307.001.005"Issuer does not match JWT."
307.001.006"JWT could not be signed"
307.001.007"provided JWT was not signed"
307.001.008"idtoken did not validate"

Framework and HTTP Exceptions

Alert LevelLookup CodeException NameExample Message
100.000.001Authentication Exception"Access denied - unauthenticated"
100.000.002Access Denied Exception"Access denied - unauthorized"
100.000.003HTTP Request Method Not Supported"HTTP method not supported. Check the 'Allow' response header to see supported methods."
100.000.004Missing Servlet Request Parameter"Required request parameter 'request_param_1' for method parameter type int is not present"
100.000.005Request Rejected"The request was rejected because the URL contained a potentially malicious String \"//\""
100.000.006No Handler Found"Not found - no handler for GET /non-existent-path"
100.000.007HTTP Message Not Readable"HTTP message could not be read: if this is a POST request, check that you included a request body."
100.000.008HTTP Media Type Not Supported"Content type 'text/html' not supported"
100.000.009Method Argument Type Mismatch"Invalid boolean value [not-a-boolean]"
100.000.010Binding Error"Binding error: see the error_list for details"
100.000.010Constraint Violation"Constraint violation: [request_arg must not be blank, request_arg size must be between 2 and 3]"