Configuring Apache Polaris (Incubating) for Production
The default polaris-server.yml
configuration is intended for development and testing. When deploying Polaris in production, there are several best practices to keep in mind.
Security
Configurations
Notable configuration used to secure a Polaris deployment are outlined below.
oauth2
[!WARNING]
Ensure that thetokenBroker
setting reflects the token broker specified inauthenticator
below.
- Configure OAuth with this setting. Remove the
TestInlineBearerTokenPolarisAuthenticator
option and uncomment theDefaultPolarisAuthenticator
authenticator option beneath it. - Then, configure the token broker. You can configure the token broker to use either asymmetric or symmetric keys.
authenticator.tokenBroker
[!WARNING]
Ensure that thetokenBroker
setting reflects the token broker specified inoauth2
above.
callContextResolver & realmContextResolver
- Use these configurations to specify a service that can resolve a realm from bearer tokens.
- The service(s) used here must implement the relevant interfaces (i.e. CallContextResolver and RealmContextResolver).
Metastore Management
[!IMPORTANT]
The defaultin-memory
implementation formetastoreManager
is meant for testing and not suitable for production usage. Instead, consider an implementation such aseclipse-link
which allows you to store metadata in a remote database.
A Metastore Manger should be configured with an implementation that durably persists Polaris entities. Use the configuration metaStoreManager
to configure a MetastoreManager implementation where Polaris entities will be persisted.
Be sure to secure your metastore backend since it will be storing credentials and catalog metadata.
Configuring EclipseLink
To use EclipseLink for metastore management, specify the configuration metaStoreManager.conf-file
to point to an EclipseLink persistence.xml
file. This file, local to the Polaris service, contains details of the database used for metastore management and the connection settings. For more information, refer to the metastore documentation.
[!IMPORTANT] EclipseLink requires
- Building the JAR for the EclipseLink extension
- Setting the
eclipseLink
gradle property totrue
.This can be achieved by setting
eclipseLink=true
in thegradle.properties
file, or by passing the property explicitly while building all JARs, e.g.:./gradlew -PeclipseLink=true clean assemble
Bootstrapping
Before using Polaris when using a metastore manager other than in-memory
, you must bootstrap the metastore manager. This is a manual operation that must be performed only once in order to prepare the metastore manager to integrate with Polaris. When the metastore manager is bootstrapped, any existing Polaris entities in the metastore manager may be purged.
To bootstrap Polaris, run:
java -jar /path/to/jar/polaris-service-all.jar bootstrap polaris-server.yml
Afterward, Polaris can be launched normally:
java -jar /path/to/jar/polaris-service-all.jar server polaris-server.yml
Other Configurations
When deploying Polaris in production, consider adjusting the following configurations:
featureConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES
- By default Polaris catalogs are allowed to be located in local filesystem with the
FILE
storage type. This should be disabled for production systems. - Use this configuration to additionally disable any other storage types that will not be in use.