Skip to content

Facephi IAD Service

Injection Attack Detection REST API — Protect your biometric systems against spoofing attacks.

What is IAD Service?

The IAD Service is a REST API microservice that detects injection attacks in biometric captures. It verifies that biometric data comes from real sources, not from replays, or synthetic inputs.

Use it to:

  • Extract valid images from authenticated captures
  • Monitor system health and performance
  • Integrate seamlessly with your authentication workflows

Quick Start

Requirements

Component Requirement
OS Linux x86_64 (Ubuntu 24.04 recommended)
License Valid Facephi license file

Deploy with Docker

docker run -d \
  -p 6982:6982 \
  -v /path/to/license:/app/license \
  -v /path/to/config:/app/config \
  --name iad-service \
  facephicorp.jfrog.io/docker-core-pro-fphi/facephi-iad-service:1.1.1

Verify it works

# Check health
curl http://localhost:6982/api/v1/iad/health

# Check version
curl http://localhost:6982/api/v1/iad/version

Typical responses:

{
  "message": "Healthy"
}
{
  "message": "1.1.1 Copyright © 2026 FacePhi Biometria. All rights reserved."
}

API Endpoints

Core Operations

Endpoint Method Purpose
/api/v1/iad/check-capture POST Verify real sources and detect injection attacks
/api/v1/iad/extract-image POST Extract image from validated capture

Management

Endpoint Method Purpose
/api/v1/iad/version GET Service version and license status
/api/v1/iad/health GET Health check for monitoring
/api/v1/iad/config GET/POST Retrieve or update configuration

Usage Example

Check Capture

curl -X POST \
  -F "file=@biometric_capture.bin" \
  http://localhost:6982/api/v1/iad/check-capture

Response:

 {
  "capture": {
    "probability": 1,
    "rejection": [],
    "score": 1
  },
  "capture_type": "FACE"
}

Extract Image

curl -X POST \
  -F "file=@biometric_capture.bin" \
  http://localhost:6982/api/v1/iad/extract-image

Response:

{
  "image": "base64_encoded_image...",
  "mime_type": "image/jpeg"
}

Get Configuration

curl http://localhost:6982/api/v1/iad/config

Update Configuration

POST /api/v1/iad/config expects a JSON object with the config_json_string field, containing the full configuration serialized as a JSON string.

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"config_json_string":"{\"port\":6982,\"number_of_threads\":1,\"engine_url\":\"http://localhost:8080\"}"}' \
  http://localhost:6982/api/v1/iad/config

Response:

{
  "message": "Configuration updated successfully"
}

Configuration

Create /app/config/config.json:

{
  "port": 6982,
  "number_of_threads": 1,
  "connection_timeout": 60,
  "keep_alive_request_number": 0,
  "client_max_body_size": 100,
  "logger_level": "info",
  "logger_path": "/app/logs",
  "logger_rotation": "daily",
  "logger_max_files": 7,
  "engine_connection_timeout": 10000,
  "engine_request_timeout": 60000,
  "engine_max_retries": 3,
  "engine_retry_delay": 1000,
  "engine_verify_ssl": false,
  "engine_verbose": false,
  "engine_pool_size": 4,
  "engine_url": "http://localhost:8080"
}

Key Parameters

Parameter Default Description
port 6982 Service listening port
number_of_threads 1 Worker threads for request handling
connection_timeout 60 Rest::Manager connection timeout
keep_alive_request_number 0 Maximum keep-alive requests
client_max_body_size 100 Maximum request body size in MB
logger_level "info" Logging level (trace/debug/info/warn/error)
engine_connection_timeout 10000 Connection timeout (ms)
engine_request_timeout 60000 Request timeout (ms)
engine_max_retries 3 Engine retry attempts
engine_retry_delay 1000 Delay between engine retries in ms
engine_verify_ssl false Verify engine SSL certificates
engine_verbose false Enable verbose engine proxy logs
engine_pool_size 4 Connection pool size
engine_url "http://localhost:8080" Base URL of the engine

Architecture Overview

flowchart TD
    Client["Client<br/>Application"]

      Client -->|HTTP/REST| IADService

      subgraph IADService["IAD Service (Proxy)"]
        Components["• License<br/>• Endpoints<br/>• RestClient<br/>• Connection Pool<br/>• Config Management"]
        Components -.->|HTTP/REST| Engine
        subgraph Engine["Internal Engine"]
          CoreDetection["Core Detection"]
        end
      end

      style Client fill:#4a9eff,stroke:#333,stroke-width:2px,color:#000
      style IADService fill:#111111,stroke:#333,stroke-width:2px,color:#000
      style Engine fill:#60a5fa,stroke:#333,stroke-width:2px,color:#000
      style Components fill:#60a5fa,stroke:#333,stroke-width:2px,color:#000

Documentation

Support

For licensing inquiries or technical support, contact your Facephi representative.