Merge PR #54: fix(security) 删除.env.production并清理硬编码密码
This commit is contained in:
@@ -8,7 +8,7 @@ services:
|
||||
environment:
|
||||
POSTGRES_DB: xiaoxia_saas
|
||||
POSTGRES_USER: xiaoxia
|
||||
POSTGRES_PASSWORD: xiaoxia_password
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_in_production}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
|
||||
@@ -7,7 +7,7 @@ JWT 处理器委托层
|
||||
使用方式:
|
||||
from packages.application.auth.jwt_handler import JWTHandler, get_jwt_handler
|
||||
|
||||
jwt_handler = JWTHandler(secret_key="your-secret-key")
|
||||
jwt_handler = JWTHandler(secret_key="<YOUR_SECRET_KEY>")
|
||||
token = jwt_handler.create_access_token(user_id="user123", workspace_id="ws456", role="admin")
|
||||
payload = jwt_handler.verify_access_token(token)
|
||||
"""
|
||||
|
||||
@@ -8,6 +8,7 @@ login, /auth/me, and /workspaces. Uses only the Python standard library.
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
import urllib.error
|
||||
@@ -41,7 +42,7 @@ def main() -> int:
|
||||
timestamp = int(time.time())
|
||||
email = f"smoke-{timestamp}@example.com"
|
||||
username = f"smoke{timestamp}"
|
||||
password = "AuditPass123!"
|
||||
password = os.environ.get("SMOKE_TEST_PASSWORD", "changeme")
|
||||
|
||||
register_status, register_body = request_json(
|
||||
"POST",
|
||||
|
||||
@@ -4,10 +4,11 @@ import io
|
||||
import time
|
||||
import uuid
|
||||
|
||||
import os
|
||||
import requests
|
||||
|
||||
BASE_URL = "https://saas.xiaoxiajianji.com/api/v1"
|
||||
PASSWORD = "SmokePass123!"
|
||||
PASSWORD = os.environ.get("SMOKE_TEST_PASSWORD", "changeme")
|
||||
|
||||
|
||||
def _json_or_raise(name: str, response: requests.Response) -> dict:
|
||||
|
||||
@@ -10,10 +10,11 @@ import io
|
||||
import time
|
||||
import uuid
|
||||
|
||||
import os
|
||||
import requests
|
||||
|
||||
BASE_URL = "https://saas.xiaoxiajianji.com/api/v1"
|
||||
PASSWORD = "SmokePass123!"
|
||||
PASSWORD = os.environ.get("SMOKE_TEST_PASSWORD", "changeme")
|
||||
|
||||
|
||||
def _json_or_raise(name: str, response: requests.Response) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user