registry.name=Apicurio Registry (Kafka+SQL)

%dev.quarkus.datasource.db-kind=h2
%dev.quarkus.datasource.jdbc.url=${REGISTRY_DATASOURCE_URL:jdbc:h2:mem:registry_db}
%dev.quarkus.datasource.username=${REGISTRY_DATASOURCE_USERNAME:sa}
%dev.quarkus.datasource.password=${REGISTRY_DATASOURCE_PASSWORD:sa}
%dev.quarkus.datasource.jdbc.initial-size=20
%dev.quarkus.datasource.jdbc.min-size=20
%dev.quarkus.datasource.jdbc.max-size=100

%dev.registry.kafkasql.bootstrap.servers=${KAFKA_BOOTSTRAP_SERVERS:localhost:9092}
%dev.registry.kafkasql.topic=kafkasql-journal
%dev.registry.kafkasql.producer.client.id=${registry.id}-producer
%dev.registry.kafkasql.consumer.poll.timeout=1000
%dev.registry.kafkasql.consumer.group.id=${registry.id}-${quarkus.uuid}

# Kafka Security
%dev.registry.kafkasql.security.sasl.enabled=${ENABLE_KAFKA_SASL:false}
%dev.registry.kafkasql.security.protocol=${KAFKA_SECURITY_PROTOCOL:}
%dev.registry.kafkasql.security.sasl.mechanism=OAUTHBEARER
%dev.registry.kafkasql.security.sasl.client-id=${CLIENT_ID:sa}
%dev.registry.kafkasql.security.sasl.client-secret=${CLIENT_SECRET:sa}
%dev.registry.kafkasql.security.sasl.token.endpoint=${OAUTH_TOKEN_ENDPOINT_URI:http://localhost:8090}
%dev.registry.kafkasql.security.sasl.login.callback.handler.class=io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler

## Truststore and Keystore configuration
### Minimal configuration, no client authentication is needed in the broker
%dev.registry.kafkasql.security.ssl.truststore.type=${KAFKA_SSL_TRUSTSTORE_TYPE:}
%dev.registry.kafkasql.security.ssl.truststore.location=${KAFKA_SSL_TRUSTSTORE_LOCATION:}
%dev.registry.kafkasql.ssl.truststore.password=${KAFKA_SSL_TRUSTSTORE_PASSWORD:}

### When client authentication is required, this must be set
%dev.registry.kafkasql.ssl.keystore.type=${KAFKA_SSL_KEYSTORE_TYPE:}
%dev.registry.kafkasql.ssl.keystore.location=${KAFKA_SSL_KEYSTORE_LOCATION:}
%dev.registry.kafkasql.ssl.keystore.password=${KAFKA_SSL_KEYSTORE_PASSWORD:}
%dev.registry.kafkasql.ssl.key.password=${KAFKA_SSL_KEY_PASSWORD:}

%prod.quarkus.datasource.db-kind=h2
%prod.quarkus.datasource.jdbc.url=${REGISTRY_DATASOURCE_URL:jdbc:h2:mem:registry_db}
%prod.quarkus.datasource.username=${REGISTRY_DATASOURCE_USERNAME:sa}
%prod.quarkus.datasource.password=${REGISTRY_DATASOURCE_PASSWORD:sa}
%prod.quarkus.datasource.jdbc.initial-size=20
%prod.quarkus.datasource.jdbc.min-size=20
%prod.quarkus.datasource.jdbc.max-size=100

%prod.registry.kafkasql.bootstrap.servers=${KAFKA_BOOTSTRAP_SERVERS:localhost:9092}
%prod.registry.kafkasql.topic=kafkasql-journal
%prod.registry.kafkasql.producer.client.id=${registry.id}-producer
%prod.registry.kafkasql.consumer.poll.timeout=100
%prod.registry.kafkasql.consumer.group.id=${registry.id}-${quarkus.uuid}

# Kafka Security
%prod.registry.kafkasql.security.sasl.enabled=${ENABLE_KAFKA_SASL:false}
%prod.registry.kafkasql.security.protocol=${KAFKA_SECURITY_PROTOCOL:}
%prod.registry.kafkasql.security.sasl.mechanism=OAUTHBEARER
%prod.registry.kafkasql.security.sasl.client-id=${CLIENT_ID:sa}
%prod.registry.kafkasql.security.sasl.client-secret=${CLIENT_SECRET:sa}
%prod.registry.kafkasql.security.sasl.token.endpoint=${OAUTH_TOKEN_ENDPOINT_URI:http://localhost:8090}
%prod.registry.kafkasql.security.sasl.login.callback.handler.class=io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler

## Truststore and Keystore configuration
### Minimal configuration, no client authentication is needed in the broker
%prod.registry.kafkasql.security.ssl.truststore.type=${KAFKA_SSL_TRUSTSTORE_TYPE:JKS}
%prod.registry.kafkasql.security.ssl.truststore.location=${KAFKA_SSL_TRUSTSTORE_LOCATION:}
%prod.registry.kafkasql.ssl.truststore.password=${KAFKA_SSL_TRUSTSTORE_PASSWORD:}

### When client authentication is required, this must be set
%prod.registry.kafkasql.ssl.keystore.type=${KAFKA_SSL_KEYSTORE_TYPE:JKS}
%prod.registry.kafkasql.ssl.keystore.location=${KAFKA_SSL_KEYSTORE_LOCATION:}
%prod.registry.kafkasql.ssl.keystore.password=${KAFKA_SSL_KEYSTORE_PASSWORD:}
%prod.registry.kafkasql.ssl.key.password=${KAFKA_SSL_KEY_PASSWORD:}

quarkus.native.resources.includes=i18n/*.properties
quarkus.native.additional-build-args=--initialize-at-run-time=org.apache.kafka.common.security.authenticator.SaslClientAuthenticator
