Skip to content

Service configuration#

Configure Selinux and Firewall so that they do not block the service.

Set LUNA PASS configuration parameters via Luna Configurator service (Table 10). Enter the connection parameters to lunapassvideo in the LUNAPASS_REDIS_DB_ADDRESS section.

Table 10. LUNA PASS configuration parameters

Parameter

Description

LUNA PASS API configuration parameters

env

Mode:

  • development—debug mode with all data;

  • production—basic operation mode with sensitive data hiding.

For more information see the "Logging and debugging" section

Default: production

Configuration parameters LUNA_PASS.JWT

algorithm

Successful frame encryption algorithm

Default: HS256

key

Successful frame encryption secret

Default: secret

Session parameters

max_attempts

Maximum number of frames received within 1 session.

If the value is exceeded, the current frame is sent as is and the connection is terminated.

If no value is present, the frames are checked until there is a successfully passed Liveness

Default: 50

max_liveness_attempts

The maximum number of frames that have reached the Liveness estimation.

If the value is exceeded, the current frame is sent as is and the connection is terminated.

If no value is present, the frames are checked until there is a successfully passed Liveness

Default: 40

aggregate_frames

Number of frames to aggregate. Must be at least 1

Default: 5

accept_one_eye_open

Allow one eye to be checked for openness:

  • false-both eyes are checked;

  • true-one eye is checked.

Default: false

previous_face_similarity

Similarity threshold. If the similarity value is below the threshold, then it is considered that the frames have different faces and the session is terminated

Default: 0.85

multiface_policy

Policy for selecting a person to check Liveness. Available values:

  • 0—only one face from the frame is permitted to send;

  • 1—the largest face in the frame is sent;

  • 2—the face closest to the center in the frame is sent

Default: 0

Parameters for face recognition zone ROI

center_x

The center of the ROI zone along the X axis

Default: 50

The center_x_unit parameter is responsible for the unit of measurement the of the X coordinate. Possible values:

  • percent—measurement in percentage relative to the size of the incoming frame;

  • px—measurement in pixels

Default: percent

center_y

The center of the ROI zone along the Y axis

Default: 50

The center_y_uUnit parameter is responsible for the unit of measurement of the Y coordinate. Possible values:

  • percent—measurement in percentage relative to the size of the incoming frame;

  • px—measurement in pixels

Default: percent

width

The width of the ROI zone

Default: 90

The width_unit parameter is responsible for the unit of measurement of the zone width. Possible values:

  • percent—measurement in percentage relative to the size of the incoming frame;

  • px—measurement in pixels

Default: percent

height

Height of the ROI zone

Default: 90

The height_unit parameter is responsible for the unit of measurement of the zone height. Possible values:

  • percent—measurement in percentage relative to the size of the incoming frame;

  • px—measurement in pixels

Default: percent

Face estimation thresholds

blur

Photo blurring

Default: 0.61

light

Backlighting of the photo image

Default: 0.57

dark

Darkening of the photo image

Default: 0.5

illumination

Uniformity of image illumination, 0 – uniform, 1 – there are overexposures

Default: 0.1

specularity

Glare on the image, 0 – no glare, 1 – there are glare

Default: 0.1

face_width

Face frame width

Default: 150

face_height

Face frame height

Default: 150

yaw

Rotation around the vertical axis of the head

Default: 20

pitch

Rotation around the transverse axis of the head

Default: 20

roll

Rotation around the longitudinal axis of the head

Default: 20

mouth

Required accuracy of mouth status assessment

Default: 0.4

glasses

Availability of glasses. Available values:

  • no_glasses—no glasses;

  • eyeglasses—glasses;

Default: ['no_glasses', 'eyeglasses']

deepfake

Required accuracy of the Deepfake estimation. Comment out the line the corresponding threshold to disable checking

Default: 0.5

liveness

Thresholds for the OneShot Liveness test result at which a person will be considered «alive»

Default: 0.5

Active Liveness parameters

is_enabled

Active Liveness

Default: true

cooldown_frames_count

Minimum number of frames after passing active Liveness

Default: 0

interaction_list

Used checks:

  • blink—blink eyes;

  • yawLeft—turn head left;

  • yawRight—turn head right;

  • pitchUp—tilt head up;

  • pitchDown—tilt head down;

Default: [blink, yawLeft, yawRight, pitchUp, pitchDown]

interaction_count

Number of user interactions to use. The maximum number must not exceed the number of checks specified in interaction_list

Default: 2

interaction_order

The order of interaction of checks:

  • random—the number of checks corresponding to the value of interaction_count is randomly selected from the interactions_list list

  • strict—the number of checks corresponding to the value of interaction_count is sequentially selected from the interactions_list list

Default: random

yaw_start_deg

Initial angle of rotation at which it is possible to begin interaction with head turns

Default: 10

yaw_threshold_deg

Threshold angle of rotation at which interaction on head turns is considered completed

Default: 20

pitch_start_deg

The initial head tilt angle at which it is possible to begin head tilt interaction

Default: 10

pitch_threshold_deg

The head tilt angle threshold at which the head tilt interaction is considered completed

Default: 20

Virtual Camera Checker parameter

is_enabled

Check frames for use of a virtual camera

Default: false

File Logger parameters

is_enabled

Saves all incoming photos and the results of their estimation within one session to a file

Default: true

path

Path for saving file logs

Default: ./LOGS

Video Redis parameters*

is_enabled

Stitching frames together to create a video and sending session frames to Redis

Default: true

LUNAPASS_VIDEO settings

codec

The codec used for video encoding

Default: H265

frames_limit

Limit the maximum number of frames in a video:

  • If the value is 0, the restriction is not applied.

  • For values greater than 0, the last N frames are taken for the video

Default: 0

expires

Number of seconds for Redis to store frames that were not used in the video. The information is erased after the expires time has elapsed

Default: 86400

result_ttl

How long Redis stores information about successful tasks and their

По умолчанию: 300

session_timeout

Number of seconds to start building video after session termination if no bestshot is available

Default: 300

LUNA PASS API logger settings

log_level

Sets the level of debug printing, by priority: "ERROR", "WARNING", "INFO", "DEBUG"

Default: INFO

folder_with_logs

The folder where the logs are stored (the relative path starts from the directory with the application)

Default: ./

max_log_file_size

Maximum log file size in MB before rotation (0 - do not use rotation)

Default: 1024

log_time

The time format used in log entries: "LOCAL" or "UTC"

Default: LOCAL

log_to_stdout

Enables you to send the log to standard output (stdout). Two options are available - "true" or "false"

Default: true

log_to_file

Enables you to send the log to a file. Two options are available - "true" or "false"

Default: true

multiline_stack_trace

Enables or disables multi-line traces in logs. Two options are available - "true" or "false"

Default: true

format

Log format

Default: Default

LUNAPASS_API_HTTP settings

request_timeout

The amount of time between when a new open TCP connection is passed to the server (in seconds)

Default: 60

response_timeout

The amount of time between when the server passes an HTTP request to the application and when the HTTP response is sent to the client (in seconds)

Default: 600

request_max_size

The maximum request size in bytes

Default: 1073741824

keep_alive_timeout

HTTP keep-alive timeout

Default: 200