diff --git a/.gitattributes b/.gitattributes
new file mode 100755
index 0000000..f05c7fc
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,40 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
+
+# Explicitly declare text files you want to always be normalized and converted
+# to native line endings on checkout.
+*.txt text
+*.java text
+*.groovy text
+*.js text
+*.form text
+*.c text
+*.h text
+*.cpp text
+*.xml text
+*.xsd text
+*.config text
+*.conf text
+*.properties text
+*.manifest text
+*.yml text
+*.json text
+
+# Declare files that will always have LF line endings on checkout.
+*.sh text eol=lf
+*.pl text eol=lf
+*.sql text eol=lf
+
+# Declare files that will always have CRLF line endings on checkout.
+*.bat text eol=crlf
+*.cmd text eol=crlf
+*.sln text eol=crlf
+*.rc text eol=crlf
+*.vcproj text eol=crlf
+modules/gateway/server/src/test/resources/com/l7tech/server/policy/resources/REQUEST_signed_attachment.txt text eol=crlf
+modules/gateway/server/src/test/resources/com/l7tech/server/policy/resources/REQUEST_unsigned_attachment.txt text eol=crlf
+
+# Denote all files that are truly binary and should not be modified.
+*.jar binary
+*.tgz binary
+*.ico binary
diff --git a/.gitignore b/.gitignore
index 952e928..54e0c40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,10 +3,10 @@
# of the MIT license. See the LICENSE file for details.
# Root files to ignore
-/.gradle/
+.gradle/
/.idea/
/*.iml
-/build/
+build/
/out/
.DS_Store
.java-version
diff --git a/README.md b/README.md
index 28aaa14..4c36725 100644
--- a/README.md
+++ b/README.md
@@ -1,55 +1 @@
-[](https://waffle.io/ca-api-Gateway/Gateway-developer-plugin)
-[](https://travis-ci.com/ca-api-gateway-examples/gateway-developer-example)
-
-# About
-This is an example repository that demonstrates how to use the [CA API Gateway Developer Plugin][gateway-developer-plugin].
-
-# Getting Started
-
-## Building the Solution
-In order to package the solution into something that can be applied to the CA API Gateway run the following Gradle command:
-
-```gradle build```
-
-This takes the solution that is contained in the `src/main/gateway` folder and packages it into a bundle at `build/gateway/gateway-developer-example.bundle`
-
-## Running the Solution
-In order to run the solution you need to do the following:
-
-1) Put a valid gateway license in the `docker` folder. The license file should be called `license.xml`
-2) Make sure you have already built the solution by running `gradle build`
-3) Start the Gateway Container by running: `docker-compose up`
-
-After the container is up and running you can connect the CA API Gateway Policy Manager to it and/or call the example API at `/example`
-
-## Exporting Updates
-If you connect to the running gateway with the CA API Gateway Policy Manager and make changes to the services you can export those changes by running:
-
-```gradle export```
-
-This will export the changes to the `src/main/gateway` folder. Note that your local edits will be overridden by changes from the gateway
-
-# About the Example Solution
-The solution that is checked into this repository is contains a single folder and service. The service exposes `/example` and will respond with the following JSON for any HTTP(S) request:
-```json
-{
- "you-say": ["Hello", "Gateway"],
- "gateway-says": ["Hello", "User"]
-}
-```
-
-# Giving Back
-## How You Can Contribute
-Contributions are welcome and much appreciated. To learn more, see the [Contribution Guidelines][contributing].
-
-## License
-
-Copyright (c) 2018 CA. All rights reserved.
-
-This software may be modified and distributed under the terms
-of the MIT license. See the [LICENSE][license-link] file for details.
-
-
- [license-link]: /LICENSE
- [contributing]: /CONTRIBUTING.md
- [gateway-developer-plugin]: https://github.com/ca-api-gateway/gateway-developer-plugin
+Repo has been moved. Please go to https://github.com/Layer7-Community/Utilities/tree/main/policy-plugin-examples
diff --git a/audit/build.gradle b/audit/build.gradle
new file mode 100644
index 0000000..832d53c
--- /dev/null
+++ b/audit/build.gradle
@@ -0,0 +1,9 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/audit-policies'
+}
\ No newline at end of file
diff --git a/audit/settings.gradle b/audit/settings.gradle
new file mode 100644
index 0000000..f4b6831
--- /dev/null
+++ b/audit/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'audit'
\ No newline at end of file
diff --git a/audit/src/main/gateway/config/audit-policies.yml b/audit/src/main/gateway/config/audit-policies.yml
new file mode 100644
index 0000000..bbcb161
--- /dev/null
+++ b/audit/src/main/gateway/config/audit-policies.yml
@@ -0,0 +1,12 @@
+Audit Viewer Policy:
+ path: "audit-policies/Audit Viewer Policy"
+ tag: "audit-viewer"
+Audit Filter Policy:
+ path: "audit-policies/Audit Filter Policy"
+ tag: "audit-message-filter"
+'[Internal Audit Sink Policy]':
+ path: "audit-policies/[Internal Audit Sink Policy]"
+ tag: "audit-sink"
+'[Internal Audit Lookup Policy]':
+ path: "audit-policies/[Internal Audit Lookup Policy]"
+ tag: "audit-lookup"
diff --git a/audit/src/main/gateway/policy/audit-policies/Audit Filter Policy.xml b/audit/src/main/gateway/policy/audit-policies/Audit Filter Policy.xml
new file mode 100644
index 0000000..bef1c47
--- /dev/null
+++ b/audit/src/main/gateway/policy/audit-policies/Audit Filter Policy.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/audit/src/main/gateway/policy/audit-policies/Audit Viewer Policy.xml b/audit/src/main/gateway/policy/audit-policies/Audit Viewer Policy.xml
new file mode 100644
index 0000000..fd224ec
--- /dev/null
+++ b/audit/src/main/gateway/policy/audit-policies/Audit Viewer Policy.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/audit/src/main/gateway/policy/audit-policies/[Internal Audit Lookup Policy].xml b/audit/src/main/gateway/policy/audit-policies/[Internal Audit Lookup Policy].xml
new file mode 100644
index 0000000..0be6920
--- /dev/null
+++ b/audit/src/main/gateway/policy/audit-policies/[Internal Audit Lookup Policy].xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/audit/src/main/gateway/policy/audit-policies/[Internal Audit Sink Policy].xml b/audit/src/main/gateway/policy/audit-policies/[Internal Audit Sink Policy].xml
new file mode 100644
index 0000000..d0213b6
--- /dev/null
+++ b/audit/src/main/gateway/policy/audit-policies/[Internal Audit Sink Policy].xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
index ce531d2..cb72e8f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,26 +4,63 @@
* of the MIT license. See the LICENSE file for details.
*/
-plugins {
- id "com.ca.apim.gateway.gateway-developer-plugin" version "0.5.00"
- id "com.ca.apim.gateway.gateway-export-plugin" version "0.5.00"
+buildscript {
+ repositories {
+ mavenLocal()
+ maven {
+ url "https://plugins.gradle.org/m2/"
+ }
+ }
+ dependencies {
+ // "+" will always pull the latest available
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-import-plugin:1.0.+"
+ }
}
-group 'com.ca.apim.gateway'
-version '0.5.00'
+subprojects {
+ apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+ if (!project.name.equals('deployment')) {
+ apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+ GatewayConnection {
+ url = 'https://localhost:8443/restman'
+ }
+ }
+ group 'com.ca.apim.gateway'
+ version = '1.0.0'
-GatewayConnection {
- url = 'https://localhost:8443/restman'
- folderPath = '/gateway-solution'
+ repositories {
+ mavenLocal()
+ flatDir {
+ dirs new File(project.parent.rootDir, "lib")
+ }
+ jcenter()
+ }
}
-repositories {
- flatDir {
- dirs "lib"
- }
+wrapper {
+ gradleVersion = '4.10'
}
-dependencies {
- bundle group: 'my-bundle', name: 'my-bundle', version: '1.0.00', ext: 'bundle'
+// Zip task
+FileTree tree = fileTree(dir: 'build/gateway/bundle', include: '*.metadata.yml')
+tree.each { File file ->
+ String bundleName = file.name.substring(0, file.name.indexOf('.metadata.yml'))
+ task "zip-${bundleName}"(type: Zip) {
+ archiveName = bundleName + '.zip'
+ from('build/gateway/bundle') {
+ include bundleName + '*.bundle'
+ include file.name
+ }
+ }
}
+
+// Zip bundles task
+task zipBundles {
+ tree.each { File file ->
+ String bundleName = file.name.substring(0, file.name.indexOf('.metadata.yml'))
+ dependsOn 'zip-' + bundleName;
+ }
+}
\ No newline at end of file
diff --git a/business-integrations/build.gradle b/business-integrations/build.gradle
new file mode 100644
index 0000000..c378f51
--- /dev/null
+++ b/business-integrations/build.gradle
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/business-integrations'
+}
+
+dependencies {
+ bundle project(':common-services')
+}
\ No newline at end of file
diff --git a/business-integrations/settings.gradle b/business-integrations/settings.gradle
new file mode 100644
index 0000000..8d323a8
--- /dev/null
+++ b/business-integrations/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'business-integrations'
\ No newline at end of file
diff --git a/business-integrations/src/main/gateway/config/services.yml b/business-integrations/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..489834f
--- /dev/null
+++ b/business-integrations/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+business-integrations/b2b-services:
+ url: "/b2b/*"
+ policy: "business-integrations/b2b-services"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/src/main/gateway/policy/gateway-solution/policy-backed-service/a-policy-backed-service.xml b/business-integrations/src/main/gateway/policy/business-integrations/b2b-services.xml
similarity index 70%
rename from src/main/gateway/policy/gateway-solution/policy-backed-service/a-policy-backed-service.xml
rename to business-integrations/src/main/gateway/policy/business-integrations/b2b-services.xml
index 039e3d9..a69a3c6 100644
--- a/src/main/gateway/policy/gateway-solution/policy-backed-service/a-policy-backed-service.xml
+++ b/business-integrations/src/main/gateway/policy/business-integrations/b2b-services.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/cassandra-example/build.gradle b/cassandra-example/build.gradle
new file mode 100644
index 0000000..92a3b96
--- /dev/null
+++ b/cassandra-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "cassandraConnection"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="cassandraExample"
+ map=[
+ "CASSANDRA_CONNECTION": file("./src/main/gateway/config/cassandra-connections.yml")
+ ]
+}
diff --git a/cassandra-example/settings.gradle b/cassandra-example/settings.gradle
new file mode 100644
index 0000000..581a0e2
--- /dev/null
+++ b/cassandra-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'cassandra-example'
\ No newline at end of file
diff --git a/cassandra-example/src/main/gateway/config/cassandra-connections.yml b/cassandra-example/src/main/gateway/config/cassandra-connections.yml
new file mode 100644
index 0000000..11fa651
--- /dev/null
+++ b/cassandra-example/src/main/gateway/config/cassandra-connections.yml
@@ -0,0 +1,11 @@
+cassandraTestConnection:
+ keyspace: "qa"
+ contactPoint: "cassandratest.com"
+ port: 9042
+ username: ""
+ compression: "NONE"
+ ssl: false
+ properties: {}
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e222212"
diff --git a/cassandra-example/src/main/gateway/config/policies.yml b/cassandra-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..8983378
--- /dev/null
+++ b/cassandra-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+cassandra-folder/cassandra-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "CASSANDRA_CONFIGURATION"
+ name: "cassandraTestConnection"
+ annotations:
diff --git a/cassandra-example/src/main/gateway/config/services.yml b/cassandra-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..93fbe55
--- /dev/null
+++ b/cassandra-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+cassandra-folder/cassandra-service:
+ url: "/cassandra"
+ policy: "cassandra-folder/cassandra-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/cassandra-example/src/main/gateway/policy/cassandra-folder/cassandra-policy.xml b/cassandra-example/src/main/gateway/policy/cassandra-folder/cassandra-policy.xml
new file mode 100644
index 0000000..f714fde
--- /dev/null
+++ b/cassandra-example/src/main/gateway/policy/cassandra-folder/cassandra-policy.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/clusterproperty-example/build.gradle b/clusterproperty-example/build.gradle
new file mode 100644
index 0000000..d53efe2
--- /dev/null
+++ b/clusterproperty-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "clusterproperty"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="clusterPropertyExample"
+ map=[
+ "PROPERTY": file("./src/main/gateway/config/global-env.properties")
+ ]
+}
\ No newline at end of file
diff --git a/clusterproperty-example/settings.gradle b/clusterproperty-example/settings.gradle
new file mode 100644
index 0000000..ba75b33
--- /dev/null
+++ b/clusterproperty-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'clusterproperty-example'
\ No newline at end of file
diff --git a/clusterproperty-example/src/main/gateway/config/global-env.properties b/clusterproperty-example/src/main/gateway/config/global-env.properties
new file mode 100644
index 0000000..7ce71bd
--- /dev/null
+++ b/clusterproperty-example/src/main/gateway/config/global-env.properties
@@ -0,0 +1 @@
+gateway.http.host=example.com
diff --git a/clusterproperty-example/src/main/gateway/config/policies.yml b/clusterproperty-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..f11764c
--- /dev/null
+++ b/clusterproperty-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,11 @@
+clusterproperty-folder/clusterproperty-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "SSG_KEY_ENTRY"
+ name: "SSL"
+ - type: "ENVIRONMENT_PROPERTY"
+ name: "http.host"
+ annotations:
diff --git a/clusterproperty-example/src/main/gateway/config/services.yml b/clusterproperty-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..1817bfe
--- /dev/null
+++ b/clusterproperty-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+clusterproperty-folder/clusterproperty-service:
+ url: "/property"
+ policy: "clusterproperty-folder/clusterproperty-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/clusterproperty-example/src/main/gateway/policy/clusterproperty-folder/clusterproperty-policy.xml b/clusterproperty-example/src/main/gateway/policy/clusterproperty-folder/clusterproperty-policy.xml
new file mode 100644
index 0000000..9d64b88
--- /dev/null
+++ b/clusterproperty-example/src/main/gateway/policy/clusterproperty-folder/clusterproperty-policy.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/common-services/build.gradle b/common-services/build.gradle
new file mode 100644
index 0000000..9db0b58
--- /dev/null
+++ b/common-services/build.gradle
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/common'
+ exportEntities = [
+ jdbcConnections:[ "pets-db" ],
+ ]
+}
+
+dependencies {
+ bundle group: 'my-bundle', name: 'my-bundle', version: '1.0.00', ext: 'bundle'
+}
\ No newline at end of file
diff --git a/common-services/settings.gradle b/common-services/settings.gradle
new file mode 100644
index 0000000..fddb458
--- /dev/null
+++ b/common-services/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'common-services'
\ No newline at end of file
diff --git a/common-services/src/main/gateway/config/encass.yml b/common-services/src/main/gateway/config/encass.yml
new file mode 100644
index 0000000..5366694
--- /dev/null
+++ b/common-services/src/main/gateway/config/encass.yml
@@ -0,0 +1,33 @@
+createPet:
+ policy: "common/entities/createPet"
+ arguments:
+ - name: "age"
+ type: "string"
+ requireExplicit: true
+ - name: "name"
+ type: "string"
+ requireExplicit: true
+ - name: "type"
+ type: "string"
+ requireExplicit: true
+ results:
+ - name: "pet-json"
+ type: "string"
+ properties:
+ paletteFolder: "internalAssertions"
+encass-policy:
+ policy: "common/encass-policy"
+ arguments:
+ - name: "hello"
+ type: "string"
+ requireExplicit: true
+ - name: "hello-again"
+ type: "message"
+ requireExplicit: false
+ results:
+ - name: "goodbye"
+ type: "string"
+ - name: "goodbye-again"
+ type: "message"
+ properties:
+ paletteFolder: "internalAssertions"
diff --git a/src/main/gateway/config/policy-backed-services.yml b/common-services/src/main/gateway/config/policy-backed-services.yml
similarity index 61%
rename from src/main/gateway/config/policy-backed-services.yml
rename to common-services/src/main/gateway/config/policy-backed-services.yml
index f71578b..1e12e48 100644
--- a/src/main/gateway/config/policy-backed-services.yml
+++ b/common-services/src/main/gateway/config/policy-backed-services.yml
@@ -1,5 +1,5 @@
background-task-service:
interfaceName: "com.l7tech.objectmodel.polback.BackgroundTask"
operations:
- - policy: "gateway-solution/policy-backed-service/a-policy-backed-service.xml"
+ - policy: "common/ScheduledTaskPolicy"
operationName: "run"
diff --git a/common-services/src/main/gateway/config/scheduled-tasks.yml b/common-services/src/main/gateway/config/scheduled-tasks.yml
new file mode 100644
index 0000000..556664c
--- /dev/null
+++ b/common-services/src/main/gateway/config/scheduled-tasks.yml
@@ -0,0 +1,8 @@
+Test:
+ policy: "common/ScheduledTaskPolicy"
+ isOneNode: false
+ jobType: "Recurring"
+ jobStatus: "Scheduled"
+ cronExpression: "0 0/60 * ? * 2,3,4,5,6"
+ shouldExecuteOnCreate: false
+ properties: {}
diff --git a/common-services/src/main/gateway/policy/common/ScheduledTaskPolicy.xml b/common-services/src/main/gateway/policy/common/ScheduledTaskPolicy.xml
new file mode 100644
index 0000000..a4fc229
--- /dev/null
+++ b/common-services/src/main/gateway/policy/common/ScheduledTaskPolicy.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/common-services/src/main/gateway/policy/common/auth/basic-auth.xml b/common-services/src/main/gateway/policy/common/auth/basic-auth.xml
new file mode 100644
index 0000000..9465f0e
--- /dev/null
+++ b/common-services/src/main/gateway/policy/common/auth/basic-auth.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/main/gateway/policy/gateway-solution/encass-policy.xml b/common-services/src/main/gateway/policy/common/encass-policy.xml
similarity index 100%
rename from src/main/gateway/policy/gateway-solution/encass-policy.xml
rename to common-services/src/main/gateway/policy/common/encass-policy.xml
diff --git a/common-services/src/main/gateway/policy/common/entities/createPet.xml b/common-services/src/main/gateway/policy/common/entities/createPet.xml
new file mode 100644
index 0000000..67dba04
--- /dev/null
+++ b/common-services/src/main/gateway/policy/common/entities/createPet.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/src/main/gateway/policy/gateway-solution/example-policy-include.xml b/common-services/src/main/gateway/policy/common/example-policy-include.xml
similarity index 82%
rename from src/main/gateway/policy/gateway-solution/example-policy-include.xml
rename to common-services/src/main/gateway/policy/common/example-policy-include.xml
index 02b072a..0d1b7af 100644
--- a/src/main/gateway/policy/gateway-solution/example-policy-include.xml
+++ b/common-services/src/main/gateway/policy/common/example-policy-include.xml
@@ -1,14 +1,12 @@
-
-
-
+
-
+
diff --git a/src/main/gateway/policy/gateway-solution/policy-referencing-dependent-bundle.xml b/common-services/src/main/gateway/policy/common/policy-referencing-dependent-bundle.xml
similarity index 76%
rename from src/main/gateway/policy/gateway-solution/policy-referencing-dependent-bundle.xml
rename to common-services/src/main/gateway/policy/common/policy-referencing-dependent-bundle.xml
index 8e16a25..46d5989 100644
--- a/src/main/gateway/policy/gateway-solution/policy-referencing-dependent-bundle.xml
+++ b/common-services/src/main/gateway/policy/common/policy-referencing-dependent-bundle.xml
@@ -1,8 +1,8 @@
-
+
-
+
diff --git a/consumer-solutions/build.gradle b/consumer-solutions/build.gradle
new file mode 100644
index 0000000..d7bfe5e
--- /dev/null
+++ b/consumer-solutions/build.gradle
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/consumer-solutions'
+}
+
+dependencies {
+ bundle project(':common-services')
+ bundle group: 'my-bundle', name: 'my-bundle', version: '1.0.00', ext: 'bundle'
+}
\ No newline at end of file
diff --git a/consumer-solutions/settings.gradle b/consumer-solutions/settings.gradle
new file mode 100644
index 0000000..fcb8175
--- /dev/null
+++ b/consumer-solutions/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'consumer-solutions'
\ No newline at end of file
diff --git a/consumer-solutions/src/main/gateway/config/services.yml b/consumer-solutions/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..a6deadf
--- /dev/null
+++ b/consumer-solutions/src/main/gateway/config/services.yml
@@ -0,0 +1,9 @@
+consumer-solutions/pets/listPets:
+ url: "/gateway-pets"
+ policy: "consumer-solutions/pets/listPets"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ wssProcessingEnabled: false
\ No newline at end of file
diff --git a/consumer-solutions/src/main/gateway/policy/consumer-solutions/pets/listPets.xml b/consumer-solutions/src/main/gateway/policy/consumer-solutions/pets/listPets.xml
new file mode 100644
index 0000000..dcb386c
--- /dev/null
+++ b/consumer-solutions/src/main/gateway/policy/consumer-solutions/pets/listPets.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/deployment/build.gradle b/deployment/build.gradle
new file mode 100644
index 0000000..6be28bc
--- /dev/null
+++ b/deployment/build.gradle
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+dependencies {
+ bundle project(':business-integrations')
+ bundle project(':consumer-solutions')
+ bundle project(':audit')
+ bundle project(':global')
+ bundle project(':routings')
+ bundle project(':service-metrics')
+}
+
+// Configurations below are designed to be used with non-ephemeral gateways
+apply plugin: 'com.ca.apim.gateway.gateway-import-plugin'
+
+// configuration for the environment bundle generation
+// profile 'test'
+project.ext.set ("testEnvironmentInfo", ['PASSWORD.pets-db-password': 'temp', "JDBC_CONNECTION.pets-db": "{\n" +
+ "\"driverClass\": \"com.l7tech.jdbc.mysql.MySQLDriver\",\n" +
+ "\"jdbcUrl\": \"jdbc:mysql://localhost:3306/test\",\n" +
+ "\"user\": \"admin\",\n" +
+ "\"passwordRef\": \"pets-db-password\",\n" +
+ "\"minimumPoolSize\": 3,\n" +
+ "\"maximumPoolSize\": 15,\n" +
+ "\"properties\": {\n" +
+ " \"EnableCancelTimeout\": \"true\"\n" +
+ "}\n" +
+ "}",
+ "PROPERTY.gateway.log.levels": "com.l7tech.server.policy.level = FINEST\n" +
+ "com.hazelcast.level = OFF"])
+project.ext.set("testGatewayURL", "https://joaoborges-laptop:8443")
+project.ext.set("testGatewayUsername", "admin")
+project.ext.set("testGatewayPassword", "password")
+
+// profile 'production'
+project.ext.set ("productionEnvironmentInfo", ['PASSWORD.pets-db-password': '14Uzx2(C.>z196I', "ENV.JDBC_CONNECTION.pets-db": "{\n" +
+ "\"driverClass\": \"com.l7tech.jdbc.mysql.MySQLDriver\",\n" +
+ "\"jdbcUrl\": \"jdbc:mysql://database.production.com:3306/production\",\n" +
+ "\"user\": \"admin\",\n" +
+ "\"passwordRef\": \"pets-db-password\",\n" +
+ "\"minimumPoolSize\": 3,\n" +
+ "\"maximumPoolSize\": 15,\n" +
+ "\"properties\": {\n" +
+ " \"EnableCancelTimeout\": \"true\"\n" +
+ " }\n" +
+ "}",
+ "PROPERTY.gateway.log.levels": "com.l7tech.server.policy.level = WARNING\n" +
+ "com.hazelcast.level = WARNING"])
+project.ext.set("productionGatewayURL", "https://gateway.production.com:8443")
+project.ext.set("productionGatewayUsername", "admin")
+project.ext.set("productionGatewayPassword", "password")
+
+// GatewayImportConnection stores the information on how to access the running gateway
+// This is being done for a single GW instance, in a cluster, GWs will be sharing DB and making changes into a single one
+// will automatically replicate to the others.
+// Here we have the URL, username and password to access restman services.
+// This info is being loaded from previously configured values, choosing the environment profile using a property.
+// This can be specified with -PenvironmentType=xxx when running ./gradlew.
+GatewayImportConnection {
+ // pick the chosen environment type, or if null use test by default
+ def environmentType = project.parent.properties['environmentType'] ?: 'test'
+ url = project.ext."${environmentType}GatewayURL"
+ userName = project.ext."${environmentType}GatewayUsername"
+ userPass = project.ext."${environmentType}GatewayPassword"
+}
+
+// This configuration is also chosen using profile property, and relates to which map of environment values
+// will be used to provide the environment bundles to the Gateway.
+GatewaySourceConfig {
+ // pick the chosen environment type, or if null use test by default
+ def environmentType = project.parent.properties['environmentType'] ?: 'test'
+ // select the environment config for the specified environment
+ environmentConfig = project.ext."${environmentType}EnvironmentInfo"
+}
+
+// The section below configures the tasks related to building and deploying the bundles.
+// Two gradle tasks are involved in this process: 'build-full-bundle' and 'import-bundle'.
+
+// The first one is the task that will grab all behavior configuration bundles (called 'deployment' bundles)
+// and generate an environment configuration bundle using information from the specified environment profile.
+// Then, all bundles get merged and exported to a file
+
+// The second one is the task that will grab any bundle and upload to the Gateway, using restman endpoint configurations
+// specified above.
+// To achieve the required result, we set the import-bundle task to install the bundle that is the output
+// of the build-full-bundle task. This will install the solution merged bundle, containing the environment properties,
+// and the behaviour configurations.
+// This is achieved by adding the 'dependsOn' declaration below, and setting the bundles property in GatewayImportConfig
+tasks.getByName("import-bundle").dependsOn("build-full-bundle")
+
+GatewayImportConfig {
+ bundles = files("./build/gateway/bundle/" + project.name + "-" + project.version + "-full.install.bundle")
+}
+
+// To try this whole solution, follow the steps below:
+/*
+ * - run ./gradlew build in the root folder of this project, which will generate the gw7 package for the deployment module
+ * - spin up the gateway using the docker-compose.yml file provided as sample in this repository
+ * - make changes locally to the configuration files, add/remove policies, provide more environment properties into this file.
+ * - run ./gradlew clean build :deployment:import-bundle which will run the tasks explained above and will deploy the results to the running gateway
+ * - using Gateway Policy Manager, check policies and configuration to see modifications were applied.
+ */
\ No newline at end of file
diff --git a/deployment/settings.gradle b/deployment/settings.gradle
new file mode 100644
index 0000000..b26e555
--- /dev/null
+++ b/deployment/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'deployment'
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index f639f15..b5c152c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,25 +5,172 @@
version: '3.4'
services:
gateway-dev:
- hostname: gateway-dev
- image: caapim/gateway:9.3.00
+ hostname: gateway-developer-example
+ image: caapim/gateway:latest
ports:
- "8080:8080"
- "8443:8443"
- - "9443:9443"
- "8000:8000"
volumes:
- /opt/SecureSpan/Gateway/node/default/etc/bootstrap/services/restman
- - ./lib/my-bundle-1.0.00.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/1-my-bundle-1.0.00.req.bundle
- - ./build/gateway/gateway-developer-example.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/2-gateway-developer-example.req.bundle
+ - ./common-services/build/gateway/bundle/common-services-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/common-services-1.0.0-full.install.bundle
+ - ./business-integrations/build/gateway/bundle/business-integrations-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/business-integrations-1.0.0-full.install.bundle
+ - ./consumer-solutions/build/gateway/bundle/consumer-solutions-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/consumer-solutions-1.0.0-full.install.bundle
+ - ./global/build/gateway/bundle/global-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/global-1.0.0-full.install.bundle
+ - ./routings/build/gateway/bundle/routings-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/routings-1.0.0-full.install.bundle
+ - ./service-metrics/build/gateway/bundle/service-metrics-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/service-metrics-1.0.0-full.install.bundle
+ - ./cassandra-example/build/gateway/bundle/cassandra-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/cassandra-example-1.0.0-full.install.bundle
+ - ./clusterproperty-example/build/gateway/bundle/clusterproperty-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/clusterproperty-example-1.0.0-full.install.bundle
+ - ./encass-annotations/build/gateway/bundle/encass-annotations-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/encass-annotations-1.0.0-full.install.bundle
+ - ./idprovider-example/build/gateway/bundle/idprovider-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/idprovider-example-1.0.0-full.install.bundle
+ - ./jms-example/build/gateway/bundle/jms-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/jms-example-1.0.0-full.install.bundle
+ - ./mqnative-example/build/gateway/bundle/mqnative-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/mqnative-example-1.0.0-full.install.bundle
+ - ./password-example/build/gateway/bundle/password-example-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/password-example-1.0.0-full.install.bundle
+ - ./service-annotations/build/gateway/bundle/service-annotations-1.0.0-full.install.bundle:/opt/SecureSpan/Gateway/node/default/etc/bootstrap/bundle/service-annotations-1.0.0-full.install.bundle
secrets:
- source: license
target: /opt/SecureSpan/Gateway/node/default/etc/bootstrap/license/license.xml
+ - source: privateKeys
+ target: /opt/SecureSpan/Gateway/node/default/etc/bootstrap/env/config/privateKeys
environment:
ACCEPT_LICENSE: "true"
SSG_ADMIN_USERNAME: "admin"
SSG_ADMIN_PASSWORD: "password"
- EXTRA_JAVA_ARGS: "-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
+
+ # Environment
+
+ # A Private Key
+ ENV.PRIVATE_KEY.test: |-
+ algorithm: EC
+ keyPassword: ''
+
+ # Cluster Properties (Global Environment Properties)
+ ENV.PROPERTY.gateway.log_levels: |-
+ com.l7tech.server.policy.level = FINEST
+ com.hazelcast.level = OFF
+ ENV.PROPERTY.gateway.ENV.globalProperty: "cluster property from env var"
+
+ # Context Variable Properties (Context Environment Properties)
+ ENV.CONTEXT_VARIABLE_PROPERTY.environment-properties-example.contextVariableProperty: "context value from env var"
+
+ # Service Properties (Service Environment Properties)
+ ENV.SERVICE_PROPERTY.environment-properties-example.serviceProperty: "service property from env var"
+
+ # 2 stored passwords
+ ENV.PASSWORD.pets-db-password: "temp"
+ ENV.PASSWORD.gateway: "7layer"
+
+ # A JDBC Connection named 'pets-db' that uses the 'pets-db-password' created above
+ ENV.JDBC_CONNECTION.pets-db: |-
+ driverClass: "com.l7tech.jdbc.mysql.MySQLDriver"
+ jdbcUrl: "TBD"
+ properties:
+ EnableCancelTimeout: "true"
+ user: "admin"
+ passwordRef: "pets-db-password"
+ minimumPoolSize: 3
+ maximumPoolSize: 15
+
+ # A Cassandra Connection
+ ENV.CASSANDRA_CONNECTION.Test: |-
+ keyspace: Test
+ contactPoint: Test
+ port: 9045
+ username: ''
+ compression: NONE
+ ssl: false
+
+ # A certificate imported from a https URL
+ ENV.CERTIFICATE.https://www.amazon.com: |-
+ verifyHostname: false
+ trustedForSsl: false
+ trustedAsSamlAttestingEntity: false
+ trustAnchor: false
+ revocationCheckingEnabled: false
+ trustedForSigningClientCerts: false
+ trustedForSigningServerCerts: false
+ trustedAsSamlIssuer: false
+
+ # A PEM certificate with the data and its properties
+ ENV.CERTIFICATE_FILE.www.google.com.pem: |-
+ -----BEGIN CERTIFICATE-----
+ MIIDxzCCAq+gAwIBAgIII8pR0+i7kWEwDQYJKoZIhvcNAQELBQAwVDELMAkGA1UE
+ BhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczElMCMGA1UEAxMc
+ R29vZ2xlIEludGVybmV0IEF1dGhvcml0eSBHMzAeFw0xODA4MjgxODIzMDBaFw0x
+ ODExMjAxODIzMDBaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlh
+ MRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKDApHb29nbGUgTExDMRcw
+ FQYDVQQDDA53d3cuZ29vZ2xlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
+ BG69h/q0VI62C64qtA5497K+HJF6CcMSMDglj0ko5SpdM38ozhtLT4DdnNgbS5V9
+ xfZ1A6EOf0N96VFSJG950aSjggFSMIIBTjATBgNVHSUEDDAKBggrBgEFBQcDATAO
+ BgNVHQ8BAf8EBAMCB4AwGQYDVR0RBBIwEIIOd3d3Lmdvb2dsZS5jb20waAYIKwYB
+ BQUHAQEEXDBaMC0GCCsGAQUFBzAChiFodHRwOi8vcGtpLmdvb2cvZ3NyMi9HVFNH
+ SUFHMy5jcnQwKQYIKwYBBQUHMAGGHWh0dHA6Ly9vY3NwLnBraS5nb29nL0dUU0dJ
+ QUczMB0GA1UdDgQWBBSh8zGNXn++GBb0M220OTqTpwIw0TAMBgNVHRMBAf8EAjAA
+ MB8GA1UdIwQYMBaAFHfCuFCaZ3Z2sS3ChtCDoH6mfrpLMCEGA1UdIAQaMBgwDAYK
+ KwYBBAHWeQIFAzAIBgZngQwBAgIwMQYDVR0fBCowKDAmoCSgIoYgaHR0cDovL2Ny
+ bC5wa2kuZ29vZy9HVFNHSUFHMy5jcmwwDQYJKoZIhvcNAQELBQADggEBAIqwHvex
+ +0f6LtZPaQhD+y/swPde4Lf05qsUH2gckipagPu5MivTFYM7vbtTYWBzjcdIH4vX
+ UU/bw8IKdq0tAp6rWNlk008H1LBamTsOz/fzWTkel3VkKSmRk5OESbPcGAGszzjt
+ yxhB2vS92C0hKlh7+RrjZtJ1QSmtLhGqhwO75GfQCzp/Yd0UEdWCqg53YcWqtx3+
+ cZ612nBT8IkWeELQi9yEfO6RyR5Lki8ccsVQTsP19y9F35XFFNJbZsQs+OhmN5Kz
+ n9oJbLJa81eS7Pr0HVdgSMLTSUARwBSG6uHL/RedS3m5dnIQUN4PpAaV6cejT+25
+ 7wBm1tvqBWx7JjE=
+ -----END CERTIFICATE-----
+ ENV.CERTIFICATE.www.google.com: |-
+ verifyHostname: false
+ trustedForSsl: false
+ trustedAsSamlAttestingEntity: false
+ trustAnchor: false
+ revocationCheckingEnabled: false
+ trustedForSigningClientCerts: false
+ trustedForSigningServerCerts: false
+ trustedAsSamlIssuer: false
+
+ # A LDAP configuration
+ ENV.IDENTITY_PROVIDER.LdapServer: |-
+ type: BIND_ONLY_LDAP
+ properties: {}
+ identityProviderDetail:
+ serverUrls:
+ - ldaps://ldapserver:636
+ useSslClientAuthentication: true
+ bindPatternPrefix: ''
+ bindPatternSuffix: ''
+
+ # A Listen Port Configuration redirecting to a specific service
+ ENV.LISTEN_PORT.DBServicePort: |-
+ protocol: HTTPS
+ port: 32323
+ enabledFeatures:
+ - Published service message input
+ targetServiceReference: routings/db-service
+ tlsSettings:
+ clientAuthentication: NONE
+ enabledVersions:
+ - TLSv1
+ - TLSv1.2
+ - TLSv1.1
+ enabledCipherSuites:
+ - TLS_RSA_WITH_AES_256_CBC_SHA256
+ - TLS_RSA_WITH_AES_256_GCM_SHA384
+ - TLS_RSA_WITH_AES_256_CBC_SHA
+ properties:
+ usesTLS: true
+
+ # A Listen port generating a FTP Service
+ ENV.LISTEN_PORT.FTP: |-
+ protocol: "FTP"
+ port: 55555
+ enabledFeatures:
+ - "Published service message input"
+ properties:
+ portRangeCount: "100"
+ portRangeStart: "55556"
+ useExtendedFtpCommandSet: "false"
+
secrets:
license:
- file: ./docker/license.xml
\ No newline at end of file
+ file: ./docker/license.xml
+ # This is required to build the merged p12 file for the privatekeys
+ privateKeys:
+ file: ./lib/privateKeys
\ No newline at end of file
diff --git a/encass-annotations/build.gradle b/encass-annotations/build.gradle
new file mode 100644
index 0000000..db06207
--- /dev/null
+++ b/encass-annotations/build.gradle
@@ -0,0 +1,23 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "encassExample"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
diff --git a/encass-annotations/settings.gradle b/encass-annotations/settings.gradle
new file mode 100644
index 0000000..549abd6
--- /dev/null
+++ b/encass-annotations/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'encass-annotations'
\ No newline at end of file
diff --git a/encass-annotations/src/main/gateway/config/encass.yml b/encass-annotations/src/main/gateway/config/encass.yml
new file mode 100644
index 0000000..bc03fdf
--- /dev/null
+++ b/encass-annotations/src/main/gateway/config/encass.yml
@@ -0,0 +1,35 @@
+find-internal-users:
+ annotations:
+ - "@bundle"
+ - type: "@bundle-hints"
+ name: "encass-annotations"
+ policy: "encass/find-internal-users"
+ arguments:
+ - type: "string"
+ name: "encass_in_param1"
+ requireExplicit: true
+ label: "label_encass_in_param1"
+ results:
+ - name: "encass_out_param1"
+ type: "string"
+ properties:
+ paletteFolder: "internalAssertions"
+ allowTracing: "false"
+ description: "find internal users"
+ passMetricsToParent: "false"
+hello-world:
+ annotations:
+ - "@bundle"
+ policy: "encass/hello-world"
+ arguments:
+ - name: "encass_in_param1"
+ type: "string"
+ requireExplicit: true
+ results:
+ - name: "encass_out_param1"
+ type: "string"
+ properties:
+ paletteFolder: "internalAssertions"
+ allowTracing: "false"
+ description: "hello world encass"
+ passMetricsToParent: "false"
\ No newline at end of file
diff --git a/encass-annotations/src/main/gateway/config/jdbc-connections.yml b/encass-annotations/src/main/gateway/config/jdbc-connections.yml
new file mode 100644
index 0000000..d62ada7
--- /dev/null
+++ b/encass-annotations/src/main/gateway/config/jdbc-connections.yml
@@ -0,0 +1,18 @@
+internal-users-connection:
+ driverClass: "com.l7tech.jdbc.mysql.MySQLDriver"
+ jdbcUrl: "jdbc:l7tech:mysql://localhost:3306"
+ properties:
+ EnableCancelTimeout: "true"
+ user: "gateway"
+ passwordRef: "internal-users-password"
+ minimumPoolSize: 3
+ maximumPoolSize: 15
+internal-users-connection2:
+ driverClass: "com.l7tech.jdbc.mysql.MySQLDriver"
+ jdbcUrl: "jdbc:l7tech:mysql://localhost:3305"
+ properties:
+ EnableCancelTimeout: "true"
+ user: "gateway"
+ passwordRef: "internal-users-password"
+ minimumPoolSize: 3
+ maximumPoolSize: 15
diff --git a/encass-annotations/src/main/gateway/config/policies.yml b/encass-annotations/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..2d64729
--- /dev/null
+++ b/encass-annotations/src/main/gateway/config/policies.yml
@@ -0,0 +1,12 @@
+encass/find-internal-users:
+ type: "Include"
+ tag:
+ subtag:
+ usedEntities:
+ - type: "JDBC_CONNECTION"
+ name: "internal-users-connection"
+ - type: "SECURE_PASSWORD"
+ name: "internal-users-password"
+encass/hello-world:
+ type: "Include"
+ tag:
\ No newline at end of file
diff --git a/encass-annotations/src/main/gateway/config/stored-passwords.properties b/encass-annotations/src/main/gateway/config/stored-passwords.properties
new file mode 100644
index 0000000..dc87627
--- /dev/null
+++ b/encass-annotations/src/main/gateway/config/stored-passwords.properties
@@ -0,0 +1 @@
+internal-users-password=7layer
diff --git a/encass-annotations/src/main/gateway/policy/encass/find-internal-users.xml b/encass-annotations/src/main/gateway/policy/encass/find-internal-users.xml
new file mode 100644
index 0000000..064ec7a
--- /dev/null
+++ b/encass-annotations/src/main/gateway/policy/encass/find-internal-users.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/encass-annotations/src/main/gateway/policy/encass/hello-world.xml b/encass-annotations/src/main/gateway/policy/encass/hello-world.xml
new file mode 100644
index 0000000..75f16f0
--- /dev/null
+++ b/encass-annotations/src/main/gateway/policy/encass/hello-world.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/global/build.gradle b/global/build.gradle
new file mode 100644
index 0000000..f3d93eb
--- /dev/null
+++ b/global/build.gradle
@@ -0,0 +1,9 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/global-policies'
+}
\ No newline at end of file
diff --git a/global/settings.gradle b/global/settings.gradle
new file mode 100644
index 0000000..0278c52
--- /dev/null
+++ b/global/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'global'
\ No newline at end of file
diff --git a/global/src/main/gateway/config/global-policies.yml b/global/src/main/gateway/config/global-policies.yml
new file mode 100644
index 0000000..8d4d176
--- /dev/null
+++ b/global/src/main/gateway/config/global-policies.yml
@@ -0,0 +1,6 @@
+global-completed-policy:
+ path: "global-policies/global-completed-policy"
+ tag: "message-completed"
+global-received-policy:
+ path: "global-policies/global-received-policy"
+ tag: "message-received"
diff --git a/global/src/main/gateway/policy/global-policies/global-completed-policy.xml b/global/src/main/gateway/policy/global-policies/global-completed-policy.xml
new file mode 100644
index 0000000..af85bf0
--- /dev/null
+++ b/global/src/main/gateway/policy/global-policies/global-completed-policy.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/global/src/main/gateway/policy/global-policies/global-received-policy.xml b/global/src/main/gateway/policy/global-policies/global-received-policy.xml
new file mode 100644
index 0000000..bdd742a
--- /dev/null
+++ b/global/src/main/gateway/policy/global-policies/global-received-policy.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 16d2805..9ecac78 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Fri May 24 12:31:11 PDT 2019
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew.bat b/gradlew.bat
index e95643d..f955316 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,84 +1,84 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/http2client-example/build.gradle b/http2client-example/build.gradle
new file mode 100644
index 0000000..418a1b3
--- /dev/null
+++ b/http2client-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "http2client"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="http2clientExample"
+ map=[
+ "GENERIC": file("./src/main/gateway/config/generic-entities.yml")
+ ]
+}
diff --git a/http2client-example/settings.gradle b/http2client-example/settings.gradle
new file mode 100644
index 0000000..295b952
--- /dev/null
+++ b/http2client-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'http2client-example'
\ No newline at end of file
diff --git a/http2client-example/src/main/gateway/config/generic-entities.yml b/http2client-example/src/main/gateway/config/generic-entities.yml
new file mode 100644
index 0000000..27d3468
--- /dev/null
+++ b/http2client-example/src/main/gateway/config/generic-entities.yml
@@ -0,0 +1,21 @@
+http2TestClient:
+ description: ""
+ entityClassName: "com.l7tech.external.assertions.http2.routing.model.Http2ClientConfigurationEntity"
+ valueXml: |
+
+
+
+
+ annotations:
+ - type: "@bundle-hints"
+ id: "425cdbc538217411656ef4481f0da28c"
diff --git a/http2client-example/src/main/gateway/config/policies.yml b/http2client-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..51d2d0f
--- /dev/null
+++ b/http2client-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,11 @@
+http2client-folder/http2client-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: false
+ usedEntities:
+ - type: "SSG_KEY_ENTRY"
+ name: "apim_autotest_ssl"
+ - type: "GENERIC"
+ name: "http2TestClient"
+ annotations:
diff --git a/http2client-example/src/main/gateway/config/private-keys.yml b/http2client-example/src/main/gateway/config/private-keys.yml
new file mode 100644
index 0000000..aeb870a
--- /dev/null
+++ b/http2client-example/src/main/gateway/config/private-keys.yml
@@ -0,0 +1,3 @@
+apim_autotest_ssl:
+ keystore: "Software DB"
+ algorithm: "RSA"
diff --git a/http2client-example/src/main/gateway/config/services.yml b/http2client-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..4a24f5b
--- /dev/null
+++ b/http2client-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+http2client-folder/http2client-service:
+ url: "/http2"
+ policy: "http2client-folder/http2client-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/http2client-example/src/main/gateway/policy/http2client-folder/http2client-policy.xml b/http2client-example/src/main/gateway/policy/http2client-folder/http2client-policy.xml
new file mode 100644
index 0000000..76910e6
--- /dev/null
+++ b/http2client-example/src/main/gateway/policy/http2client-folder/http2client-policy.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/idprovider-example/build.gradle b/idprovider-example/build.gradle
new file mode 100644
index 0000000..ef80a3d
--- /dev/null
+++ b/idprovider-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "idprovider"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="idproviderExample"
+ map=[
+ "IDENTITY_PROVIDER": file("./src/main/gateway/config/identity-providers.yml")
+ ]
+}
diff --git a/idprovider-example/settings.gradle b/idprovider-example/settings.gradle
new file mode 100644
index 0000000..aa312e4
--- /dev/null
+++ b/idprovider-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'idprovider-example'
\ No newline at end of file
diff --git a/idprovider-example/src/main/gateway/config/identity-providers.yml b/idprovider-example/src/main/gateway/config/identity-providers.yml
new file mode 100644
index 0000000..fdfdc6d
--- /dev/null
+++ b/idprovider-example/src/main/gateway/config/identity-providers.yml
@@ -0,0 +1,8 @@
+Test Identity Provider:
+ type: "FEDERATED"
+ properties:
+ enableCredentialType.saml: false
+ enableCredentialType.x509: true
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e2220e5"
diff --git a/idprovider-example/src/main/gateway/config/policies.yml b/idprovider-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..dc6e645
--- /dev/null
+++ b/idprovider-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+idprovider-folder/idprovider-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: false
+ usedEntities:
+ - type: "ID_PROVIDER_CONFIG"
+ name: "Test Identity Provider"
+ annotations:
diff --git a/idprovider-example/src/main/gateway/config/services.yml b/idprovider-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..aa11074
--- /dev/null
+++ b/idprovider-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+idprovider-folder/idprovider-service:
+ url: "/idprovider"
+ policy: "idprovider-folder/idprovider-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/idprovider-example/src/main/gateway/policy/idprovider-folder/idprovider-policy.xml b/idprovider-example/src/main/gateway/policy/idprovider-folder/idprovider-policy.xml
new file mode 100644
index 0000000..54d12f5
--- /dev/null
+++ b/idprovider-example/src/main/gateway/policy/idprovider-folder/idprovider-policy.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/jdbcconnection-example/build.gradle b/jdbcconnection-example/build.gradle
new file mode 100644
index 0000000..a58728f
--- /dev/null
+++ b/jdbcconnection-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "jdbcconnection"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="jdbcExample"
+ map=[
+ "JDBC_CONNECTION": file("./src/main/gateway/config/jdbc-connections.yml")
+ ]
+}
diff --git a/jdbcconnection-example/settings.gradle b/jdbcconnection-example/settings.gradle
new file mode 100644
index 0000000..ca8574c
--- /dev/null
+++ b/jdbcconnection-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'jdbcconnection-example'
\ No newline at end of file
diff --git a/jdbcconnection-example/src/main/gateway/config/jdbc-connections.yml b/jdbcconnection-example/src/main/gateway/config/jdbc-connections.yml
new file mode 100644
index 0000000..cd1f73c
--- /dev/null
+++ b/jdbcconnection-example/src/main/gateway/config/jdbc-connections.yml
@@ -0,0 +1,11 @@
+mysql:
+ driverClass: "com.mysql.jdbc.Driver"
+ jdbcUrl: "jdbc:l7tech:mysql://localhost:3306"
+ properties:
+ EnableCancelTimeout: "true"
+ user: "root"
+ minimumPoolSize: 3
+ maximumPoolSize: 15
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e22205c"
diff --git a/jdbcconnection-example/src/main/gateway/config/policies.yml b/jdbcconnection-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..0d76cfe
--- /dev/null
+++ b/jdbcconnection-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+jdbcconnection-folder/jdbcconnection-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "JDBC_CONNECTION"
+ name: "mysql"
+ annotations:
diff --git a/jdbcconnection-example/src/main/gateway/config/services.yml b/jdbcconnection-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..2ad99c1
--- /dev/null
+++ b/jdbcconnection-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+jdbcconnection-folder/jdbcconnection-service:
+ url: "/jdbc"
+ policy: "jdbcconnection-folder/jdbcconnection-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/jdbcconnection-example/src/main/gateway/policy/jdbcconnection-folder/jdbcconnection-policy.xml b/jdbcconnection-example/src/main/gateway/policy/jdbcconnection-folder/jdbcconnection-policy.xml
new file mode 100644
index 0000000..fd0d3fb
--- /dev/null
+++ b/jdbcconnection-example/src/main/gateway/policy/jdbcconnection-folder/jdbcconnection-policy.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jms-example/build.gradle b/jms-example/build.gradle
new file mode 100644
index 0000000..de0a00d
--- /dev/null
+++ b/jms-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "jmsconnection"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="jmsExample"
+ map=[
+ "JMS_DESTINATION": file("./src/main/gateway/config/jms-destinations.yml")
+ ]
+}
\ No newline at end of file
diff --git a/jms-example/settings.gradle b/jms-example/settings.gradle
new file mode 100644
index 0000000..64d6728
--- /dev/null
+++ b/jms-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'jms-example'
\ No newline at end of file
diff --git a/jms-example/src/main/gateway/config/jms-destinations.yml b/jms-example/src/main/gateway/config/jms-destinations.yml
new file mode 100644
index 0000000..b3cf111
--- /dev/null
+++ b/jms-example/src/main/gateway/config/jms-destinations.yml
@@ -0,0 +1,15 @@
+jmsDestination:
+ initialContextFactoryClassName: "testClass"
+ jndiUrl: "jndi:test"
+ destinationType: "QUEUE"
+ connectionFactoryName: "queue factory"
+ destinationName: "test"
+ outboundDetail:
+ replyType: "AUTOMATIC"
+ useRequestCorrelationId: false
+ messageFormat: "AUTOMATIC"
+ poolingType: "SESSION"
+ template: false
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e22218c"
diff --git a/jms-example/src/main/gateway/config/policies.yml b/jms-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..b0d95a5
--- /dev/null
+++ b/jms-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+jms-folder/jms-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "JMS_ENDPOINT"
+ name: "jmsDestination"
+ annotations:
diff --git a/jms-example/src/main/gateway/config/services.yml b/jms-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..44e7506
--- /dev/null
+++ b/jms-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+jms-folder/jms-service:
+ url: "/jms"
+ policy: "jms-folder/jms-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/jms-example/src/main/gateway/policy/jms-folder/jms-policy.xml b/jms-example/src/main/gateway/policy/jms-folder/jms-policy.xml
new file mode 100644
index 0000000..21f44ac
--- /dev/null
+++ b/jms-example/src/main/gateway/policy/jms-folder/jms-policy.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/DelayAssertion-sdk80-1.1-729.jar b/lib/DelayAssertion-sdk80-1.1-729.jar
new file mode 100755
index 0000000..47b6e65
Binary files /dev/null and b/lib/DelayAssertion-sdk80-1.1-729.jar differ
diff --git a/lib/privateKeys/test.p12 b/lib/privateKeys/test.p12
new file mode 100644
index 0000000..f983365
Binary files /dev/null and b/lib/privateKeys/test.p12 differ
diff --git a/mqnative-example/build.gradle b/mqnative-example/build.gradle
new file mode 100644
index 0000000..e82c4d9
--- /dev/null
+++ b/mqnative-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "mqnative"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="mqnativeExample"
+ map=[
+ "SSG_ACTIVE_CONNECTOR": file("./src/main/gateway/config/active-connectors.yml")
+ ]
+}
\ No newline at end of file
diff --git a/mqnative-example/settings.gradle b/mqnative-example/settings.gradle
new file mode 100644
index 0000000..75cc4e7
--- /dev/null
+++ b/mqnative-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'mqnative-example'
\ No newline at end of file
diff --git a/mqnative-example/src/main/gateway/config/active-connectors.yml b/mqnative-example/src/main/gateway/config/active-connectors.yml
new file mode 100644
index 0000000..3fc65da
--- /dev/null
+++ b/mqnative-example/src/main/gateway/config/active-connectors.yml
@@ -0,0 +1,22 @@
+mqnativeTestConn:
+ connectorType: "MqNative"
+ properties:
+ inbound: "false"
+ MqNativePort: "9878"
+ MqNativeHostName: "localhost"
+ MqNativeChannel: "SYSTEM.DEF.SVRCONN"
+ MqNativeOutboundIsTemplateQueue: "false"
+ MqNativeTargetQueueName: "testQueue"
+ MqNativeInboundIsOpenOptionsUsed: "false"
+ MqNativeIsQueueCredentialRequired: "false"
+ MqNativeInboundIsReplyQueuePutMessageOptionsUsed: "false"
+ MqNativeQueueManagerName: "testManager"
+ MqNativeInboundIsGetMessageOptionsUsed: "false"
+ MqNativeOutboundIsReplyQueueGetMessageOptionsUsed: "false"
+ MqNativeIsSslEnabled: "false"
+ MqNativeOutboundMessageFormat: "AUTOMATIC"
+ MqNativeInboundIsFailedQueuePutMessageOptionsUsed: "false"
+ MqNativeReplyType: "REPLY_NONE"
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e22225b"
diff --git a/mqnative-example/src/main/gateway/config/policies.yml b/mqnative-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..008b70d
--- /dev/null
+++ b/mqnative-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+mqnative-folder/mqnative-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "SSG_ACTIVE_CONNECTOR"
+ name: "mqnativeTestConn"
+ annotations:
diff --git a/mqnative-example/src/main/gateway/config/services.yml b/mqnative-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..a51c369
--- /dev/null
+++ b/mqnative-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+mqnative-folder/mqnative-service:
+ url: "/mqnative"
+ policy: "mqnative-folder/mqnative-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/mqnative-example/src/main/gateway/policy/mqnative-folder/mqnative-policy.xml b/mqnative-example/src/main/gateway/policy/mqnative-folder/mqnative-policy.xml
new file mode 100644
index 0000000..5c48b8d
--- /dev/null
+++ b/mqnative-example/src/main/gateway/policy/mqnative-folder/mqnative-policy.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/password-example/build.gradle b/password-example/build.gradle
new file mode 100644
index 0000000..da46b78
--- /dev/null
+++ b/password-example/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "storedpassword"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="passwordExample"
+ map=[
+ "PASSWORD.jdbc_con_pass": file("./src/main/gateway/config/stored-passwords.properties")
+ ]
+}
\ No newline at end of file
diff --git a/password-example/settings.gradle b/password-example/settings.gradle
new file mode 100644
index 0000000..85dd370
--- /dev/null
+++ b/password-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'password-example'
\ No newline at end of file
diff --git a/password-example/src/main/gateway/config/jdbc-connections.yml b/password-example/src/main/gateway/config/jdbc-connections.yml
new file mode 100644
index 0000000..fe3ab8b
--- /dev/null
+++ b/password-example/src/main/gateway/config/jdbc-connections.yml
@@ -0,0 +1,12 @@
+mysqlWithCredentials:
+ driverClass: "com.mysql.jdbc.Driver"
+ jdbcUrl: "jdbc:l7tech:mysql://localhost:3306"
+ properties:
+ EnableCancelTimeout: "true"
+ user: "root"
+ passwordRef: "jdbc_con_pass"
+ minimumPoolSize: 3
+ maximumPoolSize: 15
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e2223b0"
diff --git a/password-example/src/main/gateway/config/policies.yml b/password-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..c9441e4
--- /dev/null
+++ b/password-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,11 @@
+password-folder/password-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "JDBC_CONNECTION"
+ name: "mysqlWithCredentials"
+ - type: "SECURE_PASSWORD"
+ name: "jdbc_con_pass"
+ annotations:
diff --git a/password-example/src/main/gateway/config/services.yml b/password-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..e178ddd
--- /dev/null
+++ b/password-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+password-folder/password-service:
+ url: "/password"
+ policy: "password-folder/password-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/password-example/src/main/gateway/config/stored-passwords.properties b/password-example/src/main/gateway/config/stored-passwords.properties
new file mode 100644
index 0000000..bff70e9
--- /dev/null
+++ b/password-example/src/main/gateway/config/stored-passwords.properties
@@ -0,0 +1 @@
+jdbc_con_pass=password
diff --git a/password-example/src/main/gateway/policy/password-folder/password-policy.xml b/password-example/src/main/gateway/policy/password-folder/password-policy.xml
new file mode 100644
index 0000000..2e95727
--- /dev/null
+++ b/password-example/src/main/gateway/policy/password-folder/password-policy.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/privatekey-example/build.gradle b/privatekey-example/build.gradle
new file mode 100644
index 0000000..4aabd1f
--- /dev/null
+++ b/privatekey-example/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "privatekey"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+
+EnvironmentConfig{
+ name="privateKeyExample"
+ map=[
+ "PRIVATE_KEY.test": file("./src/main/gateway/config/private-keys.yml"),
+ "PRIVATE_KEY_FILE.test.p12": file("./src/main/gateway/config/privateKeys/test.p12")
+ ]
+}
diff --git a/privatekey-example/settings.gradle b/privatekey-example/settings.gradle
new file mode 100644
index 0000000..fdc5dcd
--- /dev/null
+++ b/privatekey-example/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'privatekey-example'
\ No newline at end of file
diff --git a/privatekey-example/src/main/gateway/config/policies.yml b/privatekey-example/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..1eec25f
--- /dev/null
+++ b/privatekey-example/src/main/gateway/config/policies.yml
@@ -0,0 +1,9 @@
+privatekey-folder/privatekey-policy:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "SSG_KEY_ENTRY"
+ name: "test"
+ annotations:
diff --git a/privatekey-example/src/main/gateway/config/private-keys.yml b/privatekey-example/src/main/gateway/config/private-keys.yml
new file mode 100644
index 0000000..96b927f
--- /dev/null
+++ b/privatekey-example/src/main/gateway/config/private-keys.yml
@@ -0,0 +1,4 @@
+test:
+ keystore: "Software DB"
+ algorithm: "RSA"
+ keyPassword: "7layer"
\ No newline at end of file
diff --git a/privatekey-example/src/main/gateway/config/privateKeys/test.p12 b/privatekey-example/src/main/gateway/config/privateKeys/test.p12
new file mode 100644
index 0000000..01aabc1
Binary files /dev/null and b/privatekey-example/src/main/gateway/config/privateKeys/test.p12 differ
diff --git a/privatekey-example/src/main/gateway/config/services.yml b/privatekey-example/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..5de8375
--- /dev/null
+++ b/privatekey-example/src/main/gateway/config/services.yml
@@ -0,0 +1,10 @@
+privatekey-folder/privatekey-service:
+ url: "/privatekey"
+ policy: "privatekey-folder/privatekey-policy"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/privatekey-example/src/main/gateway/policy/privatekey-folder/privatekey-policy.xml b/privatekey-example/src/main/gateway/policy/privatekey-folder/privatekey-policy.xml
new file mode 100644
index 0000000..5d88c57
--- /dev/null
+++ b/privatekey-example/src/main/gateway/policy/privatekey-folder/privatekey-policy.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routings/build.gradle b/routings/build.gradle
new file mode 100644
index 0000000..e8798c3
--- /dev/null
+++ b/routings/build.gradle
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/routings'
+}
+
+dependencies {
+ bundle project(':common-services')
+}
\ No newline at end of file
diff --git a/routings/settings.gradle b/routings/settings.gradle
new file mode 100644
index 0000000..466d900
--- /dev/null
+++ b/routings/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'routings'
\ No newline at end of file
diff --git a/routings/src/main/gateway/config/services.yml b/routings/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..ec34016
--- /dev/null
+++ b/routings/src/main/gateway/config/services.yml
@@ -0,0 +1,95 @@
+routings/routing-assertion-example:
+ url: "/routingExample"
+ policy: "routings/routing-assertion-example"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+routings/my-gateway-api:
+ url: "/example"
+ policy: "routings/my-gateway-api"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+routings/soap/PlayerStatsService:
+ policy: "routings/soap/PlayerStatsService"
+ httpMethods:
+ - "POST"
+ properties: {}
+ soapResources:
+ - rootUrl: "http://apim-hugh.lvn.broadcom.net:8081/axis/services/PlayerStats?wsdl"
+ type: "wsdl"
+ soapVersion: "1.1"
+ wssProcessingEnabled: true
+ wsdlRootUrl: "http://apim-hugh.lvn.broadcom.net:8081/axis/services/PlayerStats?wsdl"
+routings/soap/Calculator:
+ url: "/calculatorSoap"
+ policy: "routings/soap/Calculator"
+ httpMethods:
+ - "POST"
+ - "GET"
+ properties: {}
+ soapResources:
+ - rootUrl: "http://www.dneonline.com/calculator.asmx?wsdl"
+ type: "wsdl"
+ soapVersion: "unspecified"
+ wssProcessingEnabled: true
+ wsdlRootUrl: "http://www.dneonline.com/calculator.asmx?wsdl"
+routings/ftp-service:
+ url: "/ftp-service"
+ policy: "routings/ftp-service"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+routings/another-service:
+ url: "/another-service-example"
+ policy: "routings/another-service"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+routings/environment-properties-example:
+ url: "/propertiesService"
+ policy: "routings/environment-properties-example"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties:
+ ENV.serviceProperty:
+ wssProcessingEnabled: false
+routings/db-service:
+ url: "/db-service"
+ policy: "routings/db-service"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+routings/cassandra-service:
+ url: "/cassandra-service"
+ policy: "routings/cassandra-service"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
diff --git a/src/main/gateway/policy/gateway-solution/another-service.xml b/routings/src/main/gateway/policy/routings/another-service.xml
similarity index 70%
rename from src/main/gateway/policy/gateway-solution/another-service.xml
rename to routings/src/main/gateway/policy/routings/another-service.xml
index 96b18b9..d178b18 100644
--- a/src/main/gateway/policy/gateway-solution/another-service.xml
+++ b/routings/src/main/gateway/policy/routings/another-service.xml
@@ -1,16 +1,14 @@
-
-
-
+}]]>
-
+
diff --git a/routings/src/main/gateway/policy/routings/cassandra-service.xml b/routings/src/main/gateway/policy/routings/cassandra-service.xml
new file mode 100644
index 0000000..1be4971
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/cassandra-service.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routings/src/main/gateway/policy/routings/db-service.xml b/routings/src/main/gateway/policy/routings/db-service.xml
new file mode 100644
index 0000000..41f3944
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/db-service.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routings/src/main/gateway/policy/routings/environment-properties-example.xml b/routings/src/main/gateway/policy/routings/environment-properties-example.xml
new file mode 100644
index 0000000..84364f3
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/environment-properties-example.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+${service.ENV.serviceProperty}
+
+${test}]]>
+
+
+
+
diff --git a/routings/src/main/gateway/policy/routings/ftp-service.xml b/routings/src/main/gateway/policy/routings/ftp-service.xml
new file mode 100644
index 0000000..06cef16
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/ftp-service.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/gateway/policy/gateway-solution/my-gateway-api.xml b/routings/src/main/gateway/policy/routings/my-gateway-api.xml
similarity index 75%
rename from src/main/gateway/policy/gateway-solution/my-gateway-api.xml
rename to routings/src/main/gateway/policy/routings/my-gateway-api.xml
index 303ad68..6d950e4 100644
--- a/src/main/gateway/policy/gateway-solution/my-gateway-api.xml
+++ b/routings/src/main/gateway/policy/routings/my-gateway-api.xml
@@ -1,18 +1,16 @@
-
-
-
+}]]>
-
+
diff --git a/routings/src/main/gateway/policy/routings/routing-assertion-example.xml b/routings/src/main/gateway/policy/routings/routing-assertion-example.xml
new file mode 100644
index 0000000..75b49c6
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/routing-assertion-example.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routings/src/main/gateway/policy/routings/soap/Calculator.xml b/routings/src/main/gateway/policy/routings/soap/Calculator.xml
new file mode 100644
index 0000000..6bc4d6c
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/soap/Calculator.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routings/src/main/gateway/policy/routings/soap/PlayerStatsService.xml b/routings/src/main/gateway/policy/routings/soap/PlayerStatsService.xml
new file mode 100644
index 0000000..05bc98f
--- /dev/null
+++ b/routings/src/main/gateway/policy/routings/soap/PlayerStatsService.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/gateway/policy/gateway-solution/sub-folder/policyInFolder.xml b/routings/src/main/gateway/policy/routings/sub-folder/policyInFolder.xml
similarity index 96%
rename from src/main/gateway/policy/gateway-solution/sub-folder/policyInFolder.xml
rename to routings/src/main/gateway/policy/routings/sub-folder/policyInFolder.xml
index 9b60f61..2abf033 100644
--- a/src/main/gateway/policy/gateway-solution/sub-folder/policyInFolder.xml
+++ b/routings/src/main/gateway/policy/routings/sub-folder/policyInFolder.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/routings/src/main/gateway/soapResources/routings/soap/Calculator/calculator.asmx?wsdl.wsdl b/routings/src/main/gateway/soapResources/routings/soap/Calculator/calculator.asmx?wsdl.wsdl
new file mode 100644
index 0000000..5425063
--- /dev/null
+++ b/routings/src/main/gateway/soapResources/routings/soap/Calculator/calculator.asmx?wsdl.wsdl
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Adds two integers. This is a test WebService. ©DNE Online
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/routings/src/main/gateway/soapResources/routings/soap/PlayerStatsService/PlayerStats?wsdl.wsdl b/routings/src/main/gateway/soapResources/routings/soap/PlayerStatsService/PlayerStats?wsdl.wsdl
new file mode 100644
index 0000000..78c91c6
--- /dev/null
+++ b/routings/src/main/gateway/soapResources/routings/soap/PlayerStatsService/PlayerStats?wsdl.wsdl
@@ -0,0 +1,437 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/service-annotations/build.gradle b/service-annotations/build.gradle
new file mode 100644
index 0000000..e803b22
--- /dev/null
+++ b/service-annotations/build.gradle
@@ -0,0 +1,29 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.ca.apim.gateway:config-builder:1.0.+"
+ classpath "com.ca.apim.gateway:environment-creator-application:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-policy-plugin:1.0.+"
+ classpath "com.ca.apim.gateway:gateway-export-plugin:1.0.+"
+ }
+}
+
+apply plugin: 'com.ca.apim.gateway.gateway-export-plugin'
+apply plugin: 'com.ca.apim.gateway.gateway-policy-plugin'
+group = "service"
+version = '1.0.0'
+repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ jcenter()
+}
+EnvironmentConfig{
+ name="CertificateExample"
+ map = ["CERTIFICATE.www.google.com":file("./src/main/gateway/config/trusted-certs.yml"),
+ "CERTIFICATE_FILE.www.google.com.pem":file("./src/main/gateway/config/certificates/www.google.com.pem")]
+}
+
diff --git a/service-annotations/settings.gradle b/service-annotations/settings.gradle
new file mode 100644
index 0000000..0aac79c
--- /dev/null
+++ b/service-annotations/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'service-annotations'
\ No newline at end of file
diff --git a/service-annotations/src/main/gateway/config/certificates/www.google.com.pem b/service-annotations/src/main/gateway/config/certificates/www.google.com.pem
new file mode 100644
index 0000000..6abfbfc
--- /dev/null
+++ b/service-annotations/src/main/gateway/config/certificates/www.google.com.pem
@@ -0,0 +1,28 @@
+-----BEGIN CERTIFICATE-----
+MIIExTCCA62gAwIBAgIQarjYTUDInIQIAAAAAE2feDANBgkqhkiG9w0BAQsFADBC
+MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZpY2VzMRMw
+EQYDVQQDEwpHVFMgQ0EgMU8xMB4XDTIwMDcxNTA4MzQzM1oXDTIwMTAwNzA4MzQz
+M1owaDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcT
+DU1vdW50YWluIFZpZXcxEzARBgNVBAoTCkdvb2dsZSBMTEMxFzAVBgNVBAMTDnd3
+dy5nb29nbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQ6BXicX5hh0h
+ciwNyRv8cr6cBZW5eXEjGPV+Qn3ioEftJVDjpu+MKEQuDjsNDyrUGACN2FEAN1OH
+32g0Ker5BKOCAlowggJWMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEF
+BQcDATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBT0/Cy/1qcEW1qw6Jt+uSat8YBR
+KzAfBgNVHSMEGDAWgBSY0fhuEOvPm+xgnxiQG6DrfQn9KzBoBggrBgEFBQcBAQRc
+MFowKwYIKwYBBQUHMAGGH2h0dHA6Ly9vY3NwLnBraS5nb29nL2d0czFvMWNvcmUw
+KwYIKwYBBQUHMAKGH2h0dHA6Ly9wa2kuZ29vZy9nc3IyL0dUUzFPMS5jcnQwGQYD
+VR0RBBIwEIIOd3d3Lmdvb2dsZS5jb20wIQYDVR0gBBowGDAIBgZngQwBAgIwDAYK
+KwYBBAHWeQIFAzAzBgNVHR8ELDAqMCigJqAkhiJodHRwOi8vY3JsLnBraS5nb29n
+L0dUUzFPMWNvcmUuY3JsMIIBAgYKKwYBBAHWeQIEAgSB8wSB8ADuAHUAXqdz+d9W
+wOe1Nkh90EngMnqRmgyEoRIShBh1loFxRVgAAAFzUdNg3gAABAMARjBEAiBOPCLR
+1inLMJxZO8sRZ6WfmeSSyzIxzzBnO7wFQme6FwIgZBs+IFRdMwJSfC3eEY6Zj5rV
+zFzAlihKar53jBVWA94AdQCyHgXMi6LNiiBOh2b5K7mKJSBna9r6cOeySVMt74uQ
+XgAAAXNR02D8AAAEAwBGMEQCIEtHrMfMxJ3DMY3AcyAFVm+i1zKIgFgD0sItLctt
+5fcPAiA0C1sa+UnBJJ0nvg8nPMP7YeLI/K7cUBV4Pvnbg5lGvTANBgkqhkiG9w0B
+AQsFAAOCAQEAdljwe0n/r/qZINY5p1TRy6CWOVJJz6HiB/YYk85Nnp9qEaC2x1lh
+jjlCH/8hMLG4cSGa0Oyq6oQxSEh4tvvvpunisl0l2i/bTSFw4X+fuGXnXo790T5F
+8jntiPJdip45alRnXHwplKwT3GP/5mbzcl4d6cHtR2eBSB9hKjsTWaMac6bcGv/I
+zDjphn/W30u+3i0FLhzIbj/8VwOTcVo/5TmeI2g7a56brqZTAN3t5gM9sRT5p2Z2
+b1clHL3NVAopsKXRb68TqUxdGAldefp58381GDxSNk5ElqNUpK6sDEwSu2IaUNiZ
+rrp0xgyHUUTGbifRM3ej24y3wg/o2JbvxQ==
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/service-annotations/src/main/gateway/config/policies.yml b/service-annotations/src/main/gateway/config/policies.yml
new file mode 100644
index 0000000..f10d2be
--- /dev/null
+++ b/service-annotations/src/main/gateway/config/policies.yml
@@ -0,0 +1,11 @@
+certificate/Certificate Example:
+ type:
+ tag:
+ subtag:
+ hasRouting: true
+ usedEntities:
+ - type: "SSG_KEY_ENTRY"
+ name: "SSL"
+ - type: "TRUSTED_CERT"
+ name: "www.google.com"
+ annotations:
diff --git a/service-annotations/src/main/gateway/config/services.yml b/service-annotations/src/main/gateway/config/services.yml
new file mode 100644
index 0000000..3474204
--- /dev/null
+++ b/service-annotations/src/main/gateway/config/services.yml
@@ -0,0 +1,14 @@
+certificate/Certificate Example:
+ url: "/cert_demo"
+ policy: "certificate/Certificate Example"
+ httpMethods:
+ - "DELETE"
+ - "POST"
+ - "GET"
+ - "PUT"
+ properties: {}
+ wssProcessingEnabled: false
+ annotations:
+ - "@bundle"
+ - type : "@bundle-hints"
+ name: "service-annotations"
diff --git a/service-annotations/src/main/gateway/config/trusted-certs.yml b/service-annotations/src/main/gateway/config/trusted-certs.yml
new file mode 100644
index 0000000..de41010
--- /dev/null
+++ b/service-annotations/src/main/gateway/config/trusted-certs.yml
@@ -0,0 +1,12 @@
+www.google.com:
+ verifyHostname: false
+ trustedForSsl: true
+ trustedAsSamlAttestingEntity: false
+ trustAnchor: true
+ revocationCheckingEnabled: true
+ trustedForSigningClientCerts: false
+ trustedForSigningServerCerts: false
+ trustedAsSamlIssuer: false
+ annotations:
+ - type: "@bundle-hints"
+ id: "650a44894bb5d14a6cfd2b061e221f4a"
diff --git a/service-annotations/src/main/gateway/policy/certificate/Certificate Example.xml b/service-annotations/src/main/gateway/policy/certificate/Certificate Example.xml
new file mode 100644
index 0000000..22b3240
--- /dev/null
+++ b/service-annotations/src/main/gateway/policy/certificate/Certificate Example.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/service-metrics/build.gradle b/service-metrics/build.gradle
new file mode 100644
index 0000000..1a3a4cf
--- /dev/null
+++ b/service-metrics/build.gradle
@@ -0,0 +1,9 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+GatewayExportConfig {
+ folderPath = '/service-metrics'
+}
\ No newline at end of file
diff --git a/service-metrics/settings.gradle b/service-metrics/settings.gradle
new file mode 100644
index 0000000..4d5ae66
--- /dev/null
+++ b/service-metrics/settings.gradle
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2018 CA. All rights reserved.
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+rootProject.name = 'service-metrics'
\ No newline at end of file
diff --git a/service-metrics/src/main/gateway/config/policy-backed-services.yml b/service-metrics/src/main/gateway/config/policy-backed-services.yml
new file mode 100644
index 0000000..5fd0fd1
--- /dev/null
+++ b/service-metrics/src/main/gateway/config/policy-backed-services.yml
@@ -0,0 +1,5 @@
+Metrics:
+ interfaceName: "com.l7tech.external.assertions.pbsmel.server.ServiceMetricsProcessor"
+ operations:
+ - policy: "service-metrics/Metrics"
+ operationName: "process"
diff --git a/service-metrics/src/main/gateway/policy/service-metrics/Metrics.xml b/service-metrics/src/main/gateway/policy/service-metrics/Metrics.xml
new file mode 100644
index 0000000..450dbd9
--- /dev/null
+++ b/service-metrics/src/main/gateway/policy/service-metrics/Metrics.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/settings.gradle b/settings.gradle
index 73844a4..26b1894 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -6,3 +6,23 @@
rootProject.name = 'gateway-developer-example'
+include 'common-services',
+ 'business-integrations',
+ 'consumer-solutions',
+ 'audit',
+ 'global',
+ 'routings',
+ 'service-metrics',
+ 'encass-annotations',
+ 'deployment'
+include 'service-annotations'
+include 'clusterproperty-example'
+include 'jdbcconnection-example'
+include 'idprovider-example'
+include 'jms-example'
+include 'cassandra-example'
+include 'mqnative-example'
+include 'http2client-example'
+include 'password-example'
+include 'privatekey-example'
+
diff --git a/src/main/gateway/config/encass.yml b/src/main/gateway/config/encass.yml
deleted file mode 100644
index b3dc03f..0000000
--- a/src/main/gateway/config/encass.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-gateway-solution/encass-policy.xml:
- arguments:
- - name: "hello"
- type: "string"
- - name: "hello-again"
- type: "message"
- results:
- - name: "goodbye"
- type: "string"
- - name: "goodbye-again"
- type: "message"
diff --git a/src/main/gateway/config/global.properties b/src/main/gateway/config/global.properties
deleted file mode 100644
index be2d73f..0000000
--- a/src/main/gateway/config/global.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-my-global-property=Property\n\#"multi-line"\n
-another-property=\!@\#$%^&*()_another+\=-<>?{}|[]\\;'\:"/.,property
diff --git a/src/main/gateway/config/services.yml b/src/main/gateway/config/services.yml
deleted file mode 100644
index 183fe6b..0000000
--- a/src/main/gateway/config/services.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-gateway-solution/another-service.xml:
- url: "/another-service-example"
- httpMethods:
- - "DELETE"
- - "POST"
- - "GET"
- - "PUT"
-gateway-solution/my-gateway-api.xml:
- url: "/example"
- httpMethods:
- - "DELETE"
- - "POST"
- - "GET"
- - "PUT"