Class DemoRotatingSecretsApplication

java.lang.Object
com.maybeitssquid.rotatingsecrets.DemoRotatingSecretsApplication

@SpringBootApplication @EnableScheduling public class DemoRotatingSecretsApplication extends Object
Spring Boot application demonstrating integration with dynamic Kubernetes Secrets for database credential rotation.

This application maintains a connection pool that reads fresh credentials from Kubernetes-mounted secret files whenever a new database connection is created, enabling seamless password rotation without application restart.

Kubernetes Secrets out of the box are mutable, but require API calls to update. In most cases, it is preferable to use a replacement secrets manager (HashiCorp Vault, OpenBao, External Secrets Operator, etc.) integration that supports propagating new secrets as they are changed on the back end.

  • Constructor Details

    • DemoRotatingSecretsApplication

      public DemoRotatingSecretsApplication()
      Default constructor.
  • Method Details

    • main

      public static void main(String[] args)
      Application entry point.
      Parameters:
      args - command-line arguments