WSO2Con2025 Logo

March 18-20 | Barcelona, Spaain

 
choreo
2025/01/02
 
2 Jan, 2025

Introducing Database Connections in Choreo

  • Hansi Karunarathna
  • Software Engineer - WSO2

In today’s fast-evolving tech world, seamless connectivity between applications and databases is critical, but often comes with challenges such as credential management and environment-specific configurations. Choreo simplifies this process by offering streamlined connection options to Choreo-managed databases, making it easy to integrate components with databases. We’re excited to announce our latest feature: database connections.

In this blog, we’ll explore the key highlights of Choreo’s database connections and how you can get started.

Key Features

  • Simplify database connectivity with automated parameter management
  • Traditionally, connecting to multiple databases across different environments requires manually copying connection parameters such as host, port, username, and password for each setup, making it a time consuming and error-prone process. Database connections in Choreo automates this process by injecting the connection parameters as environment variables directly to your application, reducing manual effort and minimizing the risk of configuration errors.

  • Configure distinct databases and credentials for each environment
  • Different environments (e.g., development, testing, and production) typically require separate database instances and credentials to maintain proper isolation. With database connections, you can configure databases and credentials for each environment, enabling fine-grained control over how resources are accessed.

  • Restrict database usage through environment-specific credentials
  • When adding a database to the Marketplace, you can limit its usage to specific environments by configuring credentials exclusively for those environments. This ensures that the database can only be accessed by those authorized environments. Choreo ensures a secure and reliable setup process, and prevents any unintended connections.

Benefits

  • Increased productivity and reduced errors
  • Automates the setup of database connection parameters, saving time and significantly reducing the risk of manual errors.

  • Enhanced security and access control
  • Maintains environment isolation by enabling distinct database configurations and credentials for each environment, ensuring secure and controlled access.

  • Error prevention in configuration
  • Prevents errors by automatically injecting connection parameters as environment variables and enforcing proper credential setup for each environment.

Getting Started

    Before establishing a connection to a database, ensure the following steps are completed:

  1. Create a Choreo-managed database: You can easily create one through the Choreo console. For detailed instructions on setting up Choreo-managed databases and caches, refer to our documentation.

  2. Marketplace availability: Connections can only be made to databases listed in the marketplace.

  3. Credential registration: Before adding a database to the Marketplace, ensure that at least one credential is registered for the database to enable secure access.

  4. You can register credentials from the Database page, and credentials can be added separately for each database.


Figure 1: Add credentials

These credentials can either be super user credentials provided during the creation of a new database server or cache, or user-specific database credentials that you generate using the super user credentials.


Figure 2: Add credentials form

This flexible credential management lets you securely store credentials in Choreo and reuse them when creating database connections. Once credentials are added, the database can be added to the Choreo Marketplace, making it accessible to other components in your organization. Follow the documentation to add databases to the Marketplace.


Figure 3: Add the database to the Marketplace

With your database registered in the Marketplace, creating a connection is straightforward. All available databases can be explored through the marketplace.


Figure 4: Choreo Marketplace

Once you have discovered the database you intend to use, the next step is to establish a connection. During the connection setup, you can configure different databases for each environment and specify the respective credentials. You can create a connection following this documentation.


Figure 5: Create a database connection

Conclusion

In summary, Choreo's database connections feature transforms how applications connect with databases by automating the management of connection parameters, enabling secure access through environment-specific credentials, and simplifying the setup process. These capabilities not only enhance productivity by reducing manual effort and configuration errors but also strengthen access control across different environments.

Sign up for free and explore how you can easily connect and manage databases to power your applications.

English