Function: keyCustodianConfigSchema()
keyCustodianConfigSchema():
TObject<{pkcs11:TObject<{expectedManufacturer:TOptional<TString>;expectedModel:TOptional<TString>;expectedSerial:TOptional<TString>;library:TString;maxSessions:TOptional<TInteger>;pin:TUnsafe<SecretRefValue>;tokenLabel:TString; }>; }>
Defined in: packages/key-custodian/src/config.ts:46
Builds the schema. Nothing names SoftHSM: the library path is the deployment's, which is how development and production run the same code (D2.3).
pkcs11.library: absolute path of the PKCS#11 module. Required.pkcs11.tokenLabel: the token's label, the one written into every handle. Required.pkcs11.pin: asecret://reference to the user PIN. Required.pkcs11.maxSessions: the session pool's size, 1 to MAX_SESSIONS_LIMIT. Optional, default DEFAULT_MAX_SESSIONS.pkcs11.expectedManufacturer,pkcs11.expectedModel: what the token must report inC_GetTokenInfo. The schema leaves both optional because it cannot see the environment class; the adapter refuses to start underproductionunless at least one is set.pkcs11.expectedSerial: the token's serial number, pinning the one token the handles were minted on. Optional everywhere.
The lengths are those of the CK_TOKEN_INFO fields (32, 16 and 16 bytes).
Returns
TObject<{ pkcs11: TObject<{ expectedManufacturer: TOptional<TString>; expectedModel: TOptional<TString>; expectedSerial: TOptional<TString>; library: TString; maxSessions: TOptional<TInteger>; pin: TUnsafe<SecretRefValue>; tokenLabel: TString; }>; }>
A TypeBox object schema.