File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 benchmark_classical_signatures ,
1010 benchmark_pqc_signatures ,
1111)
12- from fastapi import APIRouter
12+ from fastapi import APIRouter , Depends
13+
14+ from hybrid_pki .api .security import require_mutation_access
1315
1416router = APIRouter (
1517 prefix = "/benchmarks" ,
@@ -73,7 +75,7 @@ def benchmark_status():
7375 }
7476
7577
76- @router .post ("/run-keygen" )
78+ @router .post ("/run-keygen" , dependencies = [ Depends ( require_mutation_access )] )
7779def run_keygen_benchmark ():
7880 """
7981 Run classical and PQC key generation benchmarks.
@@ -96,7 +98,7 @@ def run_keygen_benchmark():
9698 }
9799
98100
99- @router .post ("/run-signatures" )
101+ @router .post ("/run-signatures" , dependencies = [ Depends ( require_mutation_access )] )
100102def run_signature_benchmark ():
101103 """
102104 Run classical and PQC signature benchmarks.
@@ -119,7 +121,7 @@ def run_signature_benchmark():
119121 }
120122
121123
122- @router .post ("/run-handshake" )
124+ @router .post ("/run-handshake" , dependencies = [ Depends ( require_mutation_access )] )
123125def run_handshake_benchmark ():
124126 """
125127 Run classical and hybrid handshake benchmarks.
You can’t perform that action at this time.
0 commit comments