diff --git a/.gitignore b/.gitignore index 9adb473..cd89a6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,19 @@ +############# root folder ############# + # python __pycache__ # CENM folders cenm-*/ +!cenm-auth/ +!cenm-gateway/ +!cenm-idman/ +!cenm-nmap/ +!cenm-node/ +!cenm-notary/ +!cenm-pki/ +!cenm-signer/ +!cenm-zone/ # args .env @@ -16,3 +27,64 @@ cenm-*/ # misc artifacts *.jar *.zip + +############# service folders ############# + +# generated certificates +**/certificates/*.jks + +# jar files +**/*.jar + +# run-time files +**/logs/ +**/h2/ +**/shell-commands/ +**/ssh/ + +############# cenm-gateway ############# + +# cenm-tool +**/cenm-tool/* + +############# cenm-idman ############# + +# generated certificates +**/crl-files/*.crl + +# downloaded tools +**/tools/* + +# jar files +**/*.jar + +# run-time files +identitymanager.conf +token + +############# cenm-nmap ############# + +# run-time files +network-parameters.conf +networkmap.conf +nodeInfo* + +############# cenm-node ############# + +# run-time dirs +**/additional-node-infos/ +**/artemis/ +**/brokers/ + +# run-time files +network-parameters +nodeInfo* +process-id + +############# cenm-pki ############# + +# certs +cenm-pki/key-stores/ +cenm-pki/trust-stores/ +cenm-pki/crl-files/ + diff --git a/cenm-auth/LICENSE b/cenm-auth/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-auth/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-auth/README.md b/cenm-auth/README.md new file mode 100644 index 0000000..bcad5db --- /dev/null +++ b/cenm-auth/README.md @@ -0,0 +1 @@ +# cenm-auth \ No newline at end of file diff --git a/cenm-auth/auth.conf b/cenm-auth/auth.conf new file mode 100644 index 0000000..57ac2a5 --- /dev/null +++ b/cenm-auth/auth.conf @@ -0,0 +1,80 @@ +database = { + driverClassName = "org.h2.Driver" + jdbcDriver = "" + url = "jdbc:h2:file:./h2/auth-persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT=0" + user = "authuser" + password = "password" + # schema = cenm_schema + runMigration = true +} + +jwk = { + location = "./certificates/jwt-store.jks" + password = "password" + keyAlias = "oauth-test-jwt" + keyId = "key-id" +} + +clientConfig = { + clients = [ + { + clientId = "gateway1" + clientSecret = "secret1" + scopes = [ + "accounts:user" + ] + audience = [ + "ACCOUNTS", + "zone", + "identity-manager", + "network-map", + "signer" + ] + accessTokenValidity = 300 + refreshTokenValidity = 6000 + }, + { + clientId = "gateway2" + clientSecret = "secret2" + scopes = [ + "accounts:user", + "accounts:admin" + ] + audience = [ + "ACCOUNTS", + "zone", + "identity-manager", + "network-map", + "signer" + ] + accessTokenValidity = 300 + refreshTokenValidity = 6000 + } + ], + issuer = "http://test" +} +server = { + port = 8081 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-auth-keys.jks" + password = "password" + keyAlias = "cordasslauthservice" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } +} +baseline = { + permission = { + baselineClass = "com.r3.appeng.accounts.cenm.PermissionBaselineImpl" + baselinePackage = "./plugins/accounts-baseline-cenm.jar" + } + + role = { + baselineClass = "com.r3.appeng.accounts.cenm.RoleBaselineImpl" + baselinePackage = "./plugins/accounts-baseline-cenm.jar" + } +} diff --git a/cenm-auth/certificates/.gitkeep b/cenm-auth/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-auth/download.sh b/cenm-auth/download.sh new file mode 100755 index 0000000..3ce3ce4 --- /dev/null +++ b/cenm-auth/download.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +download () { + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-gateway-plugins/com/r3/corda/node/management/plugin/auth-baseline-node-management-plugin/$3/auth-baseline-node-management-plugin-$3.jar || echo "Node management baseline plugin version ${3} not found." + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-gateway-plugins/com/r3/corda/flow/management/plugin/auth-baseline-flow-management-plugin/$3/auth-baseline-flow-management-plugin-$3.jar || echo "Flow management baseline plugin version ${3} not found." + mv ./auth-baseline-*-management-plugin-$3.jar plugins +} + +print_usage () { +cat << EOL +Dowload your node/flow management baseline plugin jars with: (use -o to overwrite existing plugin versions) + ./dowload.sh -u .@r3.com -p -v +EOL +} + +USERNAME= +PASSWORD= +VERSION= +OVERWRITE= + +while getopts 'u:p:v:o' flag +do + case "${flag}" in + u) + USERNAME=${OPTARG};; + p) + PASSWORD=${OPTARG};; + v) + VERSION=${OPTARG};; + o) + OVERWRITE=true;; + *) + print_usage + exit;; + esac +done + +if [ -z "$USERNAME" ] || [ -z "$PASSWORD" ] || [ -z "$VERSION" ]; then + print_usage + exit +fi + +if [ "$OVERWRITE" = true ] ; then + rm -rf plugins/auth-baseline-*-management-plugin-*.jar > /dev/null 2>&1 +fi + +echo "Downloading Node/Flow management baseline plugins v${VERSION}" + +download "$USERNAME" "$PASSWORD" "$VERSION" diff --git a/cenm-auth/drivers/.gitkeep b/cenm-auth/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-auth/plugins/.gitkeep b/cenm-auth/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-auth/setup-auth/groups/ca-signers.json b/cenm-auth/setup-auth/groups/ca-signers.json new file mode 100644 index 0000000..a856e6a --- /dev/null +++ b/cenm-auth/setup-auth/groups/ca-signers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can perform CA related operations", + "name": "ca-signers", + "users": [ "ca-signer" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/configuration-maintainers.json b/cenm-auth/setup-auth/groups/configuration-maintainers.json new file mode 100644 index 0000000..0a1bfbd --- /dev/null +++ b/cenm-auth/setup-auth/groups/configuration-maintainers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can read and update service configurations", + "name": "configuration-maintainers", + "users": [ "config-maintainer" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/configuration-readers.json b/cenm-auth/setup-auth/groups/configuration-readers.json new file mode 100644 index 0000000..a0aa43f --- /dev/null +++ b/cenm-auth/setup-auth/groups/configuration-readers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can read configurations", + "name": "configuration-readers", + "users": [ "config-reader" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/network-maintainers.json b/cenm-auth/setup-auth/groups/network-maintainers.json new file mode 100644 index 0000000..ea487e2 --- /dev/null +++ b/cenm-auth/setup-auth/groups/network-maintainers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can do Network Related operations (Read and Write) including Flag Day", + "name": "network-maintainers", + "users": [ "network-maintainer" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/network-operation-readers.json b/cenm-auth/setup-auth/groups/network-operation-readers.json new file mode 100644 index 0000000..89ec0d8 --- /dev/null +++ b/cenm-auth/setup-auth/groups/network-operation-readers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can read Network Related data", + "name": "network-operation-readers", + "users": [ "business-reader" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/network-operators.json b/cenm-auth/setup-auth/groups/network-operators.json new file mode 100644 index 0000000..49776e0 --- /dev/null +++ b/cenm-auth/setup-auth/groups/network-operators.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can do Network Related operations (Read and Write) excluding Flag Day", + "name": "network-operators", + "users": [ "network-operator" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/groups/nonca-signers.json b/cenm-auth/setup-auth/groups/nonca-signers.json new file mode 100644 index 0000000..428094b --- /dev/null +++ b/cenm-auth/setup-auth/groups/nonca-signers.json @@ -0,0 +1,7 @@ +{ + "admin": "false", + "autoEnroll": "false", + "description": "Can do non-CA signing related operations", + "name": "nonca-signers", + "users": [ "nonca-signer" ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/CASigner.json b/cenm-auth/setup-auth/roles/CASigner.json new file mode 100644 index 0000000..f4ee5b0 --- /dev/null +++ b/cenm-auth/setup-auth/roles/CASigner.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "ca-signers", "objectName": "global" }, + { "entityName": "ca-signers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/ConfigurationMaintainer.json b/cenm-auth/setup-auth/roles/ConfigurationMaintainer.json new file mode 100644 index 0000000..8fc4d5b --- /dev/null +++ b/cenm-auth/setup-auth/roles/ConfigurationMaintainer.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "configuration-maintainers", "objectName": "global" }, + { "entityName": "configuration-maintainers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/ConfigurationReader.json b/cenm-auth/setup-auth/roles/ConfigurationReader.json new file mode 100644 index 0000000..aec201c --- /dev/null +++ b/cenm-auth/setup-auth/roles/ConfigurationReader.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "configuration-readers", "objectName": "global" }, + { "entityName": "configuration-readers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/NetworkMaintainer.json b/cenm-auth/setup-auth/roles/NetworkMaintainer.json new file mode 100644 index 0000000..9a66bc0 --- /dev/null +++ b/cenm-auth/setup-auth/roles/NetworkMaintainer.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "network-maintainers", "objectName": "global" }, + { "entityName": "network-maintainers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/NetworkOperationsReader.json b/cenm-auth/setup-auth/roles/NetworkOperationsReader.json new file mode 100644 index 0000000..25699db --- /dev/null +++ b/cenm-auth/setup-auth/roles/NetworkOperationsReader.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "network-operation-readers", "objectName": "global" }, + { "entityName": "network-operation-readers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/NetworkOperator.json b/cenm-auth/setup-auth/roles/NetworkOperator.json new file mode 100644 index 0000000..c764d88 --- /dev/null +++ b/cenm-auth/setup-auth/roles/NetworkOperator.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "network-operators", "objectName": "global" }, + { "entityName": "network-operators", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/roles/NonCASigner.json b/cenm-auth/setup-auth/roles/NonCASigner.json new file mode 100644 index 0000000..213c2bb --- /dev/null +++ b/cenm-auth/setup-auth/roles/NonCASigner.json @@ -0,0 +1,6 @@ +{ + "groups": [ + { "entityName": "nonca-signers", "objectName": "global" }, + { "entityName": "nonca-signers", "objectName": "" } + ] +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/setupAuth.sh b/cenm-auth/setup-auth/setupAuth.sh new file mode 100755 index 0000000..20a30ab --- /dev/null +++ b/cenm-auth/setup-auth/setupAuth.sh @@ -0,0 +1,92 @@ +# log in and cache access token +TOKEN_RESPONSE="$(curl -X POST --data "grant_type=password" --data "username=admin" \ + --data "password=p4ssWord" http://127.0.0.1:8089/api/v1/authentication/authenticate --raw | sed -n 2p)" +ACCESS_TOKEN="$(echo ${TOKEN_RESPONSE} | jq -r '.access_token')" +echo "access-token=${ACCESS_TOKEN}" + +echo +echo "========================= Creating users =========================" +for filename in ./users/*.json; do + echo "Creating user $filename." + curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ + --data-binary "@$filename" http://127.0.0.1:8089/api/v1/admin/users + echo "" +done + +echo +echo "========================= Creating groups =========================" +for filename in ./groups/*.json; do + echo "Creating group ${filename}." + curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ + --data-binary "@$filename" http://127.0.0.1:8089/api/v1/admin/groups + echo "" +done + +echo +echo "========================= Assigning roles to groups =========================" +for role in "CASigner" "ConfigurationMaintainer" "ConfigurationReader" "NetworkMaintainer" "NetworkOperator" "NetworkOperationsReader" "NonCASigner"; do + echo "Assigning role ${role} to groups." + srcFile='./roles/'$role'.json' + tempFile=$srcFile'-tmp' + sed "s//$1/g" $srcFile > $tempFile + curl -X PATCH -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/merge-patch+json" \ + --data-binary "@$tempFile" http://127.0.0.1:8089/api/v1/admin/roles/$role + echo "" + rm "$tempFile" +done + +# for srcFile in ./roles/*.json; do +# echo "Creating role from file ${srcFile} and assigning it to groups." +# tempFile=$srcFile'-tmp' +# sed -i '' "s//$1/g" $srcFile > $tempFile +# curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ +# --data-binary "@$tempFile" http://127.0.0.1:8089/api/v1/admin/roles +# echo "" +# rm "$tempFile" +# done + + +# log in and cache access token +# ACCESS_TOKEN="" +# while [ -z "${ACCESS_TOKEN}" ] +# do +# TOKEN_RESPONSE="$(curl -X POST --data "grant_type=password" --data "username=admin" --data "password=p4ssWord" http://127.0.0.1:8089/api/v1/authentication/authenticate)" +# ACCESS_TOKEN="$(echo ${TOKEN_RESPONSE} | jq -r '.access_token')" +# sleep 5 +# done + +# pwd +# ls -alR + +# echo +# echo "========================= Creating users =========================" +# for i in users/*.json +# do +# echo +# echo ">>>>>>>> User: ${i}" +# cat ${i}; echo +# curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" --data-binary "@${i}" http://127.0.0.1:8089/api/v1/admin/users +# echo +# done + +# echo +# echo "========================= Creating groups =========================" +# for i in groups/*.json +# do +# echo +# echo ">>>>>>>> Group: ${i}" +# cat ${i}; echo +# curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" --data-binary "@${i}" http://127.0.0.1:8089/api/v1/admin/groups +# echo +# done + +# echo +# echo "========================= Assigning roles to groups =========================" +# for role in "CASigner" "ConfigurationMaintainer" "ConfigurationReader" "NetworkMaintainer" "NetworkOperator" "NetworkOperationsReader" "NonCASigner"; do +# file='./roles/'$role'.json' +# echo +# echo ">>>>>>>> Role: ${file}" +# cat ${file}; echo +# curl -X PATCH -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/merge-patch+json" --data-binary "@${file}" http://127.0.0.1:8089/api/v1/admin/roles/${role} +# echo +# done diff --git a/cenm-auth/setup-auth/users/business-reader.json b/cenm-auth/setup-auth/users/business-reader.json new file mode 100644 index 0000000..ad23ec2 --- /dev/null +++ b/cenm-auth/setup-auth/users/business-reader.json @@ -0,0 +1,8 @@ +{ + "name": "business-reader", + "email": "business-reader@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/ca-signer.json b/cenm-auth/setup-auth/users/ca-signer.json new file mode 100644 index 0000000..60b5c60 --- /dev/null +++ b/cenm-auth/setup-auth/users/ca-signer.json @@ -0,0 +1,8 @@ +{ + "name": "ca-signer", + "email": "ca-signer@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/config-maintainer.json b/cenm-auth/setup-auth/users/config-maintainer.json new file mode 100644 index 0000000..9109aeb --- /dev/null +++ b/cenm-auth/setup-auth/users/config-maintainer.json @@ -0,0 +1,8 @@ +{ + "name": "config-maintainer", + "email": "config-maintainer@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/config-reader.json b/cenm-auth/setup-auth/users/config-reader.json new file mode 100644 index 0000000..1e89914 --- /dev/null +++ b/cenm-auth/setup-auth/users/config-reader.json @@ -0,0 +1,8 @@ +{ + "name": "config-reader", + "email": "config-reader@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/network-maintainer.json b/cenm-auth/setup-auth/users/network-maintainer.json new file mode 100644 index 0000000..ecbedb1 --- /dev/null +++ b/cenm-auth/setup-auth/users/network-maintainer.json @@ -0,0 +1,8 @@ +{ + "name": "network-maintainer", + "email": "network-maintainer@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/network-operator.json b/cenm-auth/setup-auth/users/network-operator.json new file mode 100644 index 0000000..9a9a914 --- /dev/null +++ b/cenm-auth/setup-auth/users/network-operator.json @@ -0,0 +1,8 @@ +{ + "name": "network-operator", + "email": "network-operator@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-auth/setup-auth/users/nonca-signer.json b/cenm-auth/setup-auth/users/nonca-signer.json new file mode 100644 index 0000000..1100a05 --- /dev/null +++ b/cenm-auth/setup-auth/users/nonca-signer.json @@ -0,0 +1,8 @@ +{ + "name": "nonca-signer", + "email": "nonca-signer@megacorp.com", + "password": "p4ssWord", + "enabled": "true", + "groups": [ ], + "admin": "false" +} \ No newline at end of file diff --git a/cenm-gateway/LICENSE b/cenm-gateway/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-gateway/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-gateway/README.md b/cenm-gateway/README.md new file mode 100644 index 0000000..8186cc1 --- /dev/null +++ b/cenm-gateway/README.md @@ -0,0 +1 @@ +# cenm-gateway \ No newline at end of file diff --git a/cenm-gateway/download.sh b/cenm-gateway/download.sh new file mode 100755 index 0000000..6de398b --- /dev/null +++ b/cenm-gateway/download.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +download () { + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-gateway-plugins/com/r3/corda/node/management/plugin/node-management-plugin/$3/node-management-plugin-$3.jar || echo "Node management gateway plugin version ${3} not found." + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-gateway-plugins/com/r3/corda/flow/management/plugin/flow-management-plugin/$3/flow-management-plugin-$3.jar || echo "Flow management gateway plugin version ${3} not found." + cp ./*-management-plugin-$3.jar public/plugins + mv ./*-management-plugin-$3.jar private/plugins +} + +print_usage () { +cat << EOL +Dowload your node/flow management gateway plugin jars with: (use -o to overwrite existing plugin versions) + ./dowload.sh -u .@r3.com -p -v +EOL +} + +USERNAME= +PASSWORD= +VERSION= +OVERWRITE= + +while getopts 'u:p:v:o' flag +do + case "${flag}" in + u) + USERNAME=${OPTARG};; + p) + PASSWORD=${OPTARG};; + v) + VERSION=${OPTARG};; + o) + OVERWRITE=true;; + *) + print_usage + exit;; + esac +done + +if [ -z "$USERNAME" ] || [ -z "$PASSWORD" ] || [ -z "$VERSION" ]; then + print_usage + exit +fi + +if [ "$OVERWRITE" = true ] ; then + rm -rf public/plugins/*-management-plugin-*.jar > /dev/null 2>&1 + rm -rf private/plugins/*-management-plugin-*.jar > /dev/null 2>&1 +fi + +echo "Downloading Node/Flow management gateway plugins v${VERSION}" + +download "$USERNAME" "$PASSWORD" "$VERSION" diff --git a/cenm-gateway/private/certificates/.gitkeep b/cenm-gateway/private/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-gateway/private/gateway.conf b/cenm-gateway/private/gateway.conf new file mode 100644 index 0000000..83412b8 --- /dev/null +++ b/cenm-gateway/private/gateway.conf @@ -0,0 +1,30 @@ +auth = { + serverUrl = "https://127.0.0.1:8081/" + sslConfig = { + trustStore = "./certificates/corda-ssl-trust-store.jks" + trustStorePassword = "trustpass" + } + clientCredentials = { + clientId = "gateway2" + clientSecret = "secret2" + } +} + +cenm = { + zoneHost = "127.0.0.1" + zonePort = 5063 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-identity-manager-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } +} + +server = { + port = 8089 +} diff --git a/cenm-gateway/private/plugins/.gitkeep b/cenm-gateway/private/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-gateway/public/certificates/.gitkeep b/cenm-gateway/public/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-gateway/public/gateway.conf b/cenm-gateway/public/gateway.conf new file mode 100644 index 0000000..762e730 --- /dev/null +++ b/cenm-gateway/public/gateway.conf @@ -0,0 +1,30 @@ +auth = { + serverUrl = "https://127.0.0.1:8081/" + sslConfig = { + trustStore = "./certificates/corda-ssl-trust-store.jks" + trustStorePassword = "trustpass" + } + clientCredentials = { + clientId = "gateway1" + clientSecret = "secret1" + } +} + +cenm = { + zoneHost = "127.0.0.1" + zonePort = 5063 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-identity-manager-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } +} + +server = { + port = 8088 +} diff --git a/cenm-gateway/public/plugins/.gitkeep b/cenm-gateway/public/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-idman/LICENSE b/cenm-idman/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-idman/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-idman/README.md b/cenm-idman/README.md new file mode 100644 index 0000000..a678950 --- /dev/null +++ b/cenm-idman/README.md @@ -0,0 +1 @@ +# cenm-idman \ No newline at end of file diff --git a/cenm-idman/certificates/.gitkeep b/cenm-idman/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-idman/crl-files/.gitkeep b/cenm-idman/crl-files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-idman/drivers/.gitkeep b/cenm-idman/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-idman/identitymanager-init.conf b/cenm-idman/identitymanager-init.conf new file mode 100644 index 0000000..bd51a26 --- /dev/null +++ b/cenm-idman/identitymanager-init.conf @@ -0,0 +1,89 @@ +address = "127.0.0.1:10000" + +database = { + driverClassName = "org.h2.Driver" + jdbcDriver = "" + url = "jdbc:h2:file:./h2/identity-manager-persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT=0" + user = "idmanuser" + password = "password" + # schema = cenm_schema + runMigration = true +} + +workflows = { + "identity-manager-alias" = { + type = ISSUANCE + updateInterval = 10000 + enmListener = { + port = 5051 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-identity-manager-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } + } + plugin = { + pluginClass = "com.r3.enmplugins.approveall.ApproveAll" + } + }, + "revocation-alias" = { + type = REVOCATION + crlCacheTimeout = 100000 # every 15 minutes + crlFiles = ["./crl-files/tls.crl", "./crl-files/root.crl", "./crl-files/subordinate.crl"] + enmListener = { + port = 5052 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-identity-manager-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } + } + plugin = { + pluginClass = "com.r3.enmplugins.approveall.ApproveAll" + } + } +} + +# shell = { +# sshdPort = 2222 +# user = "testuser" +# password = "password" +# } + +authServiceConfig = { + disableAuthentication=false + host=127.0.0.1 + port=8081 + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + issuer="http://test" + leeway=5s +} + +adminListener = { + port = 5053 + ssl = { + keyStore = { + location = ./certificates/corda-ssl-identity-manager-keys.jks + password = password + } + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + } +} \ No newline at end of file diff --git a/cenm-nmap/LICENSE b/cenm-nmap/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-nmap/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-nmap/README.md b/cenm-nmap/README.md new file mode 100644 index 0000000..b30ad31 --- /dev/null +++ b/cenm-nmap/README.md @@ -0,0 +1 @@ +# cenm-nmap \ No newline at end of file diff --git a/cenm-nmap/certificates/.gitkeep b/cenm-nmap/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-nmap/drivers/.gitkeep b/cenm-nmap/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-nmap/network-parameters-init.conf b/cenm-nmap/network-parameters-init.conf new file mode 100644 index 0000000..dcfda9b --- /dev/null +++ b/cenm-nmap/network-parameters-init.conf @@ -0,0 +1,11 @@ +notaries : [ + { + notaryNodeInfoFile: "INSERT_NODE_INFO_FILE_NAME_HERE" + validating = false + } +] + +minimumPlatformVersion = 4 +maxMessageSize = 10485760 +maxTransactionSize = 10485760 +eventHorizonDays = 10 # Duration in days diff --git a/cenm-nmap/networkmap-init.conf b/cenm-nmap/networkmap-init.conf new file mode 100644 index 0000000..4f98ffc --- /dev/null +++ b/cenm-nmap/networkmap-init.conf @@ -0,0 +1,91 @@ +address = "127.0.0.1:20000" + +pollingInterval = 10000 +checkRevocation = false + +database = { + driverClassName = "org.h2.Driver" + jdbcDriver = "" + url = "jdbc:h2:file:./h2/networkmap-persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT=0" + user = "nmapuser" + password = "password" + # schema = cenm_schema + runMigration = true +} + +enmListener = { + port = 5050 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-network-map-keys.jks" + password = password + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = trustpass + } + } +} + +identityManager = { + host = "127.0.0.1" + port = 5051 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-network-map-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } +} + +revocation = { + host = "127.0.0.1" + port = 5052 + ssl = { + keyStore = { + location = "./certificates/corda-ssl-network-map-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + } +} + +# shell = { +# sshdPort = 2225 +# user = "testuser" +# password = "password" +# } + +authObjectId=1 +authServiceConfig = { + disableAuthentication=false + host=127.0.0.1 + port=8081 + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + issuer="http://test" + leeway=5s +} + +adminListener = { + port = 5055 + ssl = { + keyStore = { + location = ./certificates/corda-ssl-network-map-keys.jks + password = password + } + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + } +} \ No newline at end of file diff --git a/cenm-node/LICENSE b/cenm-node/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-node/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-node/README.md b/cenm-node/README.md new file mode 100644 index 0000000..a761efa --- /dev/null +++ b/cenm-node/README.md @@ -0,0 +1 @@ +# cenm-node \ No newline at end of file diff --git a/cenm-node/certificates/.gitkeep b/cenm-node/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-node/cordapps/.gitkeep b/cenm-node/cordapps/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-node/cordapps/config/.gitkeep b/cenm-node/cordapps/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-node/download-archive-lg.sh b/cenm-node/download-archive-lg.sh new file mode 100755 index 0000000..b6c49b7 --- /dev/null +++ b/cenm-node/download-archive-lg.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +download () { + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/r3-corda-releases/com/r3/archive/archive-service/$3/archive-service-$3.jar || echo "Archive Service version ${3} not found." + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/r3-corda-releases/com/r3/ledger-graph/$4/ledger-graph-$4.jar || echo "Ledger Graph version ${4} not found." + mv ./archive-service-$3.jar ./cordapps/ + mv ./ledger-graph-$4.jar ./cordapps/ +} + +print_usage () { +cat << EOL +Dowload your Archiving and LedgerGraph jar(s) with: (use -o to overwrite existing plugin versions) + ./dowload.sh -u .@r3.com -p -a -l +EOL +} + +USERNAME= +PASSWORD= +ARCHIVE_VERSION= +LG_VERSION= +OVERWRITE= + +while getopts 'u:p:a:l:o' flag +do + case "${flag}" in + u) + USERNAME=${OPTARG};; + p) + PASSWORD=${OPTARG};; + a) + ARCHIVE_VERSION=${OPTARG};; + l) + LG_VERSION=${OPTARG};; + o) + OVERWRITE=true;; + *) + print_usage + exit;; + esac +done + +if [ -z "$USERNAME" ] || [ -z "$PASSWORD" ] || [ -z "$ARCHIVE_VERSION" ] || [ -z "$LG_VERSION" ]; then + print_usage + exit +fi + +if [ "$OVERWRITE" = true ]; then + rm -rf cordapps/archive-service-*.jar > /dev/null 2>&1 + rm -rf cordapps/ledger-graph-*.jar > /dev/null 2>&1 +fi + +echo "Downloading Archive Service v${ARCHIVE_VERSION} and Ledger Graph v${LG_VERSION}..." + +download "$USERNAME" "$PASSWORD" "$ARCHIVE_VERSION" "$LG_VERSION" diff --git a/cenm-node/download.sh b/cenm-node/download.sh new file mode 100755 index 0000000..e040c73 --- /dev/null +++ b/cenm-node/download.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +download () { + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/r3-corda-releases/com/r3/corda/corda/$3/corda-$3.jar || echo "Corda version ${3} not found." + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/r3-corda-releases/com/r3/corda/corda-shell/$3/corda-shell-$3.jar || echo "Corda shell version ${3} not found." + mv ./corda-shell-$3.jar ./drivers/ + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-releases/net/corda/corda-finance-contracts/$3/corda-finance-contracts-$3.jar || echo "Corda finance contracts version ${3} not found." + curl --progress-bar -u $1:$2 -O https://software.r3.com/artifactory/corda-releases/net/corda/corda-finance-workflows/$3/corda-finance-workflows-$3.jar || echo "Corda finance workflows version ${3} not found." + mv ./corda-finance-*-$3.jar ./cordapps/ +} + +print_usage () { +cat << EOL +Dowload your Corda jar with: (use -o to overwrite existing plugin versions) + ./dowload.sh -u .@r3.com -p -v +EOL +} + +USERNAME= +PASSWORD= +VERSION= +OVERWRITE= + +while getopts 'u:p:v:o' flag +do + case "${flag}" in + u) + USERNAME=${OPTARG};; + p) + PASSWORD=${OPTARG};; + v) + VERSION=${OPTARG};; + o) + OVERWRITE=true;; + *) + print_usage + exit;; + esac +done + +if [ -z "$USERNAME" ] || [ -z "$PASSWORD" ] || [ -z "$VERSION" ]; then + print_usage + exit +fi + +if [ "$OVERWRITE" = true ]; then + rm -rf corda-*.jar > /dev/null 2>&1 + rm -rf drivers/corda-shell-*.jar > /dev/null 2>&1 + rm -rf cordapps/corda-finance-*-*.jar > /dev/null 2>&1 +fi + +echo "Downloading Corda v${VERSION}" + +download "$USERNAME" "$PASSWORD" "$VERSION" diff --git a/cenm-node/drivers/.gitkeep b/cenm-node/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-node/node.conf b/cenm-node/node.conf new file mode 100644 index 0000000..554d4c3 --- /dev/null +++ b/cenm-node/node.conf @@ -0,0 +1,38 @@ +networkServices = { + doormanURL = "http://127.0.0.1:10000" + networkMapURL = "http://127.0.0.1:20000" +} + +dataSourceProperties = { + dataSource = { + password = "ziAscD0MJnj4n4xkFWY6XuMBuw9bvYC7" + url = "jdbc:h2:file:./h2/node-persistence;DB_CLOSE_ON_EXIT=FALSE;WRITE_DELAY=0;LOCK_TIMEOUT=10000" + user = "sa" + } + dataSourceClassName = "org.h2.jdbcx.JdbcDataSource" +} + +devMode = false + +cordappSignerKeyFingerprintBlacklist=[] + +myLegalName = "O=TestNode, L=London, C=GB" +p2pAddress = "127.0.0.1:60011" +rpcSettings = { + address = "127.0.0.1:60012" + adminAddress = "127.0.0.1:60013" + standAloneBroker = false + useSsl = false +} + +rpcUsers = [ + { + username = "testuser" + password = "password" + permissions = [ALL] + } +] + +sshd = { + port = 2230 +} diff --git a/cenm-notary/LICENSE b/cenm-notary/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-notary/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-notary/README.md b/cenm-notary/README.md new file mode 100644 index 0000000..2ff5dbe --- /dev/null +++ b/cenm-notary/README.md @@ -0,0 +1 @@ +# cenm-notary diff --git a/cenm-notary/certificates/.gitkeep b/cenm-notary/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-notary/cordapps/.gitkeep b/cenm-notary/cordapps/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-notary/cordapps/config/.gitkeep b/cenm-notary/cordapps/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-notary/drivers/.gitkeep b/cenm-notary/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-notary/notary.conf b/cenm-notary/notary.conf new file mode 100644 index 0000000..d96773d --- /dev/null +++ b/cenm-notary/notary.conf @@ -0,0 +1,41 @@ +networkServices = { + doormanURL = "http://127.0.0.1:10000" + networkMapURL = "http://127.0.0.1:20000" +} + +dataSourceProperties = { + dataSource = { + password = "ziAscD0MJnj4n4xkFWY6XuMBuw9bvYC7" + url = "jdbc:h2:file:./h2/notary-persistence;DB_CLOSE_ON_EXIT=FALSE;WRITE_DELAY=0;LOCK_TIMEOUT=10000" + user = "sa" + } + dataSourceClassName = "org.h2.jdbcx.JdbcDataSource" +} + +notary = { + serviceLegalName = "O=TestNotaryService, L=London, C=GB" + validating = false +} + +devMode = false + +myLegalName = "O=TestNotary, L=London, C=GB" +p2pAddress = "127.0.0.1:60001" +rpcSettings = { + address = "127.0.0.1:60002" + adminAddress = "127.0.0.1:60003" + standAloneBroker = false + useSsl = false +} + +rpcUsers = [ + { + username = "testuser" + password = "password" + permissions = [ALL] + } +] + +sshd = { + port = 2226 +} diff --git a/cenm-pki/LICENSE b/cenm-pki/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-pki/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-pki/README.md b/cenm-pki/README.md new file mode 100644 index 0000000..eda418a --- /dev/null +++ b/cenm-pki/README.md @@ -0,0 +1 @@ +# cenm-pki \ No newline at end of file diff --git a/cenm-pki/pki.conf b/cenm-pki/pki.conf new file mode 100644 index 0000000..f4c8a57 --- /dev/null +++ b/cenm-pki/pki.conf @@ -0,0 +1,171 @@ +keyStores = { + "corda-identity-manager-keys" = { + type = LOCAL + file = "./key-stores/corda-identity-manager-keys.jks" + password = "password" + }, + "corda-network-map-keys" = { + type = LOCAL + file = "./key-stores/corda-network-map-keys.jks" + password = "password" + }, + "corda-subordinate-keys" = { + type = LOCAL + file = "./key-stores/corda-subordinate-keys.jks" + password = "password" + }, + "corda-root-keys" = { + type = LOCAL + file = "./key-stores/corda-root-keys.jks" + password = "password" + }, + "corda-tls-crl-signer-keys" = { + type = LOCAL + file = "./key-stores/corda-tls-crl-signer-keys.jks" + password = "password" + }, + "corda-ssl-network-map-keys" = { + type = LOCAL + file = "./key-stores/corda-ssl-network-map-keys.jks" + password = "password" + }, + "corda-ssl-identity-manager-keys" = { + type = LOCAL + file = "./key-stores/corda-ssl-identity-manager-keys.jks" + password = "password" + }, + "corda-ssl-signer-keys" = { + type = LOCAL + file = "./key-stores/corda-ssl-signer-keys.jks" + password = "password" + }, + "corda-ssl-auth-keys" = { + type = LOCAL + file = "./key-stores/corda-ssl-auth-keys.jks" + password = "password" + }, + "corda-ssl-root-keys" = { + type = LOCAL + file = "./key-stores/corda-ssl-root-keys.jks" + password = "password" + } +} +certificatesStores = { + "network-root-truststore" = { + file = "./trust-stores/network-root-truststore.jks" + password = "trustpass" + }, + "corda-ssl-trust-store" = { + file = "./trust-stores/corda-ssl-trust-store.jks" + password = "trustpass" + } +} +certificates = { + "tlscrlsigner" = { + key = { + type = LOCAL + includeIn = ["corda-tls-crl-signer-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + isSelfSigned = true + keyUsages = [CRL_SIGN] + keyPurposes = [SERVER_AUTH, CLIENT_AUTH] + validDays = 7300 + issuesCertificates = true + subject = "CN=Test TLS Signer Certificate, OU=HQ, O=HoldCo LLC, L=New York, C=US" + includeIn = ["network-root-truststore"] + crl = { + crlDistributionUrl = "http://127.0.0.1:10000/certificate-revocation-list/tls" + indirectIssuer = true + issuer = "CN=Corda TLS Signer Certificate, OU=Corda, O=R3 HoldCo LLC, L=New York, C=US" + file = "./crl-files/tls.crl" + } + }, + "cordarootca" = { + key = { + type = LOCAL + includeIn = ["corda-root-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + isSelfSigned = true + keyUsages = [DIGITAL_SIGNATURE, KEY_CERT_SIGN, CRL_SIGN] + keyPurposes = [SERVER_AUTH, CLIENT_AUTH] + validDays = 7300 + issuesCertificates = true + subject = "CN=Test Root CA Certificate, OU=HQ, O=HoldCo LLC, L=New York, C=US" + includeIn = ["network-root-truststore"] + crl = { + crlDistributionUrl = "http://127.0.0.1:10000/certificate-revocation-list/root" + file = "./crl-files/root.crl" + } + }, + "cordasubordinateca" = { + key = { + type = LOCAL + includeIn = ["corda-subordinate-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + isSelfSigned = false + signedBy = "cordarootca" + keyUsages = [DIGITAL_SIGNATURE, KEY_CERT_SIGN, CRL_SIGN] + keyPurposes = [SERVER_AUTH, CLIENT_AUTH] + validDays = 7300 + issuesCertificates = true + subject = "CN=Test Subordinate CA Certificate, OU=HQ, O=HoldCo LLC, L=New York, C=US" + crl = { + crlDistributionUrl = "http://127.0.0.1:10000/certificate-revocation-list/subordinate" + file = "./crl-files/subordinate.crl" + } + }, + "cordaidentitymanagerca" = { + key = { + type = LOCAL + includeIn = ["corda-identity-manager-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + isSelfSigned = false + signedBy = "cordasubordinateca" + keyUsages = [DIGITAL_SIGNATURE, KEY_CERT_SIGN, CRL_SIGN] + keyPurposes = [SERVER_AUTH, CLIENT_AUTH] + validDays = 7300 + role = DOORMAN_CA + issuesCertificates = true + subject = "CN=Test Identity Manager Service Certificate, OU=HQ, O=HoldCo LLC, L=New York, C=US" + }, + "cordanetworkmap" = { + key = { + type = LOCAL + includeIn = ["corda-network-map-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + isSelfSigned = false + signedBy = "cordasubordinateca" + keyUsages = [DIGITAL_SIGNATURE, KEY_CERT_SIGN, CRL_SIGN] + keyPurposes = [SERVER_AUTH, CLIENT_AUTH] + validDays = 7300 + role = NETWORK_MAP + issuesCertificates = false + subject = "CN=Test Network Map Service Certificate, OU=HQ, O=HoldCo LLC, L=New York, C=US" + }, + "::CORDA_SSL_ROOT" = { + key = { + type = LOCAL + includeIn = ["corda-ssl-identity-manager-keys"] + algorithm = "ECDSA_SECP256R1_SHA256" + password = "password" + } + crl = { + crlDistributionUrl = "http://127.0.0.1:10000/certificate-revocation-list/ssl" + file = "./crl-files/ssl.crl" + } + }, + "::CORDA_SSL_IDENTITY_MANAGER", + "::CORDA_SSL_NETWORK_MAP", + "::CORDA_SSL_SIGNER", + "::CORDA_SSL_AUTH_SERVICE" +} \ No newline at end of file diff --git a/cenm-signer/LICENSE b/cenm-signer/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-signer/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-signer/README.md b/cenm-signer/README.md new file mode 100644 index 0000000..66a2b3e --- /dev/null +++ b/cenm-signer/README.md @@ -0,0 +1 @@ +# cenm-signer \ No newline at end of file diff --git a/cenm-signer/certificates/.gitkeep b/cenm-signer/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-signer/signer.conf b/cenm-signer/signer.conf new file mode 100644 index 0000000..553a49a --- /dev/null +++ b/cenm-signer/signer.conf @@ -0,0 +1,165 @@ +hsmLibraries = [] + +signingKeys = { + "identity-manager-signing-key" = { + alias = "cordaidentitymanagerca" + type = LOCAL + keyStore = { + file = "./certificates/corda-identity-manager-keys.jks" + password = "password" + } + + }, + "network-map-signing-key" = { + alias = "cordanetworkmap" + type = LOCAL + keyStore = { + file = "./certificates/corda-network-map-keys.jks" + password = "password" + } + } +} + +signers = { + "NetMap" = { + signingKeyAlias = "network-map-signing-key" + type = NETWORK_MAP + schedule = { + interval = 1m + } + serviceLocation = [ + { + host = "127.0.0.1" + port = 5050 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-signer-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + validate = true + } + verbose = false + } + ] + } + "CSR" = { + crlDistributionPoint = "http://127.0.0.1:10000/certificate-revocation-list/doorman" + signingKeyAlias = "identity-manager-signing-key" + validDays = 365 + type = CSR + schedule = { + interval = 1m + } + serviceLocation = [ + { + host = "127.0.0.1" + port = 5051 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-signer-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + validate = true + } + verbose = false + } + ] + } + "Params" = { + signingKeyAlias = "network-map-signing-key" + type = NETWORK_PARAMETERS + schedule { + interval = 1m + } + serviceLocation = [ + { + host = "127.0.0.1" + port = 5050 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-signer-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + validate = true + } + verbose = false + } + ] + } + "CRL" = { + crlDistributionPoint = "http://127.0.0.1:10000/certificate-revocation-list/doorman" + signingKeyAlias = "identity-manager-signing-key" + updatePeriod = 9000 + type = CRL + schedule { + interval = 1m + } + serviceLocation = [ + { + host = "127.0.0.1" + port = 5052 + reconnect = true + ssl = { + keyStore = { + location = "./certificates/corda-ssl-signer-keys.jks" + password = "password" + } + trustStore = { + location = "./certificates/corda-ssl-trust-store.jks" + password = "trustpass" + } + validate = true + } + verbose = false + } + ] + } +} + +# shell = { +# sshdPort = 2223 +# user = "testuser" +# password = "password" +# } + +authServiceConfig = { + disableAuthentication=false + host=127.0.0.1 + port=8081 + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + issuer="http://test" + leeway=5s +} + +adminListener = { + port = 5054 + ssl = { + keyStore = { + location = ./certificates/corda-ssl-identity-manager-keys.jks + password = password + } + trustStore = { + location = ./certificates/corda-ssl-trust-store.jks + password = trustpass + } + } +} + diff --git a/cenm-zone/LICENSE b/cenm-zone/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/cenm-zone/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cenm-zone/README.md b/cenm-zone/README.md new file mode 100644 index 0000000..e1239f0 --- /dev/null +++ b/cenm-zone/README.md @@ -0,0 +1 @@ +# cenm-zone \ No newline at end of file diff --git a/cenm-zone/certificates/.gitkeep b/cenm-zone/certificates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-zone/drivers/.gitkeep b/cenm-zone/drivers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cenm-zone/run.sh b/cenm-zone/run.sh new file mode 100755 index 0000000..fb4c700 --- /dev/null +++ b/cenm-zone/run.sh @@ -0,0 +1,20 @@ +java -jar zone.jar \ + --driver-class-name=org.h2.Driver \ + --jdbc-driver="" \ + --user=zoneuser \ + --password=password \ + --url='jdbc:h2:file:./h2/identity-manager-persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT=0' \ + --run-migration=true \ + --enm-listener-port=5061 \ + --admin-listener-port=5063 \ + --auth-host=127.0.0.1 \ + --auth-port=8081 \ + --auth-trust-store-location certificates/corda-ssl-trust-store.jks \ + --auth-trust-store-password trustpass \ + --auth-issuer "http://test" \ + --auth-leeway 5 \ + --tls=true \ + --tls-keystore=certificates/corda-ssl-identity-manager-keys.jks \ + --tls-keystore-password=password \ + --tls-truststore=certificates/corda-ssl-trust-store.jks \ + --tls-truststore-password=trustpass \ No newline at end of file