[Codex] fix(logic): restrict graph mutation/run endpoints to admin users#502
Open
Micsi wants to merge 1 commit into
Open
[Codex] fix(logic): restrict graph mutation/run endpoints to admin users#502Micsi wants to merge 1 commit into
Micsi wants to merge 1 commit into
Conversation
Owner
|
@Micsi |
Collaborator
Author
|
@abeggled , das ist komplizierter. Die Gefahren des misuse sind natürlich nicht von der Hand zu weisen, aber die grundsätliche Verwendbarkeit soll natürlich erhalten bleiben. Dennoch wieder mein Fall mit der Mietwohnung. Ich würde es begrüßen, das zunächst enger/sicherer zu machen und dann später kontrolliert im Rahmen eines konsequenten Berechtigungskonzept zu öffnen. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
api_client,datapoint_write,python_script), enabling SSRF, device actuation, and DoS risks.Description
obs/api/v1/logic.pyto requireget_admin_userinstead ofget_current_userfor graph write/execute endpoints:POST /graphs,PUT /graphs/{id},PATCH /graphs/{id},DELETE /graphs/{id},POST /graphs/import,POST /graphs/{id}/run, andPOST /graphs/{id}/duplicate.GET /node-types,GET /graphs,GET /graphs/{id},GET /graphs/{id}/export) usingget_current_userso authenticated users retain listing and viewing capabilities.Testing
python -m py_compile obs/api/v1/logic.pycompleted successfully.pytest -q tests/integration/test_duplication.pycould not be executed in this environment due to a missing test dependency (pytest_asyncio).Codex Task