refactor(gateway-vertx) Updated config JSON for Elasticsearch.
ADD
gateway/platforms/vertx3/vertx3/src/conf/conf-es.json
+{ // Example ElasticSearch based config
+ "registry": {
+ "class": "io.apiman.gateway.engine.es.CachingESRegistry",
+ "config": {
+ "client": {
+ "type": "jest",
+ "protocol": "http",
+ "host": "127.0.0.1",
+ "port": "9200",
+ "initialize": true
+ //"username": "",
+ //"password": ""
+ //"index": ""
+ }
+ }
+ },
+
+ // Gateway error writer
+ // A "trace" version of the error writer - comment out/remove this to suppress stack traces
+ // in the JSON/XML payload returned by the gateway when an error occurs.
+ "writers": {
+ "error": {
+ "class": "io.apiman.gateway.engine.impl.TracePolicyErrorWriter",
+ "config": {}
+ }//,
+ // "policy-failure": {
+ // "class": "",
+ // "config": {}
+ // }
+ },
+
+ "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": {
+ // -----------------------------------------------
+ // SSL/TLS settings for the gateway connector(s).
+ // -----------------------------------------------
+ "tls": {
+ // Enable devMode for HTTPS connections (gateway trusts any certificate).
+ // This should *NOT* be used in production mode. *Use with great care.*
+ "devMode": true,
+
+ // Whether self-signed certificates should be automatically trusted. *Use with great care.*
+ // "allowSelfSigned": false,
+
+ // Whether certificate host checks should be bypassed. *Use with great care.*
+ // "allowAnyHost": false,
+
+ // Trust store contains certificate(s) trusted by gateway.
+ // "trustStore": "/path/to/your/truststore.jks",
+ // "trustStorePassword": "abc123",
+
+ // Key store contains gateway's keys (including private components: keep it safe).
+ // "keyStore": "/path/to/your/keystore.jks",
+ // "keyStorePassword": "abc123",
+
+ // By default all keys can be used (will try all). If alias list provided, will only attempt to use listed keys.
+ // "keyAliases": "mykey,myotherkey",
+
+ // Allowed TLS/SSL protocols and ciphers suites as CSV. Availability will vary depending on your JVM impl.
+ // Uses JVM defaults depending if not explicitly provided.
+ // See: https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html
+ // You may wish to consider global JVM settings by modifying java.security
+ // "allowedProtocols": "TLSv1.2,TLSv1.1",
+ // "allowedCiphers": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,...",
+ // "disallowedCiphers": "..."
+ }
+ }
+ },
+
+ "policy-factory": {
+ "class": "io.apiman.gateway.engine.policy.PolicyFactoryImpl",
+ "config": {}
+ },
+
+ // Elasticsearch Metrics Settings
+ "metrics": {
+ "class": "io.apiman.gateway.engine.es.ESMetrics",
+ "config": {
+ "client": {
+ "type": "jest",
+ "protocol": "http",
+ "host": "127.0.0.1",
+ "port": "9200",
+ "initialize": true
+ //"username": "",
+ //"password": ""
+ //"index": ""
+ }
+ }
+ },
+
+ "components": {
+ // LDAP Component Settings
+ "ILdapComponent": {
+ "class": "io.apiman.gateway.engine.impl.DefaultLdapComponent",
+ "config": {}
+ },
+
+ // HTTP Component Settings
+ "IHttpClientComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.HttpClientComponentImpl",
+ "config": {}
+ },
+
+ // Shared State Component Settings
+ "ISharedStateComponent": {
+ "class": "io.apiman.gateway.engine.es.ESSharedStateComponent",
+ "config": {
+ "client": {
+ "type": "jest",
+ "protocol": "http",
+ "host": "127.0.0.1",
+ "port": "9200",
+ "initialize": true
+ //"username": "",
+ //"password": ""
+ //"index": ""
+ }
+ }
+ },
+
+ // Rate Limiter Component Settings
+ "IRateLimiterComponent": {
+ "class": "io.apiman.gateway.engine.es.ESRateLimiterComponent",
+ "config": {
+ "client": {
+ "type": "jest",
+ "protocol": "http",
+ "host": "127.0.0.1",
+ "port": "9200",
+ "initialize": true
+ //"username": "",
+ //"password": ""
+ //"index": ""
+ }
+ }
+ },
+
+ // Policy Failure Factory Component
+ "IPolicyFailureFactoryComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.PolicyFailureFactoryComponent",
+ "config": {}
+ },
+
+ // Buffer Factory Component
+ "IBufferFactoryComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.BufferFactoryComponentImpl",
+ "config": {}
+ },
+
+ // Execute Blocking Component
+ "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)
+ //"publicEndpoint": "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
+ },
+ // Configure the following SSL section to enable SSL/TLS.
+ "https": {
+ "port": 8443,
+ "count": 0
+ },
+ // The Gateway API; this will be the port to set in the UI.
+ // e.g. http://localhost:8081 or https://gateway.machine:8081
+ // Configure the following SSL section to enable SSL/TLS.
+ "api": {
+ "port": 8081,
+ "count": 1
+ }
+ },
+
+ // SSL configuration to the gateway's *front end* (i.e. client <-> gateway)
+ // and the Gateway API (i.e. Manager -> Gateway API).
+ // "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": {
+ "type": "keycloak",
+ "config": {
+ "flowType": "PASSWORD",
+ "requiredRole": "realm:apipublisher",
+ // Paste your Keycloak config here. Remember to change to confidential client type.
+ // See: https://msavy.gitbooks.io/apiman-production-guide/content/production-guide/gateway/vertx.html#_configuring_keycloak_authentication_for_the_gateway_api
+ "realm": "apiman",
+ "realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyG61ohrfJQKNmDA/ePZtqZVpPXjwn3k3T+iWiTvMsxW2+WlnqIEmL5qZ09DMhBH9r50WZRO2gVoCb657Er9x0vfD6GNf/47XU2y33TX8axhP+hSwkv/VViaDlu4jQrfgPWz/FXMjWIZxg1xQS+nOBF2ScCRYWNQ/ZnUNnvrq8dGC2/AlyeYcgDUOdwlJuvgkGlF0QoVPQiRPurR3RwlG+BjL8JB3hbaAZhdJqwqApmGQbcpgLj2tODnlrZnEAp5cPPU/lgqCE1OOp78BAEiE91ZLPl/+D8qDHk+Maz0Io3bkeRZMXPpvtbL3qN+3GlF8Yz264HDSsTNrH+nd19tFQIDAQAB",
+ "auth-server-url": "http://localhost:8080/auth",
+ "ssl-required": "none",
+ "resource": "apiman",
+ "credentials": {
+ "secret": "5af5458f-0a96-4251-8f92-08ebcc3a8aa2"
+ }
+ }
+ },
+ // When reporting an API's endpoint, prefer secure (i.e. https)
+ "preferSecure": false
+}

DELETE
gateway/platforms/vertx3/vertx3/src/conf/conf.json
-{ // Example ElasticSearch based config
- "registry": {
- "class": "io.apiman.gateway.engine.es.ESRegistry",
- "config": {
- "client": {
- "type": "jest",
- "cluster-name": "elasticsearch",
- "host": "127.0.0.1",
- "port": "9200",
- "initialize": true
- }
- }
- },
-
- "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
-}

refactor(gateway-vertx) Updated config JSON for Elasticsearch.