#  Copyright © Microsoft Corporation
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

LOG_PREFIX=indexer
LOG_LEVEL=DEBUG

server.servlet.contextPath=/api/indexer/v2/
REGION=centralus
logging.level.org.opendes.osdu=${LOG_LEVEL}
JAVA_OPTS=-Dserver.port=80
DEFAULT_DATA_COUNTRY=US

AUTHORIZE_API=${entitlements_service_endpoint}
AUTHORIZE_API_KEY=${entitlements_service_api_key}
LEGALTAG_API=${legal_service_endpoint}

SCHEMA_CACHE_EXPIRATION=60
INDEX_CACHE_EXPIRATION=60
ELASTIC_CACHE_EXPIRATION=1440
CURSOR_CACHE_EXPIRATION=60
KINDS_CACHE_EXPIRATION=2880
ATTRIBUTES_CACHE_EXPIRATION=2880
MAX_CACHE_VALUE_SIZE=1000
KINDS_REDIS_DATABASE=1
CRON_INDEX_CLEANUP_THRESHOLD_DAYS=3
CRON_EMPTY_INDEX_CLEANUP_THRESHOLD_DAYS=7

storage_service_url=${storage_service_endpoint}
STORAGE_SCHEMA_HOST=${storage_service_url}/schemas
STORAGE_QUERY_RECORD_HOST=${storage_service_url}/query/records
STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=${storage_service_url}/query/records:batch
STORAGE_RECORDS_BATCH_SIZE=20

INDEXER_QUEUE_HOST=http://127.0.0.1:9000

# Partition Service configuration
PARTITION_API=${partition_service_endpoint}
azure.activedirectory.app-resource-id=${aad_client_id}

#AzureADconfiguration, commented below settings to disable AAD AuthN ,
#Uncomment it In the Istio AUTHN disabled Scenario
#azure.activedirectory.session-stateless=true
#azure.activedirectory.client-id=${aad_client_id}

# Istio Auth Enabled
azure.istio.auth.enabled=${azure_istioauth_enabled}

azure.cosmosdb.database=${cosmosdb_database}

#AzureServiceBusconfiguration
azure.servicebus.topic-name=${servicebus_topic_name}

#Indexer-Queue-header
indexer.queue.key=abcd
REDIS_SEARCH_HOST=localhost
REDIS_SEARCH_PORT=6379

azure.keyvault.url=${KEYVAULT_URI}
azure.application-insights.instrumentation-key=${appinsights_key}
spring.application.name=indexer-azure

DEPLOYMENT_ENVIRONMENT=CLOUD

logging.transaction.enabled=true
logging.slf4jlogger.enabled=true
logging.mdccontext.enabled=true

# core-lib-azure configuration
tenantFactoryImpl.required=true

# Disable keyVault for actuator health check
management.health.azure-key-vault.enabled=false