Prepare verified laboratory 6 implementation and evidence

This commit is contained in:
rey
2026-11-17 17:32:06 +03:00
parent 470d9d6f1e
commit 7d56e52fd0
335 changed files with 31206 additions and 72 deletions
+5
View File
@@ -0,0 +1,5 @@
export type GrafanaCredentialPorts={read():Promise<string|undefined>;generate():string;archive(value:string):Promise<void>;publish(value:string):Promise<void>};
export function createGrafanaCredentialBootstrap(ports:GrafanaCredentialPorts){
if(['read','generate','archive','publish'].some(key=>typeof ports?.[key]!=='function'))throw new Error('All Grafana credential ports required');
return async()=>{const existing=await ports.read(),value=existing??ports.generate();if(!/^[!-~]{16,128}$/.test(value))throw new Error('Invalid Grafana owner credential');await ports.archive(value);if(existing===undefined)await ports.publish(value);};
}