feat: add SRP authentication, improve security
- Replace RSA key exchange with SRP (Secure Remote Password) - Password never transmitted over network - Add unit tests for endpoints - Fix datetime.UTC compatibility for Python < 3.11 - Fix logger.exception usage - Update README with new auth flow diagram
This commit is contained in:
@@ -2,22 +2,20 @@ from typing import Optional
|
||||
from .logger import logger
|
||||
from .factory import create_app
|
||||
|
||||
app = create_app()
|
||||
|
||||
|
||||
def run_server(
|
||||
host: str = "0.0.0.0",
|
||||
port: int = 8000,
|
||||
admin_password: Optional[str] = None,
|
||||
password: Optional[str] = None,
|
||||
workers: int = 1,
|
||||
) -> None:
|
||||
app.ctx.admin_password = admin_password
|
||||
app = create_app(password=password or "")
|
||||
logger.info(f"Starting server on {host}:{port}")
|
||||
|
||||
app.run(
|
||||
host=host,
|
||||
port=port,
|
||||
workers=workers,
|
||||
single_process=True,
|
||||
debug=False,
|
||||
access_log=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user