Policies are tools for managing two aspects of the event reception and distribution process:
The Policies screen displays all existing policies in order of creation. In the Order by field, you can select the desired sorting option:
Creation (desc): default. Lists policies from the most recent to the oldest creation date.
Creation (asc): lists policies from the oldest to the most recent creation date.
Name (desc): lists policies alphabetically, from Z to A.
Name (asc): lists policies alphabetically, from A to Z.
You can also search for policies by name using the NAME field.
The DETAILS column contains the icon, which displays the settings of the selected policy.
The ACTIONS column contains icons for editing and deleting policies.
Interceptors are used for publisher authorization. Five types are available:
Authorization endpoints are defined by context on the Authorizations screen. It has two sections:
IMPORTANTUsing security interceptors is optional. However, if you add policies to your handler, you must configure the authorization URL linked to the interceptor. Except for "IP Filtering Validation," all depend on this configuration to function. If you plan to use the Sensedia API Platform for this, see how to [obtain the authorization URL](/docs/events-hub/authorizations#obtaining-the- authorization-url-using-the-sensedia-api-platform).
When the first attempt to deliver an event to a subscriber fails, the Events Hub can retry delivery based on the registered settings. These settings include:
The Events Hub retries delivery until it succeeds or reaches the maximum number of automatic attempts defined in the settings. To increase delivery chances, the system uses the exponential backoff algorithm, which increases the wait time between retries to avoid network congestion.
If all automatic attempts fail, you can manually retry delivery through the Delivery Retry screen.
To create a new policy:
Click the [+] button.
Fill in Name and Description (optional). The name must be unique. You cannot create two policies with the same name.
If desired, configure security and delivery options for the policy. See below:
The HANDLER PUBLISHER SECURITY FLOW section includes the security interceptors that can be added to the flow.
TIPSee how to use the Sensedia API Platform to provide [publisher authorization](/docs/events-hub/authorizations#obtaining-the- authorization-url-using-the-sensedia-api-platform).
Click the icon next to the interceptor you want to apply. You can add more than one interceptor.
Available interceptors are listed below:
Validates a client ID passed in the request. When selected, you must specify:
Location: Where the client ID will be passed, such as any (all options selected), cookie, header, or query param.
Name: The name under which the client ID value will be passed.
Validates an access token passed in the request. When selected, you must specify:
Location: Where the access token will be passed, such as any (all options selected), cookie, header, or query param.
Name: The name under which the access token value will be passed.
Validates client_id
and access_token
passed in the request headers.
The URL providing validation must be included on the Authorizations page, and no fields need to be registered.
Validates the JWT token (sent in the Bearer format) passed in the request. The URL providing validation must be included on the Authorizations page. When selected, you must specify:
Location: Where the token will be passed, such as header, default JWT header, or query param.
Name: The name under which the token value will be passed.
A list of IPs that can or cannot send requests.
In the List Type field, choose between:
Block List: A list of IPs whose requests will be blocked.
Allow List: A list of IPs allowed to send requests.
IP List: Add IPs separated by commas.
Selected interceptors are displayed in the Execution Flow section. You can:
Validations occur in the order they appear on the screen. If any validation fails, the request is interrupted.
The Delivery Settings section defines the maximum number of automatic retry attempts and the status codes that trigger these attempts.
Configure the fields:
Automatic Retry Quantity: the number of automatic attempts if the first delivery fails. Up to 10 attempts are allowed.
Requisition Timeout: the maximum wait time for the subscriber URL's response during each delivery attempt. Up to 30 seconds.
Status Code For Automatic Retry: HTTP status codes that should trigger an automatic retry.
Separate multiple codes with commas.
Use "xx" to register a family of codes, e.g., 4xx, 5xx
.
Codes in the 200
family are not accepted because 2xx
responses indicate successful delivery and do not require retries.
The Status Code for Automatic Retry field allows codes from the 400
and 500
families.
However, not all are suitable for retries.
Below are recommended and non-recommended codes:
Recommended
Status Code | Description | Retry Makes Sense? | Reason |
---|---|---|---|
408 | Request Timeout | Yes | The server did not respond in time. |
429 | Too Many Requests | Yes | The user sent too many requests. |
500 | Internal Server Error | Yes | Temporary server failure. |
502 | Bad Gateway | Yes | Invalid response from an upstream server. |
503 | Service Unavailable | Yes | Server unavailable due to maintenance. |
504 | Gateway Timeout | Yes | Intermediate server did not respond. |
Not Recommended
Status Code | Description | Retry Makes Sense? | Reason |
---|---|---|---|
400 | Bad Request | No | Malformed request. |
401 | Unauthorized | No | Authentication required or failed. |
403 | Forbidden | No | Client lacks permission to perform action. |
404 | Not Found | No | Requested resource not found. |
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more