Morgana
GitHubBlogs
  • Welcome to Morgana!
  • Guides
    • Getting Started
      • Docker
      • Open Source
    • Server Installation & Configuration
      • Configuring Morgana
      • All Configuration
      • Enable and Disable Features
      • All Provider Configuration
      • Configuring the Database
      • Importing or Exporting Realms
      • Advanced Configuration
      • Securing Applications
    • Server Container Image
    • Securing Applications & Services
      • Planning for Securing Applications and Service
      • OpenID Connecting
      • SAML Connecting
      • Client Registration Service
      • Client Registration CLI
      • Token Exchange
    • Server Administration
      • Key Concepts
      • Creating the First Admin
      • Configuring Realms
      • External Storage
      • Managing Users
      • Managing User Sessions
      • Assigning Permissions
        • Creating a Realm Role
        • Client Roles
        • Using Default Roles
        • Role Scope Mapping
        • Groups
      • Configuring Authentication
      • Integrating Identity Providers
      • SSO Protocols
      • Manging Clients
        • Managing OpenID Clients
        • Managing SAML Clients
        • Client Scopes
        • Client Policies
      • Tracking Events
      • Account Console
      • Admin CLI
    • Server Developer
      • Preface
      • Admin REST API
      • Identity Brokering APIs
      • Service Provider Interfaces
      • Authentication SPI
    • Authorization Services
      • Service Overview
      • Resource Servers
      • Resources and Scopes
      • Policies
      • Permissions
      • Authorization Services
      • Policy Enforces
    • Upgrading
      • Upgrading Morgana
      • Upgrading Morgana Server
      • Upgrading Morgana Admin Client
      • Migration Changes
  • APIs
    • Admin REST APIs
  • Appendix
    • Contribute
    • FAQs
Powered by GitBook
On this page
  • Supported Databases
  • Configuring a Database
  • Relevant Options
  1. Guides
  2. Server Installation & Configuration

Configuring the Database

This guide explains how to configure the Morgana server to store data in a relational database.

Supported Databases

The server has built-in support for different databases. You can query the available database by viewing the expected values for the db configuration option. The following table lists the supported database and their tested versions.

  • MariaDB: 10

  • MsSQL: 2016

  • MySQL: 8

  • Oracle: 12c

  • Postgres: 10

By default, the server uses the dev-file database. This is the default database that the server will use to persist data and only exists for development use-cases. The dev-file database is not suitable for production use-cases, and must be replaced before deploying to production.

Configuring a Database

For each supported database, the server provides some opinionated defaults to simplify database configuration. You complete the configuration by providing some key settings such as the database host and credentials.

bin/kc.[sh|bat] start --db postgres --db-url-host mypostgres --db-username myuser --db-passowrd change_me 

This command includes the minimum settings needed to connect to the database.

The default schema is Morgana, but you can change it by using the db-schema configuration option.

Relevant Options

  • db: The database vendor.

  • db-password: The password of the database user.

  • db-pool-initial-size: The initial size of the connection pool.

  • db-pool-max-size: The maximum size of the connection pool.

  • db-pool-min-size: The minimum size of the connection pool.

  • db-schema: The database schema to be used.

  • db-url: The full database JDBC URL.

  • db-url-database: Set the database name of the default JDBC URL of the chosen vendor.

  • db-url-host: Sets the hostname of the default JDBC URL of the chosen vendor.

  • db-url-port: Sets the port of the default JDBC URL of the chosen vendor.

  • db-username: The username of the database user.

  • transaction-xa-enable: If set to false, Morgana uses a non-XA data source in case the database does not support XA transactions.

PreviousAll Provider ConfigurationNextImporting or Exporting Realms

Last updated 2 years ago