Skip to content

[Codex] fix(security): restrict config export/import to admins#503

Open
Micsi wants to merge 1 commit into
abeggled:mainfrom
Micsi:codex/fix-backup-import/export-vulnerability
Open

[Codex] fix(security): restrict config export/import to admins#503
Micsi wants to merge 1 commit into
abeggled:mainfrom
Micsi:codex/fix-backup-import/export-vulnerability

Conversation

@Micsi
Copy link
Copy Markdown
Collaborator

@Micsi Micsi commented May 17, 2026

Motivation

  • Close a privilege escalation and data-exposure gap where the backup export/import endpoints allowed any authenticated user or API key to export secret-bearing logic_graphs.flow_data and import enabled executable logic.

Description

  • Require admin authorization by changing the dependency from get_current_user to get_admin_user for GET /api/v1/config/export and POST /api/v1/config/import in obs/api/v1/config.py so only admins can export or restore logic graphs.

Testing

  • Attempted to run integration tests with pytest -q tests/integration/test_auth.py, but the run failed due to a missing test dependency (pytest_asyncio) in the local environment, so no tests passed here.

Codex Task

@Micsi Micsi added the Security Security-related changes label May 17, 2026
@abeggled
Copy link
Copy Markdown
Owner

@Micsi
Ein normaler User soll die vollen Funktionalitäten nutzen können. Der Admin hat nur die Benutzerverwaltung als zusätzliches Recht.
Ohne stichhaltigem Gegenargument werde ich den PR schliessen, da er dem gewünschten Design entspricht und kein Sicherheitsrisiko in dem Sinn darstellt.

@Micsi
Copy link
Copy Markdown
Collaborator Author

Micsi commented May 17, 2026

Warum @abeggled? . Ich habe eine Mietwohnung und möchte daher den Zugriff konsequent auf allen Ebenen beschränken können. Warum sollte ein User Daten oder Configs exportieren können?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Security Security-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants