feat(ml): fuse two embedding models and protect the ML service with a token

This commit is contained in:
shira committed 2026-10-11 14:40:52 +03:00
1 parent bc00d6901f
commit b24e5ff906
63 files changed
+2287 -276

No files matched your search

+21
View File
@@ -2,8 +2,21 @@ openapi: 3.2.0
info:
title: Lincodex ML Operational API
version: 0.1.0
description: |-
Internal API of the ML service. Only the Go backend calls it; it is never
exposed to browsers or to the public network.
Authentication: every operation except the health routes requires
`Authorization: Bearer <token>` when the service has a token, and the
service refuses to listen on a non-loopback address without one. The
token is a shared random secret of at least 32 printable characters from
the deployment secret store, never from this repository. A missing or
wrong token answers 401 `unauthenticated`. A service without a token
answers only callers on its own loopback interface.
servers:
- url: /
security:
- bearerAuth: []
paths:
/healthz:
$ref: ./routes/healthz.yml
@@ -12,6 +25,14 @@ paths:
/v1/embeddings:
$ref: ./routes/embeddings.yml
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: >-
Shared random service token sent as `Authorization: Bearer <token>`.
The service compares it in constant time and never logs it. Rotation
replaces the secret on both sides; there are no per-user tokens.
responses:
Problem:
$ref: ./components/responses.yml#/Problem