Skip to content

Instantly share code, notes, and snippets.

@msavy
Created February 3, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msavy/b5c4699627dc4132e495f9eae0582029 to your computer and use it in GitHub Desktop.
Save msavy/b5c4699627dc4132e495f9eae0582029 to your computer and use it in GitHub Desktop.
{ // Example ElasticSearch based config
"registry": {
"class": "io.apiman.gateway.engine.vertx.polling.URILoadingRegistry",
"config": {
"configUri": "https://gist.githubusercontent.com/msavy/cb245f4ed5228e8aa368a03b035f4b9b/raw/25dcc614dba43821b7623e16302b404c39bdeeca/apiman-gateway-api.json"
}
},
"encrypter": {
"class": "io.apiman.gateway.engine.impl.DefaultDataEncrypter",
"config": {}
},
"plugin-registry": {
"class": "io.apiman.gateway.platforms.vertx3.engine.VertxPluginRegistry",
"config": {}
},
"connector-factory": {
"class": "io.apiman.gateway.platforms.vertx3.connector.ConnectorFactory",
"config": {
// "tls": {
// "allowSelfSigned": true,
// "devMode": true,
// "trustStore": "/path/to/your/truststore.jks",
// "keyStore": "/path/to/your/keystore.jks",
// "keyStorePassword": "abc123"
// }
}
},
"policy-factory": {
"class": "io.apiman.gateway.engine.policy.PolicyFactoryImpl",
"config": {}
},
"metrics": {
"class": "io.apiman.gateway.engine.impl.InMemoryMetrics",
"config": {}
},
"components": {
"ILdapComponent": {
"class": "io.apiman.gateway.engine.impl.DefaultLdapComponent",
"config": {}
},
"IHttpClientComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.HttpClientComponentImpl",
"config": {}
},
"ISharedStateComponent": {
"class": "io.apiman.gateway.engine.es.ESSharedStateComponent",
"config": {
"client": {
"type": "jest",
"cluster-name": "elasticsearch",
"host": "127.0.0.1",
"port": "9200",
"initialize": true
}
}
},
"IRateLimiterComponent": {
"class": "io.apiman.gateway.engine.es.ESRateLimiterComponent",
"config": {
"client": {
"type": "jest",
"cluster-name": "elasticsearch",
"host": "127.0.0.1",
"port": "9200",
"initialize": true
}
}
},
"IPolicyFailureFactoryComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.PolicyFailureFactoryComponent",
"config": {}
},
"IBufferFactoryComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.BufferFactoryComponentImpl",
"config": {}
},
"IExecuteBlockingComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.ExecuteBlockingComponentImpl",
"config": {}
}
},
// Host-name to bind to for this machine.
"hostname": "localhost",
// You can force a particular endpoint to be reported here (e.g.
// if you have some clustered setup with exotic DNS setup)
//"endpoint": "localhost",
// Verticle configuration
// Port - The port a given verticle listens on (where relevant)
// Count - Number of given verticle type launched
"verticles": {
"http": {
"port": 8082,
"count": 1
},
"https": {
"port": 8443,
"count": 0
},
"api": { "port": 8081, "count": 1 }
},
// SSL configuration to the gateway's *front end* (i.e. client <-> gateway).
// "ssl": {
// "keystore": {
// "path": "/the/keystore/path/here.jks",
// "password": "password-here"
// },
// "truststore": {
// "path": "/the/truststore/path/here.jks",
// "password": "password-here"
// }
// },
// API authentication; presently just BASIC auth.
"auth": {
"required": "basic",
"realm": "apiman-gateway",
"basic": { // Password is SHA256 digest encoded as Base64.
"admin" : "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg="
}
},
// When reporting an API's endpoint, prefer secure (i.e. https)
"preferSecure": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment