Skip to content

feat: require authentication for /proceed-db-migration endpoint if auth was enabled#8893

Open
klesh wants to merge 3 commits into
mainfrom
kw-db-migration
Open

feat: require authentication for /proceed-db-migration endpoint if auth was enabled#8893
klesh wants to merge 3 commits into
mainfrom
kw-db-migration

Conversation

@klesh
Copy link
Copy Markdown
Contributor

@klesh klesh commented May 30, 2026

Summary

This PR updates the /proceed-db-migration API endpoint to require authentication if authentication is enabled. Previously, this endpoint was accessible without authentication, which could pose a security risk in protected environments.

Changes

  • Added the auth.RequireAuth() middleware to the /proceed-db-migration route in the API server.
  • Removed /proceed-db-migration from the list of public paths in the authentication middleware.
  • Updated test helper comments to note that credentials are now required for this endpoint when AUTH_ENABLED=true.

Motivation

Securing the database migration endpoint ensures that only authorized users can trigger migrations, aligning with best practices for production deployments.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. component/framework This issue or PR relates to the framework improvement labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/framework This issue or PR relates to the framework improvement size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant