Repository navigation
feat(controller): require a token on the HTTP API when EXAFLOW_API_TOKEN is set - #669
Closed
KFilippopolitis wants to merge 1 commit into
Closed
KFilippopolitis wants to merge 1 commit into
KFilippopolitis wants to merge 1 commit into
Conversation
…KEN is set The controller has no authentication, and platform-backend makes the dataset checks, so anything else reaching it bypasses them. Probes stay open. Flower processes on the workers call the controller too, so they send the token. Unset keeps today's behaviour, so backend, controller and workers can be upgraded in turn. The charts read it from the optional secret exaflow-api-token.
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.
Summary
The controller's HTTP API has no authentication, and platform-backend makes the dataset checks, so anything else that reaches it bypasses them. From an audit against the OWASP cheat sheets and ASVS 5.
EXAFLOW_API_TOKENis set, the controller requiresAuthorization: Bearer <token>./livezand/healthcheckstay open for probes./flower/input,/flower/result,/cdes_metadata), so they send the token too.exaflow-api-token.Unset keeps today's behaviour, so backend, controller and workers can be upgraded in turn. The backend side is Medical-Informatics-Platform/platform-backend#52.
Base branch
This targets
master, notfix/controller-modernization-wave3. The wave3 PR (#665) moves the app fromexaflow/controller/quarttoexaflow/controller/http, so whichever merges second must moveapi_token.pyto the new framework.Tests
tests/standalone_tests/controller: 263 pass, 1 skipped. The skipped test covers the Flower headers; it needsflwr, which did not install in my environment, so the Flower change has not been executed. CI or a full environment should run it. No failures on this base.All testing was local. Nothing has run against the EBRAINS realm or a real cluster. A real Flower run with the token set was not tested. The backend sending the token was tested against a stub Exaflow, not this controller.
Rollback
Revert the PR, or leave the secret unset.