security: remove all hardcoded API keys, require from environment

This commit is contained in:
oib
2026-02-11 21:33:18 +01:00
parent b36e5a33ea
commit 15675390ac
46 changed files with 107 additions and 107 deletions

View File

@@ -15,7 +15,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'cli'))
class AITBCClient:
def __init__(self):
self.coordinator_url = "http://localhost:8001"
self.api_key = "REDACTED_CLIENT_KEY"
self.api_key = "${CLIENT_API_KEY}"
def submit_job(self, prompt, model="llama3.2:latest", wait_for_result=True):
"""Submit a job and optionally wait for result"""

View File

@@ -107,7 +107,7 @@ def get_job_result(job_id: str) -> Optional[dict]:
with httpx.Client() as client:
response = client.get(
f"{DEFAULT_COORDINATOR}/v1/jobs/{job_id}/result",
headers={"X-Api-Key": "REDACTED_CLIENT_KEY"},
headers={"X-Api-Key": "${CLIENT_API_KEY}"},
timeout=10,
)
if response.status_code == 200: