Skip to content

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

Merged
Startrekzky merged 3 commits into
mainfrom
kw-db-migration
May 30, 2026
Merged

feat: require authentication for /proceed-db-migration endpoint if auth was enabled#8893
Startrekzky merged 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
Copy link
Copy Markdown
Contributor

@Startrekzky Startrekzky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Startrekzky Startrekzky merged commit ad20227 into main May 30, 2026
10 checks passed
@Startrekzky Startrekzky deleted the kw-db-migration branch May 30, 2026 11:34
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.

2 participants