For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation and deployment of the service

Prerequisites

Before installing IAD Service, make sure you have:

  • Docker installed and running

  • A valid Facephi license file

  • Access to the Facephi Docker registry

Access to the Docker registry

Log in to the Facephi Docker registry:

docker login facephicorp.jfrog.io

You will need the credentials provided by Facephi.

Installation

Download the Docker image

Replace 2.0.0 with the desired version.

Prepare the directories

Create the directories for the license, configuration, and logs:

Place the license file

Copy your license file to the license directory:

Deployment with Docker Compose

Create docker-compose.yml:

Start the service

Verify the deployment

Experimental replay attack mitigation

The service can apply a freshness window to incoming capture payloads. This experimental protection is disabled by default.

  • Enable it with FACEPHI_IAD_REPLAY_ATTACK_CHECKER_ENABLED=true

  • Adjust the freshness window with FACEPHI_IAD_REPLAY_ATTACK_TOLERANCE_TIME=<seconds>

  • Default freshness window: 300 seconds

  • When the freshness window is exceeded, the public API returns HTTP 400 with message equal to Replay attack detected

This feature is configured at startup through environment variables. It is not part of config.json nor is it exposed through GET|POST /api/v1/iad/config.

Example with docker run:

Example with Docker Compose:

License configuration

The license file must be located at /app/license/license.lic inside the container.

License file format

Optional fields:

  • LICENSE_URLS= — comma-separated license server URLs (required for LOCAL type)

  • LICENSE_PATH_OFFLINE= — path to the offline activation file (required for MACHINE + OFFLINE)

LICENSE_ID and LICENSE_DATA, if present, are ignored by the service as of version 2.0.0. IAD product credentials are embedded at build time, so these fields must be omitted in deployment templates.

Public API summary

Operational endpoints exposed by the service:

  • POST /api/v1/iad/liveness/evaluate

  • POST /api/v1/iad/extract

  • GET /api/v1/iad/version

  • GET /api/v1/iad/health

  • GET|POST /api/v1/iad/config

JWT authentication

JWT authentication is optional and disabled by default.

  • Configure it at startup in /app/config/config.json with auth_enabled, auth_jwt_secret, auth_accept_authorization_header, auth_accept_api_key_header and auth_api_key_header_name

  • Override those values with environment variables FACEPHI_IAD_REST_AUTH_*

  • GET /api/v1/iad/config never returns JWT authentication keys

  • POST /api/v1/iad/config rejects JWT authentication keys; manage them only at startup

Example startup configuration:

Example environment variables:

Detailed capture information (longDetails)

POST /api/v1/iad/liveness/evaluate accepts an optional multipart text field longDetails in the same body multipart/form-data than the mandatory part capture.

  • Accepted values are true and false (case-insensitive, no spaces).

  • When the field is missing, empty, or false, the endpoint returns the standard public liveness payload.

  • Any other value is rejected with HTTP 400.

For longDetails=true to return additionalInfo at the top level, all of the following conditions must be met:

  1. engine_bi_records_enabled resolves as true.

  2. engine_url points to an IAD Server that exposes both /check_capture_liveness and /bi_records.

  3. The BI record is available before it expires engine_bi_records_timeout_ms.

Operational notes:

  • The service automatically generates the header correlation-id; clients do not send it.

  • The BI lookup uses the current UTC date window when querying /bi_records; keep the clocks of the service host and the IAD Server synchronized.

Activation paths for the Docker flow with embedded engine:

  1. Set logger_long_detail=true en /app/config/config.json.

  2. Set FACEPHI_IAD_LOGGER_LONG_DETAIL=true in the service container environment.

  3. Set IAD_SERVER_BI_LOGS_ENABLED=true in the service container environment. Optionally, set IAD_SERVER_BI_LOGS_PATH to customize the BI logs directory.

Why these options work:

  • When the service launches the embedded engine, src/App.cpp injects IAD_SERVER_BI_LOGS_ENABLED=true and IAD_SERVER_BI_LOGS_PATH=/app/logs by default in the engine child process as long as logger_long_detail resolves as true and those internal variables are absent.

  • Direct exports IAD_SERVER_BI_LOGS_* also work because the child engine inherits the parent process environment.

  • If the service is configured to call an external engine instead of launching the embedded one, configure the equivalent BI logging capability in that engine deployment.

These keys can be set in /app/config/config.json, later updated via POST /api/v1/iad/config, or overridden with the environment variables FACEPHI_IAD_ENGINE_BI_RECORDS_*.

Example configuration snippet:

Example of runtime configuration update:

Example container environment using the service-level flag:

Container environment alternative using the engine's inherited internal variables directly:

Example liveness request:

Firewall configuration for license validation

Add firewall rules to allow outgoing HTTPS traffic to Facephi license servers:

IP
Port
Protocol

52.223.22.71

443

TCP/IP

35.71.188.31

443

TCP/IP

75.2.113.112

443

TCP/IP

99.83.149.57

443

TCP/IP

Allow HTTPS traffic to:

  • https://api.cryptlex.com:443

  • https://api.eu.cryptlex.com:443

Service configuration

Create /app/config/config.json to customize the behavior of the service.

Configuration file location

  • Default location: /app/config/config.json (inside the container)

  • Mount an external file: Use volume mapping in docker-compose

Example full configuration (current default values)

Service parameters

Parameter
Type
Default
Description

port

integer

6982

Service listening port

number_of_threads

integer

1

Worker threads for request processing

connection_timeout

integer

60

Connection Timeout in seconds (0 = no Timeout)

keep_alive_request_number

integer

0

Keep-alive requests (0 = disabled)

client_max_body_size

integer

100

Maximum request body size in MB

logger_path

string

""

Log file path (empty = stdout)

logger_level

string

"info"

Log level: trace, debug, info, warn, error

logger_rotation

string

"daily"

Log rotation: daily, hourly, size

logger_max_files

integer

7

Maximum number of log files to keep

auth_enabled

boolean

false

Requires JWT authentication for protected endpoints

auth_jwt_secret

string

""

HS256 shared secret used to validate JWTs

auth_accept_authorization_header

boolean

true

Accepts Authorization: Bearer <jwt>

auth_accept_api_key_header

boolean

true

Accepts JWT in the configured API Key header

auth_api_key_header_name

string

"x-api-key"

Header name used when token extraction by API Key is enabled

Engine parameters

Parameter
Type
Default
Description

engine_connection_timeout

integer

10000

Connection Timeout (ms)

engine_request_timeout

integer

60000

Request Timeout (ms)

engine_max_retries

integer

3

Maximum number of retries

engine_retry_delay

integer

1000

Delay between retries (ms)

engine_verify_ssl

boolean

false

Verifies the SSL certificates of capture analysis

engine_verbose

boolean

false

Enables detailed HTTP logging for capture analysis

engine_pool_size

integer

4

Connection pool size

engine_url

string

"http://localhost:8080"

Base URL of the capture analysis runtime

engine_bi_records_enabled

boolean

true

Enables obtaining additionalInfo for longDetails=true

engine_bi_records_max_retries

integer

3

Retries while waiting for the BI record

engine_bi_records_retry_delay_ms

integer

50

Delay between BI record retries (ms)

engine_bi_records_timeout_ms

integer

300

Total latency budget for BI retrieval (ms)

engine_bi_records_redact_request_data

boolean

false

Removes output.request_data of additionalInfo

Production configuration

For production deployments:

Development configuration

For local development:

Dynamic configuration updates

Update the configuration without restarting:

POST /api/v1/iad/config expects a JSON object with the field config_json_string, which contains the complete configuration serialized as a JSON string. JWT authentication keys are rejected by this endpoint and must be configured only at startup.

Note: Runtime updates are not persisted automatically. To make permanent changes, update the configuration file on disk and restart the service if necessary.

Troubleshooting

The service does not start

Check the license file:

Check the logs:

License validation fails

  • Verify the license file permissions: chmod 644 license.lic

  • Make sure the firewall allows outgoing HTTPS traffic to the license servers

  • Check the license expiration date

  • Confirm that the license corresponds to the IAD Service product

Performance issues

  • Increase engine_pool_size to handle more concurrent requests

  • Adjust number_of_threads according to the available CPU cores

  • Monitor resource usage: docker stats facephi-iad-service

  • Check the logs for timeout or retry errors

Update

To upgrade to a new version:

Always review the release notes before upgrading.

Last updated