You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2026. It is now read-only.
Remove HMAC shared-secret authentication (DOCKER_RUNNER_SHARED_SECRET) from the docker-runner server. Per the updated architecture (gaps/runner-hmac-removal.md), OpenZiti mTLS is now the sole authentication mechanism for Orchestrator ↔ Runner communication. The client-side (platform) was already cleaned up in agynio/platform#1401.
Specification
Scope
All changes are within agynio/docker-runner.
Files & Changes
1. Delete src/contracts/auth.ts and src/contracts/json.ts (HMAC modules)
Remove const nonceCache = new NonceCache(...) line
Remove nonceCache from createRunnerGrpcServer() call
6. Test files — Remove HMAC references
__tests__/helpers/grpc-test-client.ts: Remove buildAuthHeaders import and secret from createGrpcTestClient options. The metadataFor() helper should return an empty Metadata(). Remove secret parameter.
__tests__/containers.docker.integration.test.ts: Remove NonceCache import, RUNNER_SECRET constant, sharedSecret/signatureTtlMs from config object, nonceCache creation and usage, and secret: RUNNER_SECRET from createGrpcTestClient call.
test/e2e/docker-runner.e2e.test.ts: Remove DOCKER_RUNNER_SHARED_SECRET env check/guard and secret: sharedSecret from createGrpcTestClient call.
Key Constraints
The gRPC server and test client should continue to function without any auth middleware — OpenZiti mTLS handles auth at the transport layer
User Request
Remove HMAC shared-secret authentication (
DOCKER_RUNNER_SHARED_SECRET) from the docker-runner server. Per the updated architecture (gaps/runner-hmac-removal.md), OpenZiti mTLS is now the sole authentication mechanism for Orchestrator ↔ Runner communication. The client-side (platform) was already cleaned up in agynio/platform#1401.Specification
Scope
All changes are within
agynio/docker-runner.Files & Changes
1. Delete
src/contracts/auth.tsandsrc/contracts/json.ts(HMAC modules)src/contracts/auth.ts— entire HMAC signing/verification module (buildAuthHeaders,verifyAuthHeaders,signPayload,hashBody,NonceCache,extractHeader, etc.)src/contracts/json.ts— canonical JSON serialization helper used only byauth.ts2.
src/index.ts— Remove re-exportsexport * from './contracts/auth.ts'export * from './contracts/json.ts'3.
src/service/config.ts— Remove HMAC config fieldssharedSecretfrom therunnerConfigSchemaZod schemasignatureTtlMsfrom the schema (it controls HMAC nonce TTL, no longer needed)sharedSecret: env.DOCKER_RUNNER_SHARED_SECRETfromloadRunnerConfig()signatureTtlMs: env.DOCKER_RUNNER_SIGNATURE_TTL_MSfromloadRunnerConfig()4.
src/service/grpc/server.ts— Remove HMAC verification from all RPC handlersimport { verifyAuthHeaders } from '../../index.ts'NonceCachefrom the import and from theRunnerGrpcOptionstypeverifyGrpcAuth()helper function entirelymetadataToHeaders()helper function (only used byverifyGrpcAuth)verifyGrpcAuth(...)call and the associatedif (!verification.ok)auth guard block from all RPC handlers:ready,startWorkload,stopWorkload,removeWorkload,inspectWorkload,getWorkloadLabels,findWorkloadsByLabels,listWorkloadsByVolume,removeVolume,touchWorkload,putArchive,streamWorkloadLogs,streamEvents,exec,cancelExecutionnonceCachefrom theRunnerGrpcOptionstype and usagesopts.config.sharedSecretreferences5.
src/service/main.ts— Remove NonceCache instantiationNonceCacheimportconst nonceCache = new NonceCache(...)linenonceCachefromcreateRunnerGrpcServer()call6. Test files — Remove HMAC references
__tests__/helpers/grpc-test-client.ts: RemovebuildAuthHeadersimport andsecretfromcreateGrpcTestClientoptions. ThemetadataFor()helper should return an emptyMetadata(). Removesecretparameter.__tests__/containers.docker.integration.test.ts: RemoveNonceCacheimport,RUNNER_SECRETconstant,sharedSecret/signatureTtlMsfrom config object,nonceCachecreation and usage, andsecret: RUNNER_SECRETfromcreateGrpcTestClientcall.test/e2e/docker-runner.e2e.test.ts: RemoveDOCKER_RUNNER_SHARED_SECRETenv check/guard andsecret: sharedSecretfromcreateGrpcTestClientcall.Key Constraints