[server]
#hostname = "gw.wso2.com"
server_role = "gateway-worker"

[user_store]
type = "database_unique_id"

[super_admin]
username = "admin"
password = "admin"
create_admin_account = true

[database.shared_db]
type = "mysql"
hostname = "shared_db.mysql"
name = "shared_db"
port = "3306"
username = "shareduser"
password = "shareduser"

[keystore.tls]
file_name =  "wso2carbon.jks"
type =  "JKS"
password =  "wso2carbon"
alias =  "wso2carbon"
key_password =  "wso2carbon"

[truststore]
file_name = "client-truststore.jks"
type = "JKS"
password = "wso2carbon"

# key manager implementation
[apim.key_manager]
service_url = "https://km.wso2.com:443/services/"
username= "$ref{super_admin.username}"
password= "$ref{super_admin.password}"

# JWT Generation
[apim.jwt]
enable = true
encoding = "base64" # base64,base64url
#generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator"
claim_dialect = "http://wso2.org/claims"
header = "X-JWT-Assertion"
signing_algorithm = "SHA256withRSA"
#enable_user_claims = true
#claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.DefaultClaimsRetriever"

[apim.sync_runtime_artifacts.gateway]
gateway_labels =["Default"]

# Traffic Manager configurations
[apim.throttling]
username= "$ref{super_admin.username}"
password= "$ref{super_admin.password}"
service_url = "https://tm.wso2.com:443/services/"
throttle_decision_endpoints = ["tcp://tm1.local:5672","tcp://tm2.local:5672"]
enable_unlimited_tier = true
enable_header_based_throttling = false
enable_jwt_claim_based_throttling = false
enable_query_param_based_throttling = false


[[apim.throttling.url_group]]
traffic_manager_urls=["tcp://tm1.local:9611"]
traffic_manager_auth_urls=["ssl://tm1.local:9711"]

[[apim.throttling.url_group]]
traffic_manager_urls=["tcp://tm2.local:9611"]
traffic_manager_auth_urls=["ssl://tm2.local:9711"]

[apim.analytics]
enable = false
config_endpoint = "https://localhost:8080/auth/v1"
auth_token = ""

# Caches
[apim.cache.gateway_token]
enable = true
expiry_time = 15

[apim.cache.resource]
enable = true

[apim.cache.jwt_claim]
enable = true
expiry_time = 900

[apim.oauth_config]
remove_outbound_auth_header = true
auth_header = "Authorization"

[apim.cors]
allow_origins = "*"
allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"]
allow_credentials = false
