Skip to content

[codex] Harden production database configuration#295

Merged
jjoonleo merged 1 commit intodeployfrom
codexd/harden-production-db-config
May 7, 2026
Merged

[codex] Harden production database configuration#295
jjoonleo merged 1 commit intodeployfrom
codexd/harden-production-db-config

Conversation

@jjoonleo
Copy link
Copy Markdown
Contributor

@jjoonleo jjoonleo commented May 7, 2026

Summary

  • Add explicit local and test Spring profiles while hardening the production profile to require environment-provided database credentials.
  • Pin production Hibernate DDL mode to validate, disable SQL logging, and disable Flyway baseline-on-migrate.
  • Harden the deploy workflow so unsafe production database settings fail before restart.
  • Replace CI's generated ignored application.properties with SPRING_PROFILES_ACTIVE=test and add static policy tests.
  • Document the current production database configuration.

Validation

  • ./gradlew test --tests devkor.ontime_back.security.DatabaseConfigurationPolicyTest --rerun-tasks

Note

  • Full ./gradlew test still requires a MySQL 8 service on localhost:3306; the local Docker daemon was unavailable during implementation.

@jjoonleo jjoonleo changed the base branch from main to deploy May 7, 2026 07:51
@jjoonleo jjoonleo marked this pull request as ready for review May 7, 2026 07:51
@jjoonleo jjoonleo merged commit 036dccf into deploy May 7, 2026
2 checks passed
@jjoonleo jjoonleo deleted the codexd/harden-production-db-config branch May 7, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant