Biometric data
Clocks can collect fingerprint, face and palm templates, face and attendance photos, and identity documents. Many jurisdictions restrict how such data is kept and require consent. So Hour Advantage keeps none of it unless you turn it on. It also lets you refuse or withdraw it per person.
You control this data at three levels:
| Level | Control | Default |
|---|---|---|
| Endpoint | Option biometrics: whether the endpoint collects the data at all. | Off |
| Person | Flag allow_biometrics in the person’s sync group. | Allowed |
| Sync group | people.biometrics: whether templates and photos move between members. | Off |
The event types concerned are biometric, biometric.photo, user.photo, photo and id_card (events).
Endpoint opt-in
Section titled “Endpoint opt-in”Unless an endpoint sets the option biometrics = true, Connect drops the five event types above before they are stored, whatever its package emits. Packages read the same option to decide whether to ask devices for the data at all. ZKTeco clocks are told to upload templates and photos only when it is on (ZKTeco endpoint options).
[[endpoint]]id = "office"listener = "public"path = "/office"options = { timezone = "America/Chicago", biometrics = true }Or with hourctl:
hourctl endpoint set office --option biometrics=truedrop_events on an endpoint drops any other event types before they are stored (endpoint options). Every event an endpoint drops is counted in houradvantage_events_dropped_total{endpoint,type,reason}. This holds for drop_events and for not collecting biometrics.
A sink without an events filter is not sent biometric, biometric.deleted, biometric.photo, user.photo, user.extended, photo, id_card or biometric.refused. Only a sink that names them receives them (the default set).
Per-person flag
Section titled “Per-person flag”Whether a person may have biometrics is their flag in their sync group. Every endpoint is in a sync group. It is one of its own, keeping nothing, unless it names another. So every endpoint has the flag, whatever the group keeps. A person with no flag is allowed.
hourctl sync biometrics <GROUP> <USER_ID> # showhourctl sync biometrics <GROUP> <USER_ID> --refusehourctl sync biometrics <GROUP> <USER_ID> --allowAn endpoint’s own group is named after the endpoint. For an endpoint office with no named group, use hourctl sync biometrics office 1001 --refuse.
| Route | Body | Answer |
|---|---|---|
GET /api/tenants/{tenant}/sync/{group}/people/{user_id}/biometrics | {"user_id", "allow_biometrics"} | |
PUT /api/tenants/{tenant}/sync/{group}/people/{user_id}/biometrics | {"allow": false} or {"allow": true} | {"user_id", "allow_biometrics", "withdrawn"?} |
Both answer 404 for an unknown group. In a group that keeps people, the flag is also the person’s biometrics field. Writing either one sets the same flag. In other groups the person needs no record.
Connect enforces the flag itself, whatever the endpoint’s options and its package do.
Incoming data of a refused person
Section titled “Incoming data of a refused person”A biometric, biometric.photo or user.photo event of a refused person is dropped before it is stored, sent to a sink or taken into the group. Then:
- The device is sent its package’s
delete_biometrics(for a template) ordelete_user_photo(for a photo) in the urgent lane. A held device gets the delete once it is released. - A
biometric.refusedevent is sent per person and event type. It carriesuser_id,kind,count,reasonand the delete’saction_id. It carrieserrorwhen the delete could not be queued (for example, the package offers no such action). - The audit trail (as user
houradvantage) and the log record it.
The delete reports its own result in an action.result event.
Outgoing data of a refused person
Section titled “Outgoing data of a refused person”An action is refused when it carries or enrols templates or photos of a refused person, named by its user_id or new_user_id. An action qualifies when it is set_biometric, set_user_photo or enroll_biometric. It also qualifies when any action is given a non-empty template, templates, biometrics, jpeg_base64 or face_photo parameter (for example change_user_id with templates).
| Where the action comes from | Result |
|---|---|
POST /api/tenants/{tenant}/devices/{endpoint}/{device}/actions (hourctl action) | 403 |
| A job | The device’s execution fails with the refusal as its reason. |
A credential written to a group’s registry (PUT /api/tenants/{tenant}/sync/{group}/people/{user_id}/credentials/{kind}/{slot}) | 422. So the sync engine has none to send. |
Withdrawal
Section titled “Withdrawal”Refusing a person who was allowed withdraws their biometrics:
- Their
biometric,biometric.photoanduser.photoevents are removed from the event log, delivered to the sinks or not. - In a group that keeps people, every template and photo the registry holds of them is deleted. The deletions are recorded as tombstones. So the change feed and
person.changedreport them. - Every allowed device of the group’s endpoints is sent
delete_biometricsanddelete_user_photofor them, in the urgent lane. A device whose package offers neither is skipped.
The PUT answers what was done:
{ "user_id": "1001", "allow_biometrics": false, "withdrawn": { "events_purged": 12, "undelivered_purged": 0, "deletes": [ { "endpoint": "office", "device": "<DEVICE>", "action": "delete_biometrics", "action_id": 42 } ] }}| Field | Meaning |
|---|---|
events_purged | Biometric events of the person removed from the event log. |
undelivered_purged | Of those, the ones a sink had not taken yet. |
deletes | One entry per delete per device. It holds endpoint, device, action, and action_id, or error when it could not be queued. |
The audit trail records the counts. When the flag is withdrawn by writing "biometrics": false on a person through the registry, the counts are in the audit trail only.
What a device does with the bytes of a deleted template is up to the device. Some keep them in storage until overwritten. The package’s documentation says so where it is known.
In a sync group
Section titled “In a sync group”A group that keeps people carries templates and photos between its members only with people.biometrics = true. That setting requires HOURADVANTAGE_SECRET_KEY. Templates, face photos and display photos are sealed at rest (sync data protection).
hourctl sync set hq people.biometrics=true- Templates and photos move between clocks, never to sinks. An endpoint that drops
biometricevents still feeds the group’s registry. - For a refused person, none is kept. One written through the API is refused (422). One a clock uploads is never taken in and is deleted from that clock.
- Setting
"biometrics": true(ornull) on the person lets them be enrolled again.
Packages
Section titled “Packages”A package can read the flag so it does not ask a device for data that would be dropped. allow_biometrics(ctx, user_id) is false for a refused person. ctx.biometrics_refused lists the refused user ids (helpers). A package cannot override the flag. Connect checks every event a package emits.
Other places biometric data appears
Section titled “Other places biometric data appears”| Place | What it shows |
|---|---|
| Audit trail, command and action history, the live stream, stored commands once the device has them | Command parameters marked sensitive (templates, photos) appear only as their size. It looks like <redacted N bytes> (sensitive values). |
hourctl wire | Device traffic as it is, templates included. It is never stored. |
Traffic log (/api/tenants/{tenant}/traffic, in each instance’s memory) | Up to limits.traffic_body_bytes (16 KiB by default) of each message body. Set it to 0 where that matters (settings). |
hourctl settings set traffic_body_bytes=0