diff --git a/.prettierignore b/.prettierignore index 0d64c5af0c07c95756d7ecb60564f3180e182260..f12ee02d41f4f1385911bdc355b560a5f279b97f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,6 +6,7 @@ !*.d.ts !*.mts !jest.config.js +!*.json # .. also in subdirectories !*/ diff --git a/Dockerfile b/Dockerfile index 096f651c4aaafc4b63f046fb83e12c0915247649..109219592c78fd0cb7401a34e15db60085c058ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:20 AS dependencies ARG APP_HOME=/home/node/app ARG SERVICE -WORKDIR ${APP_HOME} +WORKDIR /home/node/app RUN corepack enable @@ -22,10 +22,10 @@ WORKDIR ${APP_HOME} RUN corepack enable COPY apps/shared ./apps/shared -COPY --from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./ -COPY --from=dependencies ${APP_HOME}/node_modules ./node_modules -COPY --from=dependencies ${APP_HOME}/apps/shared/node_modules ./apps/shared/node_modules -COPY --from=dependencies ${APP_HOME}/patches ./patches +COPY --from=dependencies /home/node/app/package.json /home/node/app/pnpm-lock.yaml /home/node/app/pnpm-workspace.yaml /home/node/app/tsconfig*.json /home/node/app/.swcrc ./ +COPY --from=dependencies /home/node/app/node_modules ./node_modules +COPY --from=dependencies /home/node/app/apps/shared/node_modules ./apps/shared/node_modules +COPY --from=dependencies /home/node/app/patches ./patches RUN pnpm --filter shared build # Build service @@ -38,26 +38,25 @@ WORKDIR ${APP_HOME} RUN corepack enable -COPY --from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./ -COPY --from=dependencies ${APP_HOME}/node_modules ./node_modules -COPY --from=dependencies ${APP_HOME}/patches ./patches -COPY --from=build-shared ${APP_HOME}/apps/shared ./apps/shared +COPY --from=dependencies /home/node/app/package.json /home/node/app/pnpm-lock.yaml /home/node/app/pnpm-workspace.yaml /home/node/app/tsconfig*.json /home/node/app/.swcrc ./ +COPY --from=dependencies /home/node/app/node_modules ./node_modules +COPY --from=dependencies /home/node/app/patches ./patches +COPY --from=build-shared /home/node/app/apps/shared ./apps/shared COPY apps/${SERVICE} ./apps/${SERVICE} RUN pnpm install --frozen-lockfile && pnpm --filter ${SERVICE} build && pnpm --filter ${SERVICE} --prod deploy build # Final FROM node:20-slim AS final -ARG APP_HOME=/home/node/app ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} -WORKDIR ${APP_HOME} +WORKDIR /home/node/app CMD ["node", "dist/main.js"] -COPY --from=build-service --chown=node:node ${APP_HOME}/build/dist ./dist -COPY --from=build-service --chown=node:node ${APP_HOME}/build/node_modules ./node_modules -COPY --from=build-service --chown=node:node ${APP_HOME}/build/package.json . +COPY --from=build-service --chown=node:node /home/node/app/build/dist ./dist +COPY --from=build-service --chown=node:node /home/node/app/build/node_modules ./node_modules +COPY --from=build-service --chown=node:node /home/node/app/build/package.json . # Cut unnecessary stuff from package.json. Only leave name, version, description and module type RUN node -e "\ diff --git a/LICENSE b/LICENSE index 16264a6dfa85991e0f893322140a495a9c1e4187..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,427 +1,202 @@ -Organizational Credential Manager -The Organisation Credential Manager service establishes trust between -the different participants within the decentralized ecosystem. It includes -all trust-related functions required to manage Verifiable Credentials. - - Copyright 2022 Vereign AG - -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. - - -This incorporates - -"elastic/ecs-winston-format" - -, a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This also incorporates - -"nestjs" - -, a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"prisma client" - -, an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This also incorporates - -"types/node" - -, type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"express" - -, a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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 + 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 2024 Gaia-X + + 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. - - -This also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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. - - -This also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/README.md b/README.md index 62956a476a75d445e6025036a2d465ad913b6591..c0da148a7805e818fc746f9e7c232bd1656f4eb8 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,55 @@ -# Organizational Credential Manager (v2) +# Organization Credential Manager (OCM) -## Overview +## Introduction -OCM (Organizational Credential Manager) is a Node.js-based microservice system designed to manage organizational credentials. +Organization Credential Manager (OCM) is a comprehensive suite of microservices designed to facilitate the management of digital credentials within an organizational context. Utilizing the principles of Self-Sovereign Identity (SSI), OCM leverages a series of components to enable secure, efficient handling of credentials, keys, and connections between entities. -## Prerequisites +## Components -* Node.js (version 20 or later) -* pnpm -* Docker and Docker Compose for local development +OCM is comprised of several key microservices, each serving a specific role within the credential management ecosystem: -## Installation +### [SSI Abstraction](apps/ssi-abstraction/README.md) +A wrapper around the Credo library ([Credo](https://credo.js.org)), formerly known as Aries Framework Javascript, an implementation of a Hyperledger Indy Agent in TypeScript. This service abstracts the complexities of SSI operations for other components. -1. Clone the repository: +### [Tenant Manager](apps/tenant-manager/README.md) +Manages the creation and listing of OCM tenants, with each tenant maintaining their collections of credentials, keys, etc. This service acts as a critical interface to the SSI Abstraction functionality and is intended for administrative use only. - ```bash - git clone https://gitlab.eclipse.org/eclipse/xfsc/ocm/ocm-engine.git - ``` +### [DID Manager](apps/did-manager/README.md) +Provides API functions for registering Decentralized Identifiers (DIDs) on the Indy Ledger and resolving existing DID Documents, facilitating secure identity verification and management. -2. Navigate to the repository directory: +### [Connection Manager](apps/connection-manager/README.md) +Facilitates the establishment of connections between OCM tenants using Aries protocols, enabling secure, verified interactions. - ```bash - cd ocm-engine - ``` +### [Schema Manager](apps/schema-manager/README.md) +Allows tenants to manage Indy Schemas and Credential Definitions, laying the groundwork for the creation and recognition of standardized credential formats. -3. Install dependencies: +### [Credential Manager](apps/credential-manager/README.md) +Offers an API for the detailed management of tenant credentials, streamlining the process of issuing, holding, and verifying digital credentials. - ```bash - pnpm i - ``` +### [Proof Manager](apps/proof-manager/README.md) +Enables tenants to create proof requests, an essential feature for the verification of credential authenticity and integrity. -4. Start the services locally: +## Deployment - ```bash - pnpm -F ssi-abstraction start - pnpm -F connection-manager start - ... - ``` +### Kubernetes -5. Start the entire stack using Docker Compose: +OCM can be deployed within a Kubernetes cluster to leverage the benefits of container orchestration for managing and scaling the microservices efficiently. The deployment process is streamlined through the use of Helm, a package manager for Kubernetes that facilitates the installation, upgrade, and management of Kubernetes applications. +Each microservice within OCM is equipped with its own Helm chart located in the service's folder. These Helm charts define the Kubernetes resources required for deploying and running the service, including Deployments, Services, and any necessary ConfigMaps or Secrets. + +### Docker Compose (Local) + +For local development and testing purposes, the OCM stack can also be run using Docker Compose with the following command: + +```bash +docker compose up -d +``` + +This command builds the service container images and starts the stack. It's a convenient way to quickly bring up the OCM environment on a local machine for development, testing, or demonstration purposes. + +#### Starting multiple instances of OCM + +To demonstrate ```bash ./scripts/start_instance.sh ``` @@ -48,10 +58,24 @@ OCM (Organizational Credential Manager) is a Node.js-based microservice system d > To stop instances that were started using the above command, use `./scripts/stop_instance.sh`. -## Example Flows (OCM Usage) +## Local Development + +To run each service locally, the following prerequisites are needed: + +- Node.js (installed on the local machine) +- pnpm (package manager) +- Docker Compose (for running NATS server and S3 storage) + +Before starting a service, create a `.env` file in the service's directory based on the `.env.example` provided, renaming it to `.env`. + +## Documentation and Example Flows + +For detailed usage and example flows, please refer to the [Postman Collection](documentation/Gaia-X_Organization_Credential_Manager.postman_collection.json) and the [OCM Example Flows](documentation/ocm-example-flows.md). + +## Security -Please refer to [OCM-flow-overview](documentation/ocm-flow-overview.md) +Note: Authentication and Authorization mechanisms are considered outside the scope of this project and should be addressed at the infrastructure level or through other means. ## License -This project is licensed under the [Apache 2.0 License](LICENSE) +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/connection-manager/GDPR.md b/apps/connection-manager/GDPR.md deleted file mode 100644 index 6ffb8825b9df532e1a928d51896a3ec586be2fb5..0000000000000000000000000000000000000000 --- a/apps/connection-manager/GDPR.md +++ /dev/null @@ -1,30 +0,0 @@ -# GDPR Compliance Document - -The objective of this document is to detail, the data being stored and proccessed by the Organization Credential Manager's, Connection Manger. - -## What information is stored - -### Source User Information - -The email id received from the user. - -### Technical User Information (Public) - -- DID of the OCM agent -- DID of the other participant in the connection -- Connection Status -- Connection Internal Ids -- Date created and updated -- Holder email as well as wallet name is stored in DB - -## How is the information stored - -The Source User Information and Technical User Information is encrypted using the Private Key of the Organizations SSI Agent and stored internally (on the agent) on PostgreSQL and externally/ metadata (shared between the OCM services) on PostgreSQL of Organization. - -## Who can access the information - -The Source User Information and Technical User Information both are accessible only by the Organization specific SSI agent's private key. - -## How long will the information stay - -The Source User Information and Technical User Information is wiped out according to the retention periods (not defined yet). diff --git a/apps/connection-manager/Gaia-x Connection Manager API.postman_collection.json b/apps/connection-manager/Gaia-x Connection Manager API.postman_collection.json deleted file mode 100644 index 003cab2a15419bd00164653b972274faeb5b2666..0000000000000000000000000000000000000000 --- a/apps/connection-manager/Gaia-x Connection Manager API.postman_collection.json +++ /dev/null @@ -1,611 +0,0 @@ -{ - "info": { - "_postman_id": "1da5476b-7f1e-4a30-8dba-b348f7ac6672", - "name": "Gaia-x Connection Manager API", - "description": "API documentation for GAIA-X Connection Manager", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "10250261" - }, - "item": [ - { - "name": "Fetch connection by connection id", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connections/adede599-a398-49ea-b115-b8522d17f714", - "host": ["{{baseUrl}}"], - "path": ["v1", "connections", "adede599-a398-49ea-b115-b8522d17f714"] - } - }, - "response": [ - { - "name": "Fetch connection by connection id", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connections/adede599-a398-49ea-b115-b8522d17f714", - "host": ["{{baseUrl}}"], - "path": [ - "v1", - "connections", - "adede599-a398-49ea-b115-b8522d17f714" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 02:02:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "430" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"1ae-MrfZd4/V8Lo8suMlUBONZ1OD7d4\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connections fetch successfully\",\n \"data\": {\n \"records\": {\n \"id\": \"5457aa3a-9885-4f2c-83c4-54189102dcb2\",\n \"connectionId\": \"adede599-a398-49ea-b115-b8522d17f714\",\n \"status\": \"trusted\",\n \"participantDid\": \"5hfjHDaZMTknD4kVApcXnC\",\n \"theirDid\": \"UZkhCWb66vXWpDiBK6jJD9\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"createdDate\": \"2023-04-05T10:06:13.140Z\",\n \"updatedDate\": \"2023-04-05T10:06:13.761Z\",\n \"isActive\": true,\n \"isReceived\": true\n }\n }\n}" - } - ] - }, - { - "name": "Fetch list of connections with pagination and queries", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connections?page=0&pageSize=25&status&participantDID", - "host": ["{{baseUrl}}"], - "path": ["v1", "connections"], - "query": [ - { - "key": "page", - "value": "0" - }, - { - "key": "pageSize", - "value": "25" - }, - { - "key": "status", - "value": null - }, - { - "key": "participantDID", - "value": null - } - ] - } - }, - "response": [ - { - "name": "Fetch list of connections with pagination and queries", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connections?page=0&pageSize=25&status&participantDID", - "host": ["{{baseUrl}}"], - "path": ["v1", "connections"], - "query": [ - { - "key": "page", - "value": "0" - }, - { - "key": "pageSize", - "value": "25" - }, - { - "key": "status", - "value": null - }, - { - "key": "participantDID", - "value": null - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 02:00:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "8254" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"203e-T9AKdRFxK834ZNwao8c6y6TX3wc\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connections fetch successfully\",\n \"data\": {\n \"count\": 232,\n \"records\": [\n {\n \"id\": \"008e3953-15d9-421c-ba30-3b06661595fe\",\n \"connectionId\": \"a11a0f89-bdc7-468d-a76f-0f2652af1447\",\n \"status\": \"invited\",\n \"participantDid\": \"PYk6P7VfYMHTEqdnQBEtuY\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-04-06T11:36:24.395Z\",\n \"updatedDate\": \"2023-04-06T11:36:24.395Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"015b95e0-6a43-4b11-9d2d-89e17fddfcc2\",\n \"connectionId\": \"c3d767ea-9e02-4076-8e92-d2a7942e4800\",\n \"status\": \"invited\",\n \"participantDid\": \"9obzVbmTx3oCNLoQeKdS1U\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-23T07:52:11.931Z\",\n \"updatedDate\": \"2023-03-23T07:52:11.931Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0215762c-e581-46e5-a789-4ff13adc3dff\",\n \"connectionId\": \"52ae2374-4c9e-4abd-9da5-aabe98d6acb4\",\n \"status\": \"invited\",\n \"participantDid\": \"Lg6tP3d456p6oyereiCiKU\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-05-10T09:28:45.850Z\",\n \"updatedDate\": \"2023-05-10T09:28:45.850Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"02c81e42-7cfa-47fa-a819-dfbc14042ec2\",\n \"connectionId\": \"7cb7cdec-fd69-4c3a-93f4-ab3f85bfa7cb\",\n \"status\": \"invited\",\n \"participantDid\": \"HJ66AqHk4fpvbPXUjb9VqN\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-09T10:24:37.644Z\",\n \"updatedDate\": \"2023-03-09T10:24:37.644Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"03563562-d0dc-4c0d-804a-42adbfd4ea4d\",\n \"connectionId\": \"9d756266-f9fc-4a12-88b2-5123166aebae\",\n \"status\": \"invited\",\n \"participantDid\": \"FTzEn6oyH6peQigjc5pyxp\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-22T13:24:10.790Z\",\n \"updatedDate\": \"2023-03-22T13:24:10.790Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"049020d5-8c21-4ea0-89b0-39426e385c73\",\n \"connectionId\": \"6a625623-1ae1-4c26-ae9e-8ae7043a439a\",\n \"status\": \"trusted\",\n \"participantDid\": \"95GnbqtZSARbgVDRgstB6A\",\n \"theirDid\": \"QhiAVXCFc4aFeo8Xeio7cD\",\n \"theirLabel\": \"cef7d748-0e1e-409d-a992-eed8fde1f603\",\n \"createdDate\": \"2023-05-09T13:32:59.666Z\",\n \"updatedDate\": \"2023-05-09T13:43:19.978Z\",\n \"isActive\": true,\n \"isReceived\": false\n },\n {\n \"id\": \"04f11557-4157-4083-a73f-f6c1dc233583\",\n \"connectionId\": \"058d420f-af66-4489-be17-2e5bcdd4d7cd\",\n \"status\": \"trusted\",\n \"participantDid\": \"Fkr8PoGdHGHPEHsUiZpVD2\",\n \"theirDid\": \"Ue61ZtAw1RVzfU42JHbXcU\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"createdDate\": \"2023-05-09T08:20:47.044Z\",\n \"updatedDate\": \"2023-05-09T08:20:48.154Z\",\n \"isActive\": true,\n \"isReceived\": true\n },\n {\n \"id\": \"04f7aa6c-dcc2-4a3c-9300-9b21e8045a17\",\n \"connectionId\": \"2de29e2f-50cc-45f2-95ef-1770bc3c7b9d\",\n \"status\": \"trusted\",\n \"participantDid\": \"Mmik8v2w5DrZdi755maeFJ\",\n \"theirDid\": \"Ud2wNAWLFEaBaRvdUKwwVa\",\n \"theirLabel\": \"557a4089-4e72-402c-8422-5ddaac2f3d1b\",\n \"createdDate\": \"2023-03-27T07:35:28.046Z\",\n \"updatedDate\": \"2023-03-27T07:35:38.401Z\",\n \"isActive\": true,\n \"isReceived\": false\n },\n {\n \"id\": \"055ad5f4-d9f3-46e0-9279-8f8c3071ae32\",\n \"connectionId\": \"7e44f02f-9c4f-4c65-a028-d2f90f907ee5\",\n \"status\": \"trusted\",\n \"participantDid\": \"5rBDJq3yK3MLCe8pny4kLz\",\n \"theirDid\": \"RbaMdHuU8PNAHYi2YouicD\",\n \"theirLabel\": \"44f30cb6-7b3b-4a84-861b-767fe670ce26\",\n \"createdDate\": \"2023-05-22T13:47:45.062Z\",\n \"updatedDate\": \"2023-05-22T13:48:16.503Z\",\n \"isActive\": true,\n \"isReceived\": false\n },\n {\n \"id\": \"0605a933-8f4c-4cd4-b816-79bc17ebc47a\",\n \"connectionId\": \"d8f473d7-1055-4512-bd27-60394314ef2f\",\n \"status\": \"invited\",\n \"participantDid\": \"WBduFTtbz3si6RnebYh91m\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-07T08:09:36.156Z\",\n \"updatedDate\": \"2023-03-07T08:09:36.156Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"06954fec-600c-4d97-81e3-b65d2c8a4d90\",\n \"connectionId\": \"98e3538d-bb71-44e3-8ee4-4999ab357e8c\",\n \"status\": \"invited\",\n \"participantDid\": \"PafruvwBVEqSWJtXCq16Ge\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-05-22T10:27:14.205Z\",\n \"updatedDate\": \"2023-05-22T10:27:14.205Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0804f8c0-9aff-43c6-a473-344369c9ddc7\",\n \"connectionId\": \"92ffb41e-0190-4731-99ca-af4308b0357a\",\n \"status\": \"complete\",\n \"participantDid\": \"TBkKc84kS2DELsDceQDHFh\",\n \"theirDid\": \"8qcNQgxQfAGJYa8mjgvjfB\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"createdDate\": \"2023-04-24T09:17:55.082Z\",\n \"updatedDate\": \"2023-04-24T09:20:49.861Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"08b49296-5adb-416a-ba63-7d36cef4d6cd\",\n \"connectionId\": \"6bf8ecb9-4ce2-4fd7-8eec-73094fd118fc\",\n \"status\": \"trusted\",\n \"participantDid\": \"QZQH23QAKuMJxzwUQpXQUG\",\n \"theirDid\": \"31sxM8gpGFTU7YZ58q7rMB\",\n \"theirLabel\": \"e9cbfec0-6575-4025-aa6e-bedf7b7c5938\",\n \"createdDate\": \"2023-05-15T11:29:05.256Z\",\n \"updatedDate\": \"2023-05-15T11:29:10.037Z\",\n \"isActive\": true,\n \"isReceived\": false\n },\n {\n \"id\": \"09e6e5c4-2b4e-4610-82e9-7dac9435fd59\",\n \"connectionId\": \"14e554fe-c9da-4881-afe7-1d92bffe6eb6\",\n \"status\": \"requested\",\n \"participantDid\": \"My7fYuLyF7ptsMnBn5d7xH\",\n \"theirDid\": \"\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"createdDate\": \"2023-05-09T11:15:42.452Z\",\n \"updatedDate\": \"2023-05-09T11:15:42.557Z\",\n \"isActive\": false,\n \"isReceived\": true\n },\n {\n \"id\": \"0b3435e3-cbed-4635-ab55-cacdaafbc1cb\",\n \"connectionId\": \"cdca3644-2147-47ce-abd4-7a82e6195d19\",\n \"status\": \"trusted\",\n \"participantDid\": \"8qcNQgxQfAGJYa8mjgvjfB\",\n \"theirDid\": \"TBkKc84kS2DELsDceQDHFh\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"createdDate\": \"2023-04-24T09:20:48.866Z\",\n \"updatedDate\": \"2023-04-24T09:20:49.758Z\",\n \"isActive\": true,\n \"isReceived\": true\n },\n {\n \"id\": \"0ba240e7-0663-4220-b32c-6e9beaf8a39b\",\n \"connectionId\": \"3020b9cc-51c8-4ae7-9fa5-05f873260a6e\",\n \"status\": \"invited\",\n \"participantDid\": \"97rZZnBjDiQWVkNEu5kxoP\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-04-06T11:43:20.246Z\",\n \"updatedDate\": \"2023-04-06T11:43:20.246Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0c0baac0-b452-46de-8796-a841e7661cb8\",\n \"connectionId\": \"f97bbf2b-9186-4326-80f6-d4235ef019b2\",\n \"status\": \"invited\",\n \"participantDid\": \"9bHihwYECeRbDyAWzGYrkR\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-04-04T14:40:22.948Z\",\n \"updatedDate\": \"2023-04-04T14:40:22.948Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0d2ac070-b316-4d48-9c49-bcd68e626f00\",\n \"connectionId\": \"88f8d883-f5fc-4781-9a4c-04238fcd233b\",\n \"status\": \"invited\",\n \"participantDid\": \"66WLh3hCCSehqE4QoeLKD2\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-05-10T09:31:21.937Z\",\n \"updatedDate\": \"2023-05-10T09:31:21.937Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0d44b8f7-e703-405d-ac48-f33e5261bda5\",\n \"connectionId\": \"e823cd0b-8bd3-46f7-9866-a949f8adb493\",\n \"status\": \"invited\",\n \"participantDid\": \"C9rZe9uuw9ogqw8FHPJx28\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-25T14:57:16.527Z\",\n \"updatedDate\": \"2023-03-25T14:57:16.527Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0e5bce8f-4c92-4583-8413-11701f49fd14\",\n \"connectionId\": \"77bf538d-e2ae-4310-a45f-a4a51f26f02f\",\n \"status\": \"complete\",\n \"participantDid\": \"QLLQtZxcq7g8exUMYCAzJL\",\n \"theirDid\": \"2mcHSKBnpbQzzq7Kte8Fbi\",\n \"theirLabel\": \"de3d717c-fcb0-49fb-8bff-1e5a4acdc280\",\n \"createdDate\": \"2023-05-22T01:42:55.707Z\",\n \"updatedDate\": \"2023-05-22T01:43:24.442Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"0e7aae40-202d-4d12-968e-b93eab0858eb\",\n \"connectionId\": \"c4326fe8-dfb0-4c3c-9e26-068e01733abc\",\n \"status\": \"invited\",\n \"participantDid\": \"3ADpcR1D11ozo5UNWurLVY\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-05-10T12:19:56.914Z\",\n \"updatedDate\": \"2023-05-10T12:19:56.913Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"10bf37e2-f5b5-4e97-9c87-6e09bf723bce\",\n \"connectionId\": \"4aa93902-729d-42ad-b224-c21390055bdf\",\n \"status\": \"invited\",\n \"participantDid\": \"Kq7H3nDWnQhXYe5yosR1J7\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-05-10T09:57:05.517Z\",\n \"updatedDate\": \"2023-05-10T09:57:05.517Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"10dea699-a127-4082-b25e-68c128c937ee\",\n \"connectionId\": \"df7a1b85-ea59-40fc-9520-6ae59651eda0\",\n \"status\": \"invited\",\n \"participantDid\": \"Xekj3zM5wUQ1jvaL4cv4Ay\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-07T08:11:02.103Z\",\n \"updatedDate\": \"2023-03-07T08:11:02.103Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"114e8be7-49cd-4581-9675-06650833f1f1\",\n \"connectionId\": \"655fdf48-6ff9-4451-9f73-88621750a3fa\",\n \"status\": \"invited\",\n \"participantDid\": \"BrMoyqzb92hX6Xm2t6wNs5\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-27T07:20:27.591Z\",\n \"updatedDate\": \"2023-03-27T07:20:27.591Z\",\n \"isActive\": false,\n \"isReceived\": false\n },\n {\n \"id\": \"11def929-68a8-4464-bae6-e9bed225c68d\",\n \"connectionId\": \"61154910-3a13-4e65-b151-d0b9dfec9ecf\",\n \"status\": \"invited\",\n \"participantDid\": \"KDeiHYWP2Y5YgXSPbaZAW4\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2023-03-30T11:12:13.346Z\",\n \"updatedDate\": \"2023-03-30T11:12:13.346Z\",\n \"isActive\": false,\n \"isReceived\": false\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Fetch connection information by query id or did ", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connection-information?connectionId=6a625623-1ae1-4c26-ae9e-8ae7043a439a&did", - "host": ["{{baseUrl}}"], - "path": ["v1", "connection-information"], - "query": [ - { - "key": "connectionId", - "value": "6a625623-1ae1-4c26-ae9e-8ae7043a439a" - }, - { - "key": "did", - "value": null - } - ] - } - }, - "response": [ - { - "name": "Fetch connection information by query id or did ", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/connection-information?connectionId=6a625623-1ae1-4c26-ae9e-8ae7043a439a&did", - "host": ["{{baseUrl}}"], - "path": ["v1", "connection-information"], - "query": [ - { - "key": "connectionId", - "value": "6a625623-1ae1-4c26-ae9e-8ae7043a439a" - }, - { - "key": "did", - "value": null - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 02:09:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "1294" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"50e-QdCj91548b/gSNWPOH6hEgXsq6k\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connection information fetch successfully\",\n \"data\": {\n \"records\": {\n \"issueCredentials\": [\n {\n \"id\": \"d1b0a2e0-2d42-40c2-a1bf-f00187ac34c1\",\n \"credentialId\": \"abfd32ca-80fc-439d-ab62-1e19f909f670\",\n \"credDefId\": \"BsfUfTECZPVRnoCgHUfB3p:3:CL:46833:OCM1-passport\",\n \"threadId\": \"619094b6-dae4-4d35-83f6-bd3ef9a78ff3\",\n \"state\": \"done\",\n \"principalDid\": \"QhiAVXCFc4aFeo8Xeio7cD\",\n \"connectionId\": \"6a625623-1ae1-4c26-ae9e-8ae7043a439a\",\n \"createdDate\": \"2023-05-09T13:41:15.067Z\",\n \"updatedDate\": \"2023-05-09T13:41:29.640Z\",\n \"expirationDate\": null\n },\n {\n \"id\": \"8658a92b-807b-4627-a180-d9f8fd2389b5\",\n \"credentialId\": \"047978b7-ea0f-4ed9-92df-7bd01a91576b\",\n \"credDefId\": \"BsfUfTECZPVRnoCgHUfB3p:3:CL:50014:LoginCredentials2\",\n \"threadId\": \"f3d65d44-0735-4712-a9db-5dfb2489a58d\",\n \"state\": \"offer-sent\",\n \"principalDid\": \"QhiAVXCFc4aFeo8Xeio7cD\",\n \"connectionId\": \"6a625623-1ae1-4c26-ae9e-8ae7043a439a\",\n \"createdDate\": \"2023-05-22T07:19:37.637Z\",\n \"updatedDate\": \"2023-05-22T07:19:37.638Z\",\n \"expirationDate\": null\n }\n ],\n \"presentProofs\": [\n {\n \"id\": \"1daf4f41-d12e-40b0-8ff0-e03436735ade\",\n \"proofRecordId\": \"8eb6beb7-3f38-4482-90c4-14b27342b35f\",\n \"connectionId\": \"6a625623-1ae1-4c26-ae9e-8ae7043a439a\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"done\",\n \"createdDate\": \"2023-05-09T13:42:09.025Z\",\n \"updatedDate\": \"2023-05-09T13:43:19.967Z\"\n }\n ]\n }\n }\n}" - } - ] - }, - { - "name": "Accept connection invitation", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"https://ssi-dev.vereign.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiJmYzM1ODNhYi1kZjEyLTRiNmEtOGYxYi0yY2I2NTk1NWFkMzIiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiOEoxVWdoRmFpZ3NUWDlKeHhuV1haUkRzWUtHdU53dDlFRkY5dXN6Q1h0dDQiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9zc2ktZGV2LnZlcmVpZ24uY29tOjQ0My9vY20vZGlkY29tbSIsInJvdXRpbmdLZXlzIjpbXX0\",\n \"autoAcceptConnection\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/accept-connection-invitation", - "host": ["{{baseUrl}}"], - "path": ["v1", "accept-connection-invitation"] - } - }, - "response": [ - { - "name": "Accept connection invitation", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"https://ssi-dev.vereign.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiJmYzM1ODNhYi1kZjEyLTRiNmEtOGYxYi0yY2I2NTk1NWFkMzIiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiOEoxVWdoRmFpZ3NUWDlKeHhuV1haUkRzWUtHdU53dDlFRkY5dXN6Q1h0dDQiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9zc2ktZGV2LnZlcmVpZ24uY29tOjQ0My9vY20vZGlkY29tbSIsInJvdXRpbmdLZXlzIjpbXX0\",\n \"autoAcceptConnection\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/accept-connection-invitation", - "host": ["{{baseUrl}}"], - "path": ["v1", "accept-connection-invitation"] - } - }, - "status": "Accepted", - "code": 202, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 02:12:02 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "1477" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"5c5-XLhvcE9qBLdJDJdTDANXXroqTQY\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 202,\n \"message\": \"Accepted Connection Request\",\n \"data\": {\n \"_tags\": {\n \"state\": \"invited\",\n \"verkey\": \"Fitz5HGemw3rW1agFPZ222LAsAQHSB7Q4NPdtM8uCfx4\",\n \"role\": \"invitee\",\n \"invitationKey\": \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n },\n \"metadata\": {},\n \"id\": \"85ee9709-639e-44b7-aaca-93aa1a7c8db5\",\n \"createdAt\": \"2023-06-02T02:12:01.910Z\",\n \"did\": \"U1ghVZwqoDcv55uVjiiGRZ\",\n \"didDoc\": {\n \"@context\": \"https://w3id.org/did/v1\",\n \"publicKey\": [\n {\n \"id\": \"U1ghVZwqoDcv55uVjiiGRZ#1\",\n \"controller\": \"U1ghVZwqoDcv55uVjiiGRZ\",\n \"type\": \"Ed25519VerificationKey2018\",\n \"publicKeyBase58\": \"Fitz5HGemw3rW1agFPZ222LAsAQHSB7Q4NPdtM8uCfx4\"\n }\n ],\n \"service\": [\n {\n \"id\": \"U1ghVZwqoDcv55uVjiiGRZ#IndyAgentService\",\n \"serviceEndpoint\": \"https://ssi-dev.vereign.com:443/ocm/didcomm\",\n \"type\": \"IndyAgent\",\n \"priority\": 0,\n \"recipientKeys\": [\n \"Fitz5HGemw3rW1agFPZ222LAsAQHSB7Q4NPdtM8uCfx4\"\n ],\n \"routingKeys\": []\n }\n ],\n \"authentication\": [\n {\n \"publicKey\": \"U1ghVZwqoDcv55uVjiiGRZ#1\",\n \"type\": \"Ed25519SignatureAuthentication2018\"\n }\n ],\n \"id\": \"U1ghVZwqoDcv55uVjiiGRZ\"\n },\n \"verkey\": \"Fitz5HGemw3rW1agFPZ222LAsAQHSB7Q4NPdtM8uCfx4\",\n \"theirLabel\": \"ssi-abstraction-agent\",\n \"state\": \"requested\",\n \"role\": \"invitee\",\n \"alias\": \"connection-received\",\n \"autoAcceptConnection\": true,\n \"invitation\": {\n \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n \"@id\": \"fc3583ab-df12-4b6a-8f1b-2cb65955ad32\",\n \"label\": \"ssi-abstraction-agent\",\n \"recipientKeys\": [\n \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n ],\n \"serviceEndpoint\": \"https://ssi-dev.vereign.com:443/ocm/didcomm\",\n \"routingKeys\": []\n },\n \"multiUseInvitation\": false\n }\n}" - } - ] - }, - { - "name": "Health check", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/health", - "host": ["{{baseUrl}}"], - "path": ["v1", "health"] - } - }, - "response": [ - { - "name": "Health check", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/health", - "host": ["{{baseUrl}}"], - "path": ["v1", "health"] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 01:57:14 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "93" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"5d-6fAWdfgLj4ONHU0kBMP++Ryy1mQ\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Fri Jun 02 2023 01:57:14 GMT+0000 (Coordinated Universal Time)\"\n}" - } - ] - }, - { - "name": "Create new connection invitation", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"autoAcceptConnection\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/invitation-url?alias=trust", - "host": ["{{baseUrl}}"], - "path": ["v1", "invitation-url"], - "query": [ - { - "key": "alias", - "value": "trust" - } - ] - } - }, - "response": [ - { - "name": "Create new connection invitation", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"autoAcceptConnection\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/invitation-url?alias=trust", - "host": ["{{baseUrl}}"], - "path": ["v1", "invitation-url"], - "query": [ - { - "key": "alias", - "value": "trust" - } - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 01:58:59 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "2137" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"859-jOPeDmwN60Q2TJ0P9cGI3mOlf2A\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connection created successfully\",\n \"data\": {\n \"invitationUrl\": \"https://ssi-dev.vereign.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiJmYzM1ODNhYi1kZjEyLTRiNmEtOGYxYi0yY2I2NTk1NWFkMzIiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiOEoxVWdoRmFpZ3NUWDlKeHhuV1haUkRzWUtHdU53dDlFRkY5dXN6Q1h0dDQiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9zc2ktZGV2LnZlcmVpZ24uY29tOjQ0My9vY20vZGlkY29tbSIsInJvdXRpbmdLZXlzIjpbXX0\",\n \"invitation\": {\n \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n \"@id\": \"fc3583ab-df12-4b6a-8f1b-2cb65955ad32\",\n \"label\": \"ssi-abstraction-agent\",\n \"recipientKeys\": [\n \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n ],\n \"serviceEndpoint\": \"https://ssi-dev.vereign.com:443/ocm/didcomm\",\n \"routingKeys\": []\n },\n \"connection\": {\n \"_tags\": {},\n \"metadata\": {},\n \"id\": \"2078a34b-a7fe-4e22-91fc-9797c0b42505\",\n \"createdAt\": \"2023-06-02T01:58:58.280Z\",\n \"did\": \"EP7amWYvKAUL4t3iS7vc1m\",\n \"didDoc\": {\n \"@context\": \"https://w3id.org/did/v1\",\n \"publicKey\": [\n {\n \"id\": \"EP7amWYvKAUL4t3iS7vc1m#1\",\n \"controller\": \"EP7amWYvKAUL4t3iS7vc1m\",\n \"type\": \"Ed25519VerificationKey2018\",\n \"publicKeyBase58\": \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n }\n ],\n \"service\": [\n {\n \"id\": \"EP7amWYvKAUL4t3iS7vc1m#IndyAgentService\",\n \"serviceEndpoint\": \"https://ssi-dev.vereign.com:443/ocm/didcomm\",\n \"type\": \"IndyAgent\",\n \"priority\": 0,\n \"recipientKeys\": [\n \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n ],\n \"routingKeys\": []\n }\n ],\n \"authentication\": [\n {\n \"publicKey\": \"EP7amWYvKAUL4t3iS7vc1m#1\",\n \"type\": \"Ed25519SignatureAuthentication2018\"\n }\n ],\n \"id\": \"EP7amWYvKAUL4t3iS7vc1m\"\n },\n \"verkey\": \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\",\n \"state\": \"invited\",\n \"role\": \"inviter\",\n \"alias\": \"trust\",\n \"autoAcceptConnection\": true,\n \"invitation\": {\n \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n \"@id\": \"fc3583ab-df12-4b6a-8f1b-2cb65955ad32\",\n \"label\": \"ssi-abstraction-agent\",\n \"recipientKeys\": [\n \"8J1UghFaigsTX9JxxnWXZRDsYKGuNwt9EFF9uszCXtt4\"\n ],\n \"serviceEndpoint\": \"https://ssi-dev.vereign.com:443/ocm/didcomm\",\n \"routingKeys\": []\n },\n \"multiUseInvitation\": false\n },\n \"invitationUrlShort\": \"https://ssi-dev.vereign.com/ocm/connection/v1/url/d82b96f4-5966-4ada-a171-88dd4f80394a\"\n }\n}" - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [""] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "https://ssi-dev.vereign.com/ocm/connection" - } - ] -} diff --git a/apps/connection-manager/LICENSE b/apps/connection-manager/LICENSE index 52521c8796ccdb68385bf0618ca03def18372a62..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/connection-manager/LICENSE +++ b/apps/connection-manager/LICENSE @@ -1,427 +1,202 @@ -GAIA-X "Connection Manager" -is the microservice which handles the feature related to connection between the -two Aries agents.The service handles connections REST endpoints, events and calls -to other services related to connections in the Organizational Credential Manager - - Copyright 2022 Vereign AG - -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. - - -This Connection Manager incorporates - -"elastic/ecs-winston-format" - -, a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This Connection Manager also incorporates - -"nestjs" - -, a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"prisma client" - -, an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Connection Manager also incorporates - -"types/node" - -, type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"express" - -, a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This Connection Manager also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This Connection Manager also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This Connection Manager also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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 + 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 2024 Gaia-X + + 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. - - -This Connection Manager also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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. - - -This Connection Manager also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This Connection Manager also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Connection Manager also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/connection-manager/README.md b/apps/connection-manager/README.md index 927fcc8d707fffe56c9c4d615e86ec607cf96913..52acd9eaa3fd699e5737c0c116a74774214c74b6 100644 --- a/apps/connection-manager/README.md +++ b/apps/connection-manager/README.md @@ -1,140 +1,64 @@ # OCM Connection Manager -## Description - -<hr/> - -The connection manager is the microservice responsible for handling the features related to connection between aries agents. -The service implements REST endpoints, events and calls to other services related to connections in the Organizational Credential Manager. - -#### Security note - -`Man in the mid` security concern will be address in Phase II of of the project. It was discussed multiple times, and one of the options is to use [TRAIN API](https://train.trust-scheme.de/info/) . +## Introduction +The OCM Connection Manager API enables you to: +- Create and accept invitations +- Create self-connections +- List all connections +- Retrieve a connection by ID +- Block connections + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | ## Usage -<hr/> - -### Swagger Documentation: - -[Swagger/OpenAPI](swagger.json) - -## Installation - -<hr/> - -### Pre-requisites - -- pnpm -- docker -- docker-compose -- postgres -- NATS Server - -### OCM Services Dependencies - -- SSI Abstraction -- Principal Manager -- Attestation Manager -- Proof Manager - -## Running the app - -<hr/> - -**Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.** - -**The .env files are in the infrastructure repository under /env** - -```bash - ## production: - ./deployment/ci - ## development: - ./deployment/dev -``` - -- (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles. - -- Run while in **"infrastructure"** project: - +Start in development mode: ```bash -$ docker-compose up --build conn-m +pnpm start ``` -to run only Connection Manager or +### Operations +> **Note:** All requests need a `tenantId` query parameter. +#### Create an Invitation ```bash -$ docker-compose up --build -``` - -to run all the services. - -### Environment variables required - -``` -1. PORT -2. DATABASE_URL -3. NATS_URL -4. AGENT_URL -``` - -### Outgoing communication services - +curl -X POST http://ocm-indy.xfsc.dev/v1/invitations?tenantId=<tenantId> ``` -1. PRINCIPAL MANAGER -2. ATTESTATION MANAGER -3. PROOF MANAGER +Response: +```json +{ + "status": 201, + "data": { + "invitationUrl": "http://ocm-indy.xfcs.dev?oob=..." + } +} ``` -### Incoming communication services - -``` -1. SSI-ABSTRACTION -2. PROOF MANAGER -3. ATTESTATION MANAGER -``` - -### Supported features - -``` -1. Nats endpoint to update connection status -2. Create invitation URL. -3. Provide connection information. -4. Provide a list of connections. -5. Nats endpoint to get connection by ID. -6. Nats endpoint to make connection trusted. -7. Accept connection invitation. +#### Accept an Invitation +```bash +curl -X POST -d '{"invitationUrl":"..."}' http://ocm-indy.xfsc.dev/v1/invitations/accept?tenantId=<tenantId> ``` -## Test - -<hr/> - +#### Create a Self-Connection ```bash -# unit tests -$ pnpm test - -# e2e tests -$ pnpm test:e2e - -# test coverage -$ pnpm test:cov +curl -X POST http://ocm-indy.xfsc.dev/v1/connections?tenantId=<tenantId> ``` -## GDPR - -<hr/> - -[GDPR](GDPR.md) - -## Dependencies - -<hr/> - -[Dependencies](package.json) +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). ## License - -<hr/> - -[Apache 2.0 license](LICENSE) +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/connection-manager/openapi.json b/apps/connection-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..3937de62aa9b8117ddf265ba0a02c0f6769375f4 --- /dev/null +++ b/apps/connection-manager/openapi.json @@ -0,0 +1,488 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/connections": { + "get": { + "operationId": "ConnectionsController_getAll", + "summary": "Fetch a list of connections", + "description": "This call provides a list of connections for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Connections fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Connections fetched successfully": { + "value": { + "statusCode": 200, + "message": "Connections fetched successfully", + "data": [] + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Connections"] + }, + "post": { + "operationId": "ConnectionsController_createWithSelf", + "summary": "Create a connection", + "description": "This call creates a self connection for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "201": { + "description": "Connection created successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Connection created successfully": { + "value": { + "statusCode": 201, + "message": "Connection created successfully", + "data": {} + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Connections"] + } + }, + "/v1/connections/{connectionId}": { + "get": { + "operationId": "ConnectionsController_getById", + "summary": "Fetch a connection by ID", + "description": "This call provides a connection for a given tenant and connection ID", + "parameters": [ + { + "name": "connectionId", + "required": true, + "in": "path", + "description": "The connection ID", + "example": "71b784a3", + "schema": { "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Connection fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Connection fetched successfully": { + "value": { + "statusCode": 200, + "message": "Connection fetched successfully", + "data": {} + } + } + } + } + } + }, + "404": { + "description": "Connection not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Connection not found": { + "value": { + "statusCode": 404, + "message": "Connection not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Connections"] + } + }, + "/v1/connections/{idOrDid}/block": { + "post": { + "operationId": "ConnectionsController_block", + "summary": "Block a connection", + "description": "This call blocks a connection for a given tenant and connection ID", + "parameters": [ + { + "name": "idOrDid", + "required": true, + "in": "path", + "description": "The connection ID or DID", + "example": "8d74c6ec-fa3e-4a09-91fb-5fd0062da835", + "schema": { "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Connection blocked successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Connection blocked successfully": { + "value": { + "statusCode": 200, + "message": "Connection blocked successfully", + "data": {} + } + } + } + } + } + }, + "404": { + "description": "Connection not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Connection not found": { + "value": { + "statusCode": 404, + "message": "Connection not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Connections"] + } + }, + "/v1/invitations": { + "post": { + "operationId": "InvitationsController_createInvitation", + "summary": "Create a new invitation", + "description": "This call creates a new invitation for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Invitation created successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invitation created successfully": { + "value": { + "statusCode": 200, + "message": "Invitation created successfully", + "data": { + "invitationUrl": "https://example.com/invitation" + } + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Failed to create invitation", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Failed to create invitation": { + "value": { + "statusCode": 500, + "message": "Failed to create invitation", + "data": null + } + } + } + } + } + } + }, + "tags": ["Invitations"] + } + }, + "/v1/invitations/receive": { + "post": { + "operationId": "InvitationsController_receiveInvitation", + "summary": "Receive an invitation", + "description": "This call receives an invitation for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReceiveInvitationPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Invitation received successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invitation received successfully": { + "value": { + "statusCode": 200, + "message": "Invitation received successfully", + "data": { "connectionId": "123" } + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Failed to receive invitation", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Failed to receive invitation": { + "value": { + "statusCode": 500, + "message": "Failed to receive invitation", + "data": null + } + } + } + } + } + } + }, + "tags": ["Invitations"] + } + } + }, + "info": { + "title": "Gaia-X OCM Connection Manager", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "ReceiveInvitationPayload": { + "type": "object", + "properties": { + "invitationUrl": { + "type": "string", + "description": "The invitation URL to receive", + "example": "https://example.com/invitation" + } + }, + "required": ["invitationUrl"] + } + } + } +} diff --git a/apps/connection-manager/package.json b/apps/connection-manager/package.json index f3012db1e1b87f42df41dff396bdedd40192ef06..7c3a526369880540c1cde57583a3a60c04f1c40d 100644 --- a/apps/connection-manager/package.json +++ b/apps/connection-manager/package.json @@ -2,7 +2,9 @@ "name": "@ocm/connection-manager", "version": "1.0.0", "description": "Gaia-X OCM Connection Manager", + "author": "Gaia-X", "contributors": [ + "Berend Sliedrecht <berend@animo.id>", "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" ], "private": true, diff --git a/apps/credential-manager/.env.example b/apps/credential-manager/.env.example index 46fb0f12c103b103384fc98ba4fe8074572450c0..51a6c21368892996863495c406bc77202badc989 100644 --- a/apps/credential-manager/.env.example +++ b/apps/credential-manager/.env.example @@ -4,3 +4,7 @@ NATS_URL=nats://localhost:4222 NATS_USER=nats_user NATS_PASSWORD=nats_password NATS_MONITORING_URL=http://localhost:8222 +POLICIES_URL=http://localhost:4100 +POLICIES_AUTO_REVOCATION_POLICY=policies/xfsc/auto_revocation/1.0 +POLICIES_AUTO_REISSUE_POLICY=policies/xfsc/auto_reissue/1.0 +POLICIES_REFRESH_POLICY=policies/xfsc/refresh/1.0 diff --git a/apps/credential-manager/LICENSE b/apps/credential-manager/LICENSE index 6bc596c6d9ae158f03739f543ee9d26c4fb5e8d6..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/credential-manager/LICENSE +++ b/apps/credential-manager/LICENSE @@ -1,636 +1,202 @@ -GAIA-X "Attestation Manager" -is the microservice which is responsible for handling the features -related to issuance of credentials of the GAIA-X project. It handles REST -endpoints for Schemas, Credential Definitions and Verifiable Credentials. - -Copyright 2022 Vereign AG - -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. - - -This Attestation Manager incorporates - -"elastic/ecs-winston-format", - -a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This Attestation Manager also incorporates - -"nestjs", - -a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma client" - -,an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"types/node" - -,type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/express" - -,type definitions for Express (http://expressjs.com), which is covered by the following -copyright and permission notice: - -Copyright Boris Yankov, China Medical University Hospital, Puneet Arora, and Dylan Frankland. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/jest" - -type definitions for Jest, which is covered by the following copyright and permission notice: - -Copyright Asana (https://asana.com)// Ivo Stratev, jwbay, Alexey Svetliakov, Alex Jover Morales, Allan Lukwago, -Ika, Waseem Dahman, Jamie Mason, Douglas Duteil, Ahn, Jeff Lau, Andrew Makarov, Martin Hochel, Sebastian Sebald, -Andy, Antoine Brault, Gregor Stamać, ExE Boss, Alex Bolenok, Mario Beltrán Alarcón, Tony Hallett, Jason Yu, Pawel Fajfer, -Regev Brody, Alexandre Germain, and Adam Jones. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -and - -"class-transformer" - -,a tool to transform plain object to some instance of class and versa, also to serialize / -deserialize object based on criteria, both of which are covered by the following copyright -and permission notice: - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"express" - -,a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"husky" - -, modern native Git hooks made easy, which is covered by the following copyright and -permission notice: - -Copyright (c) 2021 typicode - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -This Attestation Manager also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This Attestation Manager also incorporates - -"liquibase" - -, liquibase is an open-source database-independent library for tracking, managing and applying database schema change, which is covered -by the following copyright and permission notice: - -Copyright (c) Taylor Buckner <taylora.buckner@gmail.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This Attestation Manager also incorporates - -"pg - node postgres" - -, non-blocking PostgreSQL client for Node.js, which is covered by -the following copyright and permission notice: - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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 + 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 2024 Gaia-X + + 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. - - -This Attestation Manager also incorporates - -"rimraf" - -, a `rm -rf` util for nodejs, which is covered by the following copyright -and permission notice: - -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - -(The ISC License) -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -This Attestation Manager also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This Attestation Manager also incorporates - -"Swagger UI Express" - -, allows to serve auto-generated swagger-ui generated API docs from express, -based on a swagger.json file, which is covered by the following copyright and -permission notice: - -Copyright (c) 2018 Scott IT London - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/credential-manager/README.md b/apps/credential-manager/README.md new file mode 100644 index 0000000000000000000000000000000000000000..40940e30a9423a6a53e5a9253fedd2096c9614f1 --- /dev/null +++ b/apps/credential-manager/README.md @@ -0,0 +1,73 @@ +# OCM Credential Manager + +## Introduction +The OCM Credential Manager API enables you to: +- Fetch credentials, offers and requests +- Revoke credentials +- Accept credential offers +- Evaluate TSA policies for single credentials + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | +| `POLICIES_URL` | TSA Policy Manager URL | | +| `POLICIES_AUTO_REVOCATION_POLICY` | Policy name for auto revocation check | | +| `POLICIES_AUTO_REISSUE_POLICY` | Policy name for auto-reissue check | | +| `POLICIES_REFRESH_POLICY` | Policy name for refresh check | | + +## Usage + +Start in development mode: +```bash +pnpm start +``` + +### Operations +> **Note:** All requests need a `tenantId` query parameter. + +#### Get credential list + +```bash +curl -X GET http://ocm-indy.xfsc.dev/v1/credentials?tenantId=<tenantId> +``` + +Response: + +```json +{ + "status": 200, + "data": [...] +} +``` + +#### Revoke a credential + +```bash +curl -X POST http://ocm-indy.xfsc.dev/v1/credentials/?tenantId=<tenantId> +``` + +Response: + +```json +{ + "status": 201, + "data": {} +} +``` + +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). + +## License +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/credential-manager/openapi.json b/apps/credential-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..c257015939c7d7c29ebcbd5e25933528c41040e8 --- /dev/null +++ b/apps/credential-manager/openapi.json @@ -0,0 +1,1217 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/credentials": { + "get": { + "operationId": "CredentialsController_find", + "summary": "Fetch a list of credentials", + "description": "This call provides a list of credentials for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credentials fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credentials fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credentials fetched successfully", + "data": [{ "id": "71b784a3" }] + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Credentials"] + } + }, + "/v1/credentials/{credentialRecordId}": { + "get": { + "operationId": "CredentialsController_get", + "summary": "Fetch a credential", + "description": "This call provides a credential for a given tenant", + "parameters": [ + { + "name": "credentialRecordId", + "required": true, + "in": "path", + "description": "The credential record ID to retrieve", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential fetched successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Credentials"] + } + }, + "/v1/credentials/{credentialId}/revoke": { + "post": { + "operationId": "CredentialsController_revoke", + "summary": "Revoke a credential", + "description": "This call revokes a credential for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential revoked successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential revoked successfully": { + "value": { + "statusCode": 200, + "message": "Credential revoked successfully", + "data": null + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Credentials"] + } + }, + "/v1/credentials/{credentialId}": { + "delete": { + "operationId": "CredentialsController_delete", + "summary": "Delete a credential", + "description": "This call deletes a credential for a given tenant", + "parameters": [ + { + "name": "credentialRecordId", + "required": true, + "in": "path", + "description": "The credential record ID to delete", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential deleted successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential deleted successfully": { + "value": { + "statusCode": 200, + "message": "Credential deleted successfully", + "data": null + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Credentials"] + } + }, + "/v1/credential-offers": { + "get": { + "operationId": "CredentialOffersController_find", + "summary": "Fetch a list of credential offers", + "description": "This call provides a list of credential offers for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential offers fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offers fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential offers fetched successfully", + "data": [{ "id": "71b784a3" }] + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Offers"] + }, + "post": { + "operationId": "CredentialOffersController_offer", + "summary": "Create a credential offer", + "description": "This call creates a credential offer for a given connection ID and credential definition ID", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/OfferPayload" } + } + } + }, + "responses": { + "200": { + "description": "Credential offer created successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer created successfully": { + "value": { + "statusCode": 200, + "message": "Credential offer created successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer not found": { + "value": { + "statusCode": 404, + "message": "Credential offer not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Credential definition not found": { + "value": { + "statusCode": 404, + "message": "Credential definition not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Offers"] + } + }, + "/v1/credential-offers/{credentialOfferId}": { + "get": { + "operationId": "CredentialOffersController_getById", + "summary": "Fetch a credential offer by ID", + "description": "This call provides a credential offer for a given ID", + "parameters": [ + { + "name": "credentialOfferId", + "required": true, + "in": "path", + "description": "The credential offer ID to retrieve", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential offer fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential offer fetched successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer not found": { + "value": { + "statusCode": 404, + "message": "Credential offer not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Offers"] + } + }, + "/v1/credential-offers/self": { + "post": { + "operationId": "CredentialOffersController_offerToSelf", + "summary": "Create a credential offer to self", + "description": "This call creates a credential offer for a given credential definition ID", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/OfferPayloadSelf" } + } + } + }, + "responses": { + "200": { + "description": "Credential offer created successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer created successfully": { + "value": { + "statusCode": 200, + "message": "Credential offer created successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer not found": { + "value": { + "statusCode": 404, + "message": "Credential offer not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Credential definition not found": { + "value": { + "statusCode": 404, + "message": "Credential definition not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Offers"] + } + }, + "/v1/credential-offers/{credentialOfferId}/accept": { + "post": { + "operationId": "CredentialOffersController_acceptOffer", + "summary": "Accept a credential offer", + "description": "This call accepts a credential offer for a given ID", + "parameters": [ + { + "name": "credentialOfferId", + "required": true, + "in": "path", + "description": "The credential offer ID to retrieve", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential offer accepted successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer accepted successfully": { + "value": { + "statusCode": 200, + "message": "Credential offer accepted successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential offer not found": { + "value": { + "statusCode": 404, + "message": "Credential offer not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Offers"] + } + }, + "/v1/credential-requests": { + "get": { + "operationId": "CredentialRequestsController_find", + "summary": "Fetch a list of credential requests", + "description": "This call provides a list of credential requests for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential requests fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential requests fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential requests fetched successfully", + "data": [{ "id": "71b784a3" }] + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential request not found": { + "value": { + "statusCode": 404, + "message": "Credential request not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Credential Requests"] + } + }, + "/v1/credential-requests/{id}": { + "get": { + "operationId": "CredentialRequestsController_getById", + "summary": "Fetch a credential request by id", + "description": "This call provides a credential request for a given tenant by id", + "parameters": [ + { + "name": "credentialRequestId", + "required": true, + "in": "path", + "description": "The credential request ID to retrieve", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential request fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential request fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential request fetched successfully", + "data": { "id": "71b784a3" } + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential request not found": { + "value": { + "statusCode": 404, + "message": "Credential request not found", + "data": null + } + }, + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Credential Requests"] + } + }, + "/v1/policies/check-reissue": { + "post": { + "operationId": "PoliciesController_checkAutoReissue", + "summary": "Check if a credential can be reissued", + "description": "Check if a credential can be reissued", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PolicyParams" } + } + } + }, + "responses": { + "200": { + "description": "The result of the policy evaluation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "result": { "type": "boolean" } } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Policies"] + } + }, + "/v1/policies/check-revocation": { + "post": { + "operationId": "PoliciesController_checkAutoRevocation", + "summary": "Check if a credential should be revoked", + "description": "Check if a credential should be revoked", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PolicyParams" } + } + } + }, + "responses": { + "200": { + "description": "The result of the policy evaluation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "result": { "type": "boolean" } } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Policies"] + } + }, + "/v1/policies/refresh": { + "post": { + "operationId": "PoliciesController_checkRefresh", + "summary": "Check if a credential should be refreshed", + "description": "Check if a credential should be refreshed", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PolicyParams" } + } + } + }, + "responses": { + "200": { + "description": "The result of the policy evaluation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "result": { "type": "boolean" } } + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Credential not found": { + "value": { + "statusCode": 404, + "message": "Credential not found", + "data": null + } + } + } + } + }, + "description": "" + }, + "500": { + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + }, + "description": "" + } + }, + "tags": ["Policies"] + } + } + }, + "info": { + "title": "Gaia-X OCM Credential Manager", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "Attribute": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "value": { "type": "string" }, + "mimeType": { "type": "string" } + }, + "required": ["name", "value"] + }, + "OfferPayload": { + "type": "object", + "properties": { + "connectionId": { "type": "string" }, + "credentialDefinitionId": { "type": "string" }, + "attributes": { + "type": "array", + "items": { "$ref": "#/components/schemas/Attribute" } + }, + "revocationRegistryDefinitionId": { "type": "string" } + }, + "required": [ + "connectionId", + "credentialDefinitionId", + "attributes", + "revocationRegistryDefinitionId" + ] + }, + "OfferPayloadSelf": { + "type": "object", + "properties": { + "credentialDefinitionId": { "type": "string" }, + "attributes": { + "type": "array", + "items": { "$ref": "#/components/schemas/Attribute" } + }, + "revocationRegistryDefinitionId": { "type": "string" } + }, + "required": [ + "credentialDefinitionId", + "attributes", + "revocationRegistryDefinitionId" + ] + }, + "PolicyParams": { + "type": "object", + "properties": { + "credentialId": { + "type": "string", + "description": "The credential ID to check the policy for" + } + }, + "required": ["credentialId"] + } + } + } +} diff --git a/apps/credential-manager/package.json b/apps/credential-manager/package.json index 804023066064e5bdb81b1fa6f06a926055a59fdd..68a2b38bcc3e2746725230699b9ae78ad4b89fcf 100644 --- a/apps/credential-manager/package.json +++ b/apps/credential-manager/package.json @@ -2,8 +2,9 @@ "name": "@ocm/credential-manager", "version": "1.0.0", "description": "Gaia-X OCM Credential Manager", - "author": "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>", + "author": "Gaia-X", "contributors": [ + "Berend Sliedrecht <berend@animo.id>", "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" ], "private": true, diff --git a/apps/did-manager/LICENSE b/apps/did-manager/LICENSE index 6bc596c6d9ae158f03739f543ee9d26c4fb5e8d6..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/did-manager/LICENSE +++ b/apps/did-manager/LICENSE @@ -1,636 +1,202 @@ -GAIA-X "Attestation Manager" -is the microservice which is responsible for handling the features -related to issuance of credentials of the GAIA-X project. It handles REST -endpoints for Schemas, Credential Definitions and Verifiable Credentials. - -Copyright 2022 Vereign AG - -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. - - -This Attestation Manager incorporates - -"elastic/ecs-winston-format", - -a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This Attestation Manager also incorporates - -"nestjs", - -a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma client" - -,an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"types/node" - -,type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/express" - -,type definitions for Express (http://expressjs.com), which is covered by the following -copyright and permission notice: - -Copyright Boris Yankov, China Medical University Hospital, Puneet Arora, and Dylan Frankland. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/jest" - -type definitions for Jest, which is covered by the following copyright and permission notice: - -Copyright Asana (https://asana.com)// Ivo Stratev, jwbay, Alexey Svetliakov, Alex Jover Morales, Allan Lukwago, -Ika, Waseem Dahman, Jamie Mason, Douglas Duteil, Ahn, Jeff Lau, Andrew Makarov, Martin Hochel, Sebastian Sebald, -Andy, Antoine Brault, Gregor Stamać, ExE Boss, Alex Bolenok, Mario Beltrán Alarcón, Tony Hallett, Jason Yu, Pawel Fajfer, -Regev Brody, Alexandre Germain, and Adam Jones. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -and - -"class-transformer" - -,a tool to transform plain object to some instance of class and versa, also to serialize / -deserialize object based on criteria, both of which are covered by the following copyright -and permission notice: - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"express" - -,a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"husky" - -, modern native Git hooks made easy, which is covered by the following copyright and -permission notice: - -Copyright (c) 2021 typicode - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -This Attestation Manager also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This Attestation Manager also incorporates - -"liquibase" - -, liquibase is an open-source database-independent library for tracking, managing and applying database schema change, which is covered -by the following copyright and permission notice: - -Copyright (c) Taylor Buckner <taylora.buckner@gmail.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This Attestation Manager also incorporates - -"pg - node postgres" - -, non-blocking PostgreSQL client for Node.js, which is covered by -the following copyright and permission notice: - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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 + 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 2024 Gaia-X + + 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. - - -This Attestation Manager also incorporates - -"rimraf" - -, a `rm -rf` util for nodejs, which is covered by the following copyright -and permission notice: - -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - -(The ISC License) -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -This Attestation Manager also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This Attestation Manager also incorporates - -"Swagger UI Express" - -, allows to serve auto-generated swagger-ui generated API docs from express, -based on a swagger.json file, which is covered by the following copyright and -permission notice: - -Copyright (c) 2018 Scott IT London - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/did-manager/README.md b/apps/did-manager/README.md new file mode 100644 index 0000000000000000000000000000000000000000..974526dd54a195a6e0c2c3ad5b960b9207cf75d2 --- /dev/null +++ b/apps/did-manager/README.md @@ -0,0 +1,76 @@ +# OCM DID Manager + +## Introduction +OCM DID Manager enables you to: +- Register DIDs from a seed +- Resolve DID Documents +- Get [DID Configuration](https://identity.foundation/.well-known/resources/did-configuration/) + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | + +## Usage + +Start in development mode: +```bash +pnpm start +``` + +### Operations +> **Note:** All requests need a `tenantId` query parameter. + +#### Register DID from a seed + +```bash +curl -X POST -d '{"seed":"s2b6rqknk77x016jkyloy3hnrh6s48le"}' http://ocm-indy.xfsc.dev/v1/dids?tenantId=<tenantId> +``` + +Response: + +```json +{ + "status": 201, + "data": ["did:indy:..."] +} +``` + +#### Resolve DID + +```bash +curl -X GET http://ocm-indy.xfsc.dev/v1/dids/<did>?tenantId=<tenantId> +``` + +Response: + +```json +{ + "status": 200, + "data": { + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:indy:...", + ... + } +} +``` + +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). + +## License +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). + diff --git a/apps/did-manager/openapi.json b/apps/did-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..aaa1eeb5ef27b1b1e288d06631fb3536b97eebb7 --- /dev/null +++ b/apps/did-manager/openapi.json @@ -0,0 +1,300 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/dids/{did}": { + "get": { + "operationId": "DIDsController_resolve", + "summary": "Resolve DID", + "description": "Resolve DID", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + }, + { + "name": "did", + "required": true, + "in": "path", + "description": "DID to resolve", + "example": "did:example:123", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "DID resolved successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "DID resolved successfully": { + "value": { + "statusCode": 200, + "message": "DID resolved successfully", + "data": {} + } + } + } + } + } + }, + "400": { + "description": "Invalid DID", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid DID": { + "value": { "statusCode": 400, "message": "Invalid DID" } + } + } + } + } + }, + "404": { + "description": "DID not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found" + } + }, + "DID not found": { + "value": { "statusCode": 404, "message": "DID not found" } + } + } + } + } + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["DIDs"] + } + }, + "/v1/dids": { + "post": { + "operationId": "DIDsController_registerFromSeed", + "summary": "Register DID from seed", + "description": "Register DID from seed", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterFromSeedPayload" + } + } + } + }, + "responses": { + "200": { + "description": "DID registered successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "DID registered successfully": { + "value": { + "statusCode": 200, + "message": "DID registered successfully", + "data": {} + } + } + } + } + } + }, + "400": { + "description": "Invalid seed", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid seed": { + "value": { "statusCode": 400, "message": "Invalid seed" } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found" + } + } + } + } + } + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["DIDs"] + } + }, + "/v1/dids/configuration": { + "post": { + "operationId": "DIDsController_getConfiguration", + "summary": "Get DID configuration", + "description": "Get DID configuration", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConfigurationPayload" + } + } + } + }, + "responses": { + "200": { + "description": "DID configuration fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "DID configuration fetched successfully": { + "value": { + "statusCode": 200, + "message": "DID configuration fetched successfully", + "data": {} + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found" + } + } + } + } + } + }, + "500": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Something went wrong": { + "value": { + "statusCode": 500, + "message": "Something went wrong", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["DIDs"] + } + } + }, + "info": { "title": "", "description": "", "version": "1.0.0", "contact": {} }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "RegisterFromSeedPayload": { + "type": "object", + "properties": { + "seed": { + "type": "string", + "description": "Seed to use for DID generation", + "example": "000000000000000000000000Steward1" + }, + "services": { + "description": "Services to associate with DID", + "example": [ + { + "identifier": "example", + "url": "https://example.com", + "type": "example" + } + ], + "type": "array", + "items": { "type": "string" } + } + }, + "required": ["seed", "services"] + }, + "GetConfigurationPayload": { "type": "object", "properties": {} } + } + } +} diff --git a/apps/did-manager/package.json b/apps/did-manager/package.json index 4bc8358975be06b45ee158325f08fd73f7df28c7..bb8605ea2badf782a55c9344f98cd204a7dfd2f7 100644 --- a/apps/did-manager/package.json +++ b/apps/did-manager/package.json @@ -1,9 +1,10 @@ { "name": "@ocm/did-manager", "version": "1.0.0", - "description": "", - "author": "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>", + "description": "Gaia-X OCM DID Manager", + "author": "Gaia-X", "contributors": [ + "Berend Sliedrecht <berend@animo.id>", "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" ], "private": true, diff --git a/apps/proof-manager/GDPR.md b/apps/proof-manager/GDPR.md deleted file mode 100644 index 2b0ee008e995a47859b2dd8687239404bfd89203..0000000000000000000000000000000000000000 --- a/apps/proof-manager/GDPR.md +++ /dev/null @@ -1,28 +0,0 @@ -# GDPR Compliance Document - -The objective of this document is to detail, the data being stored and proccessed by the Organization Credential Manager's, Proof Manger. - -## What information is stored - -### Source User Information - -No personal data is accessed or processed - -### Technical User Information (Public) - -Schema id -Presentation ids and states -DID of requester -Created/updated dates - -## How is the information stored - -The Technical User Information is encrypted using the Private Key of the Organizations SSI Agent and stored internally (on the agent) on PostgreSQL and externally/ metadata (shared between the OCM services) on PostgreSQL of Organization. - -## Who can access the information - -The Technical User Information both are accessible only by the Organization specific SSI agent's private key. - -## How long will the information stay - -The Technical User Information is wiped out according to the retention periods (not defined yet). diff --git a/apps/proof-manager/Gaia-x Proof Manager API.postman_collection.json b/apps/proof-manager/Gaia-x Proof Manager API.postman_collection.json deleted file mode 100644 index 85be30ab148aea5db881000871180166d9e74e21..0000000000000000000000000000000000000000 --- a/apps/proof-manager/Gaia-x Proof Manager API.postman_collection.json +++ /dev/null @@ -1,561 +0,0 @@ -{ - "info": { - "_postman_id": "8cdaf3fb-ded2-4518-8464-c196c01c622f", - "name": "Gaia-x Proof Manager API", - "description": "API documentation for GAIA-X Proof Manager", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "10250261" - }, - "item": [ - { - "name": "Get full url from short url id", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/v1/url/:id", - "host": ["{{baseUrl}}"], - "path": ["v1", "url", ":id"], - "variable": [ - { - "key": "id", - "value": "<string>" - } - ] - } - }, - "response": [] - }, - { - "name": "Send presentation request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"comment\": \"Proof Presenation\",\n \"attributes\": [\n {\n \"schemaId\": \"\",\n \"credentialDefId\": \"{{cred-def-id}}\",\n \"attributeName\": \"fName\",\n \"value\": \"\",\n \"condition\": \"\"\n },\n {\n \"schemaId\": \"\",\n \"credentialDefId\": \"{{pcm-vc-cred-def-id}}\",\n \"attributeName\": \"email\",\n \"value\": \"\",\n \"condition\": \"\"\n }\n ],\n \"connectionId\": \"{{conn-id}}\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/send-presentation-request", - "host": ["{{baseUrl}}"], - "path": ["v1", "send-presentation-request"] - } - }, - "response": [] - }, - { - "name": "Send out of band presentation request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"comment\": \"<string>\",\n \"schemaId\": \"<string>\",\n \"options\": {},\n \"attributes\": [\n \"<string>\",\n \"<string>\"\n ]\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/v1/send-out-of-band-presentation-request", - "host": ["{{baseUrl}}"], - "path": ["v1", "send-out-of-band-presentation-request"] - } - }, - "response": [] - }, - { - "name": "Send out of band proof", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/out-of-band-proof", - "host": ["{{baseUrl}}"], - "path": ["v1", "out-of-band-proof"] - } - }, - "response": [] - }, - { - "name": "Health check", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/health", - "host": ["{{baseUrl}}"], - "path": ["v1", "health"] - } - }, - "response": [] - }, - { - "name": "Search proof request information using pagination and queries", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/find-proof-presentation?page=0&pageSize=25&proofRecordId&connectionId&credentialDefId&schemaId&theirDid&status&createdDateStart=2023-03-05T08:36:19.170Z&createdDateEnd&updatedDateStart&updatedDateEnd", - "host": ["{{baseUrl}}"], - "path": ["v1", "find-proof-presentation"], - "query": [ - { - "key": "page", - "value": "0" - }, - { - "key": "pageSize", - "value": "25" - }, - { - "key": "proofRecordId", - "value": null - }, - { - "key": "connectionId", - "value": null - }, - { - "key": "credentialDefId", - "value": null - }, - { - "key": "schemaId", - "value": null - }, - { - "key": "theirDid", - "value": null - }, - { - "key": "status", - "value": null - }, - { - "key": "createdDateStart", - "value": "2023-03-05T08:36:19.170Z" - }, - { - "key": "createdDateEnd", - "value": null - }, - { - "key": "updatedDateStart", - "value": null - }, - { - "key": "updatedDateEnd", - "value": null - } - ] - } - }, - "response": [ - { - "name": "Search proof request information using pagination and queries", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/find-proof-presentation?page=0&pageSize=25&proofRecordId&connectionId&credentialDefId&schemaId&theirDid&status&createdDateStart=2023-03-05T08:36:19.170Z&createdDateEnd&updatedDateStart&updatedDateEnd", - "host": ["{{baseUrl}}"], - "path": ["v1", "find-proof-presentation"], - "query": [ - { - "key": "page", - "value": "0" - }, - { - "key": "pageSize", - "value": "25" - }, - { - "key": "proofRecordId", - "value": null - }, - { - "key": "connectionId", - "value": null - }, - { - "key": "credentialDefId", - "value": null - }, - { - "key": "schemaId", - "value": null - }, - { - "key": "theirDid", - "value": null - }, - { - "key": "status", - "value": null - }, - { - "key": "createdDateStart", - "value": "2023-03-05T08:36:19.170Z" - }, - { - "key": "createdDateEnd", - "value": null - }, - { - "key": "updatedDateStart", - "value": null - }, - { - "key": "updatedDateEnd", - "value": null - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 06:10:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "7522" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"1d62-eeaYumJatMrJi96zaADgb+qSzt0\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentations fetched successfully\",\n \"data\": {\n \"count\": 664,\n \"records\": [\n {\n \"id\": \"001ad97f-78f4-41f1-8a69-e03eefe4136a\",\n \"proofRecordId\": \"6b19a270-3448-4055-97b7-81fb42113688\",\n \"connectionId\": \"9bf1804a-a356-44b3-b97a-dd40b0667a50\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:36:19.170Z\",\n \"updatedDate\": \"2023-04-05T08:36:19.170Z\"\n },\n {\n \"id\": \"00bc3f5c-d42f-424c-8db5-2b7fe4f2118f\",\n \"proofRecordId\": \"f9ff0dae-f74c-4ae4-b164-adcbe2e85192\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-06T11:39:24.077Z\",\n \"updatedDate\": \"2023-04-06T11:39:24.077Z\"\n },\n {\n \"id\": \"0117964f-96d4-461d-903c-31e9e4ad9f5f\",\n \"proofRecordId\": \"54673c3c-0325-45cd-b39e-2a77007958a7\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:02:55.339Z\",\n \"updatedDate\": \"2023-04-05T08:02:55.339Z\"\n },\n {\n \"id\": \"017b6c72-7506-41a4-9cb9-5347641e03de\",\n \"proofRecordId\": \"299ba1c1-7f9b-4a32-9d18-a41f80c5ff33\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:36:14.844Z\",\n \"updatedDate\": \"2023-04-05T08:36:14.844Z\"\n },\n {\n \"id\": \"026aa092-a82f-4cab-bf88-55fe3e084062\",\n \"proofRecordId\": \"f9a2d030-1776-4329-aff1-2707668c61f0\",\n \"connectionId\": \"757cc3c0-ba70-4ac2-bd52-797ea0fa60a1\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:35:46.086Z\",\n \"updatedDate\": \"2023-04-05T08:35:46.086Z\"\n },\n {\n \"id\": \"02cecc4a-1824-40d1-b3ea-e1d6e938a74d\",\n \"proofRecordId\": \"9b419c4b-9945-4813-90ad-400190e61100\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-06-02T02:04:42.738Z\",\n \"updatedDate\": \"2023-06-02T02:04:42.738Z\"\n },\n {\n \"id\": \"02ffd3e4-3d87-45dc-8c58-2a9075aa057e\",\n \"proofRecordId\": \"2d619580-7b06-4411-8c47-73dd307ae777\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:35:27.835Z\",\n \"updatedDate\": \"2023-04-05T08:35:27.836Z\"\n },\n {\n \"id\": \"03d59eae-263c-4f37-82d2-d2a61044e680\",\n \"proofRecordId\": \"72a2a37b-ba0a-40a6-9c1e-e05b37fb1550\",\n \"connectionId\": \"9bf1804a-a356-44b3-b97a-dd40b0667a50\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:02:37.486Z\",\n \"updatedDate\": \"2023-04-05T08:02:37.486Z\"\n },\n {\n \"id\": \"03e459a0-e2e7-45e8-a32c-039672523ca3\",\n \"proofRecordId\": \"cd6a82ad-ee03-4e71-9c01-71e7fe83219b\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:37:04.571Z\",\n \"updatedDate\": \"2023-04-05T08:37:04.571Z\"\n },\n {\n \"id\": \"0405d814-57b6-4ff8-a645-3fe3682e09b8\",\n \"proofRecordId\": \"0a3ad2b8-90f9-49c9-83c8-1cf6b231c5fa\",\n \"connectionId\": \"757cc3c0-ba70-4ac2-bd52-797ea0fa60a1\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:02:43.442Z\",\n \"updatedDate\": \"2023-04-05T08:02:43.442Z\"\n },\n {\n \"id\": \"04409e91-77d1-48f3-8982-d425806e79f2\",\n \"proofRecordId\": \"29e5b3f0-9fcc-40cf-8573-9e219a7366ab\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-05-10T09:43:56.431Z\",\n \"updatedDate\": \"2023-05-10T09:43:56.431Z\"\n },\n {\n \"id\": \"057647eb-863e-4930-98ce-2e7206756f06\",\n \"proofRecordId\": \"708a6758-36d5-4327-8334-73b7f56e7d45\",\n \"connectionId\": \"757cc3c0-ba70-4ac2-bd52-797ea0fa60a1\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:02:03.757Z\",\n \"updatedDate\": \"2023-04-05T08:02:03.757Z\"\n },\n {\n \"id\": \"057d8759-c2cf-47d1-b809-77b5fa250714\",\n \"proofRecordId\": \"d3e7bf0d-37b8-4177-b771-c055ba384cde\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-27T08:24:51.139Z\",\n \"updatedDate\": \"2023-04-27T08:24:51.139Z\"\n },\n {\n \"id\": \"0708a7a2-d679-44dc-bf0c-93b02de40cb8\",\n \"proofRecordId\": \"74f40bda-9277-4dc9-86dd-01c2266b503f\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:00:54.344Z\",\n \"updatedDate\": \"2023-04-05T08:00:54.344Z\"\n },\n {\n \"id\": \"0723f10e-66e3-45ec-9a70-751365ae2934\",\n \"proofRecordId\": \"a3af4436-7dea-41b4-b66a-1e4138b038dd\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-05-10T11:48:56.739Z\",\n \"updatedDate\": \"2023-05-10T11:48:56.739Z\"\n },\n {\n \"id\": \"074e14bb-01f0-4d77-a021-6af6f6c8a697\",\n \"proofRecordId\": \"13eb0c78-e4f0-4b24-93f6-af043c13ac57\",\n \"connectionId\": \"9bf1804a-a356-44b3-b97a-dd40b0667a50\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:36:46.244Z\",\n \"updatedDate\": \"2023-04-05T08:36:46.244Z\"\n },\n {\n \"id\": \"07bb6a56-c62c-4eed-9673-8973e5cc73e7\",\n \"proofRecordId\": \"5cdfdc23-d98f-4f1d-bac3-e6dedeced3a3\",\n \"connectionId\": \"757cc3c0-ba70-4ac2-bd52-797ea0fa60a1\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:01:46.861Z\",\n \"updatedDate\": \"2023-04-05T08:01:46.861Z\"\n },\n {\n \"id\": \"0870526d-849a-44e5-87e4-05416ba8440b\",\n \"proofRecordId\": \"732d5ccc-56a7-476a-a1bb-5a6db8eaf0f2\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:37:02.390Z\",\n \"updatedDate\": \"2023-04-05T08:37:02.390Z\"\n },\n {\n \"id\": \"09d6f050-8bde-48f3-ba0e-e59b4e8f035f\",\n \"proofRecordId\": \"f41d2f97-f79a-4b9f-a882-b7b78f8966dd\",\n \"connectionId\": \"757cc3c0-ba70-4ac2-bd52-797ea0fa60a1\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:37:12.868Z\",\n \"updatedDate\": \"2023-04-05T08:37:12.868Z\"\n },\n {\n \"id\": \"0c2cead8-f125-43dd-bd16-a1611658132d\",\n \"proofRecordId\": \"0d7d8534-1d4f-4976-bce4-d1ac43a67ac5\",\n \"connectionId\": \"f9c10d29-2cbd-44b0-b909-26ca4108c5dd\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:37:10.867Z\",\n \"updatedDate\": \"2023-04-05T08:37:10.867Z\"\n },\n {\n \"id\": \"0d0b50dd-bd4f-4409-8918-8faa9e41b36a\",\n \"proofRecordId\": \"437e0246-3c77-40a9-9984-fa279a6da66f\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-05-25T06:50:47.760Z\",\n \"updatedDate\": \"2023-05-25T06:50:47.760Z\"\n },\n {\n \"id\": \"0d0fbe35-306c-411b-9924-cfbd0671c0c4\",\n \"proofRecordId\": \"c6cf80aa-c82b-40d4-932f-b6a0dfd94b31\",\n \"connectionId\": \"9bf1804a-a356-44b3-b97a-dd40b0667a50\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-05T08:02:07.235Z\",\n \"updatedDate\": \"2023-04-05T08:02:07.197Z\"\n },\n {\n \"id\": \"0d36b72b-0ccd-409b-848b-8aaf64cde60c\",\n \"proofRecordId\": \"6ed08154-abc5-4b7a-99b2-8cc746ea2efa\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-04-27T08:24:51.803Z\",\n \"updatedDate\": \"2023-04-27T08:24:51.804Z\"\n },\n {\n \"id\": \"0d8b8019-3a45-47cc-a0b0-3b7433c79ef3\",\n \"proofRecordId\": \"8b14c221-4e8c-412d-979e-f980c2493718\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"request-sent\",\n \"createdDate\": \"2023-05-25T08:41:08.159Z\",\n \"updatedDate\": \"2023-05-25T08:41:08.159Z\"\n },\n {\n \"id\": \"0dcb6484-9bbb-4aa0-8f29-55b2099313ac\",\n \"proofRecordId\": \"3f29af26-fa7c-4dff-9e73-dfb11aeed108\",\n \"connectionId\": \"\",\n \"credentialDefId\": \"\",\n \"schemaId\": \"\",\n \"theirDid\": \"\",\n \"status\": \"done\",\n \"createdDate\": \"2023-05-22T10:56:44.678Z\",\n \"updatedDate\": \"2023-05-22T11:46:59.158Z\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Fetch proof presentation (with received credentials) by proofRequestId", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/find-by-presentation-id?proofRecordId=3f29af26-fa7c-4dff-9e73-dfb11aeed108", - "host": ["{{baseUrl}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "proofRecordId", - "value": "3f29af26-fa7c-4dff-9e73-dfb11aeed108", - "description": "(Required) " - } - ] - } - }, - "response": [ - { - "name": "Fetch proof presentation (with received credentials) by proofRequestId", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/find-by-presentation-id?proofRecordId=3f29af26-fa7c-4dff-9e73-dfb11aeed106", - "host": ["{{baseUrl}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "proofRecordId", - "value": "3f29af26-fa7c-4dff-9e73-dfb11aeed106", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 02 Jun 2023 06:11:11 GMT" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "328" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Access-Control-Allow-Origin", - "value": "*" - }, - { - "key": "ETag", - "value": "W/\"148-MIqXpsMkr4A+x4RvK6AWWJ6RzRM\"" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentation fetched successfully\",\n \"data\": {\n \"state\": \"done\",\n \"presentations\": [\n {\n \"schemaId\": \"BsfUfTECZPVRnoCgHUfB3p:2:LoginCredentials:1.0\",\n \"credDefId\": \"BsfUfTECZPVRnoCgHUfB3p:3:CL:50014:LoginCredentials2\",\n \"revRegId\": null,\n \"timestamp\": null,\n \"credentialSubject\": {\n \"email\": \"example@example.com\"\n }\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Delete proof request by proofRecordId", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/delete-proof-request/:proofRecordId", - "host": ["{{baseUrl}}"], - "path": ["v1", "delete-proof-request", ":proofRecordId"], - "variable": [ - { - "key": "proofRecordId" - } - ] - } - }, - "response": [] - }, - { - "name": "Decline proof request by proofRecordId", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/decline-proof-request/:proofRecordId", - "host": ["{{baseUrl}}"], - "path": ["v1", "decline-proof-request", ":proofRecordId"], - "variable": [ - { - "key": "proofRecordId" - } - ] - } - }, - "response": [] - }, - { - "name": "Fetch all proofs directly from agent", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/agent-proofs", - "host": ["{{baseUrl}}"], - "path": ["v1", "agent-proofs"] - } - }, - "response": [] - }, - { - "name": "Accept proof request by proofRecordId", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/accept-proof-request/:proofRecordId", - "host": ["{{baseUrl}}"], - "path": ["v1", "accept-proof-request", ":proofRecordId"], - "variable": [ - { - "key": "proofRecordId" - } - ] - } - }, - "response": [] - }, - { - "name": "Accept presentation request by proofRecordId", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/accept-presentation/:proofRecordId", - "host": ["{{baseUrl}}"], - "path": ["v1", "accept-presentation", ":proofRecordId"], - "variable": [ - { - "key": "proofRecordId", - "value": "<string>" - } - ] - } - }, - "response": [ - { - "name": "Accept presentation request required following attributes ( proof_record_id )", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/v1/accept-presentation/:proofRecordId", - "host": ["{{baseUrl}}"], - "path": ["v1", "accept-presentation", ":proofRecordId"], - "variable": [ - { - "key": "proofRecordId" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [""] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "https://ssi-dev.vereign.com/ocm/proof" - } - ] -} diff --git a/apps/proof-manager/LICENSE b/apps/proof-manager/LICENSE index 33f48080615e98cdd9d1bfed3fa1bc2c3d9d89cc..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/proof-manager/LICENSE +++ b/apps/proof-manager/LICENSE @@ -1,532 +1,202 @@ -GAIA-X "Proof Manager" -is the microservice responsible for handling the features related to -proof presentation in the Organizational Credential Manager. - - Copyright 2022 Vereign AG - -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. - - -This Proof Manager incorporates - -"elastic/ecs-winston-format", - -a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This Proof Manager also incorporates - -"nestjs", - -a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"prisma client" - -,an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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 + 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 2024 Gaia-X + + 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. - - -This Proof Manager also incorporates - -"DefinitelyTyped, types/express, types/jest" - -, the repository for high quality TypeScript type definitions, which is covered by the -following copyright and permission notice: - -Copyrights are respective of each contributor listed at the beginning of each -definition file. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"types/node" - -,type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"express" - -, a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This Proof Manager also incorporates - -"js-base64" - -, yet another Base64 transcoder, which is covered by the following copyright and permission notice: - -Copyright (c) 2014, Dan Kogai All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -- Neither the name of {{{project}}} nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRAC -T, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -This Proof Manager also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This Proof Manager also incorporates - -"pg - node postgres" - -, non-blocking PostgreSQL client for Node.js, which is covered by -the following copyright and permission notice: - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Proof Manager also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Proof Manager also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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. - - -This Proof Manager also incorporates - -"rimraf" - -, a `rm -rf` util for nodejs, which is covered by the following copyright -and permission notice: - -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - -(The ISC License) -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -This Proof Manager also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This Proof Manager also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Proof Manager also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/proof-manager/README.md b/apps/proof-manager/README.md index 301032704adfedcb8f51a6709adddd1190ea75d0..c3ab3802a57cedfb8b96cba1b9fdb37d71256cd1 100644 --- a/apps/proof-manager/README.md +++ b/apps/proof-manager/README.md @@ -1,137 +1,85 @@ # OCM Proof Manager -## Description - -<hr/> -The Proof Manager, is the microservice responsible for handling the features related to Proof Presentation in the Organizational Credential Manager. +## Introduction +The OCM Proof Manager API enables you to: +- Request presentation proofs +- List all presentation proofs +- Retrieve a presentation proof by ID +- Accept incoming presentation proofs +- Delete presentation proofs + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | ## Usage -<hr/> - -### Swagger Documentation: - -[Swagger/OpenAPI](swagger.json) - -## Installation - -<hr/> - -### Pre-requisite - -- pnpm -- docker -- docker-compose -- Postgres - -### OCM Services Dependencies - -- SSI Abstraction -- Connection Manager -- Attestation Manager - -## Running the app - -**Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.** - -**The .env files are in the infrastructure repository under /env** - -### There are two separate Dockefiles in "./deployment" of every project: - +Start in development mode: ```bash - ## production in: - ./deployment/ci - ## development in: - ./deployment/dev -``` - -- (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles. - -- Run while in **"infrastructure"** project: - -```bash -$ docker-compose up --build proof-m -``` - -to run only Connection Manager or - -```bash -$ docker-compose up --build -``` - -to run all the services. - -## Build - -``` -pnpm build -``` - -## Run - -``` pnpm start ``` -### Environment Variables Required - -``` -1. PORT -2. DATABASE_URL -3. ECSURL -4. NATS_URL -5. AGENT_URL -``` - -### Outgoing communication services - -``` -1. SSI Abstraction -``` +### Operations +> **Note:** All requests need a `tenantId` query parameter. -### Incomming communication services +#### Request a presentation proof -``` -1. Connection Manager -2. Attestation Manager +```bash +curl -X POST -d '{"name":"Proof_name","connectionId":"0f777ad8-647a-464f-bb93-6b2c5d2805c5","requestedAttributes":{...},"requestedPredicates":{...}}' http://ocm-indy.xfsc.dev/v1/proofs?tenantId=<tenantId> ``` -## Features supported - -``` -1. Proof Presentation -2. Out of Band +Response: +```json +{ + "status": 201, + "data": { + "_tags": {}, + "metadata": {}, + "id": "96f25c87-3702-4269-bbfb-5c7671df0784", + "createdAt": "2024-03-11T10:00:40.572Z", + "protocolVersion": "v2", + "state": "request-sent", + ... + } +} ``` -## Test - -<hr/> +#### Accept a presentation proof request ```bash -# unit tests -$ pnpm test - -# e2e tests -$ pnpm test:e2e - -# test coverage -$ pnpm test:cov +curl -X POST http://ocm-indy.xfsc.dev/v1/proofs/96f25c87-3702-4269-bbfb-5c7671df0784/accept?tenantId=<tenantId> ``` -## GDPR +Response: -<hr/> - -[GDPR](GDPR.md) - -## Dependencies - -<hr/> +```json +{ + "statusCode": 200, + "data": { + "_tags": { + "connectionId": "13254185-deed-4d37-a4a8-3dc56adff524", + "role": "prover", + "state": "request-received", + "threadId": "d78ed0ad-1ad6-41db-bccc-2acf57b5cdd5" + }, + ... + } +} +``` -[Dependencies](package.json) +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). ## License - -<hr/> - -[Apache 2.0 license](LICENSE) +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/proof-manager/openapi.json b/apps/proof-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..58c8a660957cea17d7ef0a2b86691ee0ff4fb674 --- /dev/null +++ b/apps/proof-manager/openapi.json @@ -0,0 +1,465 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/proofs": { + "get": { + "operationId": "ProofsController_find", + "summary": "Fetch a list of presentation proofs", + "description": "This call provides a list of presentation proofs for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Presentation proofs fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Presentation proofs fetched successfully": { + "value": { + "statusCode": 200, + "message": "Presentation proofs fetched successfully", + "data": [] + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Presentation Proofs"] + }, + "post": { + "operationId": "ProofsController_request", + "summary": "Request a presentation proof", + "description": "This call requests a presentation proof for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Proof of Vaccination" + }, + "connectionId": { "type": "string", "example": "1234567890" }, + "requestedAttributes": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { "type": "string" } + }, + "restrictions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schema_id": { "type": "string" }, + "schema_issuer_id": { "type": "string" }, + "schema_name": { "type": "string" }, + "schema_version": { "type": "string" }, + "issuer_id": { "type": "string" }, + "cred_def_id": { "type": "string" }, + "rev_reg_id": { "type": "string" }, + "schema_issuer_did": { "type": "string" }, + "issuer_did": { "type": "string" } + }, + "patternProperties": { + "^attr::.*?::marker$": { "enum": ["1", "0"] }, + "^attr::.*?::value$": { "type": "string" } + }, + "additionalProperties": { + "type": "string", + "anyOf": [ + { "enum": ["1", "0"] }, + { "type": "string" } + ] + } + } + } + }, + "required": ["names"] + } + }, + "requestedPredicates": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "predicateType": { "enum": [">=", ">", "<=", "<"] }, + "predicateValue": { "type": "number" }, + "restrictions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schema_id": { "type": "string" }, + "schema_issuer_id": { "type": "string" }, + "schema_name": { "type": "string" }, + "schema_version": { "type": "string" }, + "issuer_id": { "type": "string" }, + "cred_def_id": { "type": "string" }, + "rev_reg_id": { "type": "string" }, + "schema_issuer_did": { "type": "string" }, + "issuer_did": { "type": "string" } + }, + "patternProperties": { + "^attr::.*?::marker$": { "enum": ["1", "0"] }, + "^attr::.*?::value$": { "type": "string" } + }, + "additionalProperties": { + "type": "string", + "anyOf": [ + { "enum": ["1", "0"] }, + { "type": "string" } + ] + } + } + } + }, + "required": ["name", "predicateType", "predicateValue"] + } + }, + "required": [ + "name", + "connectionId", + "requestedAttributes", + "requestedPredicates" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Presentation proof requested successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Presentation proof requested successfully": { + "value": { + "statusCode": 201, + "message": "Presentation proof requested successfully", + "data": {} + } + } + } + } + } + }, + "400": { + "description": "Invalid request payload", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid request payload": { + "value": { + "statusCode": 400, + "message": "Invalid request payload", + "data": null + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Presentation Proofs"] + } + }, + "/v1/proofs/{id}": { + "get": { + "operationId": "ProofsController_get", + "summary": "Fetch a presentation proof by id", + "description": "This call provides a presentation proof for a given tenant and id", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Presentation proof fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Presentation proof fetched successfully": { + "value": { + "statusCode": 200, + "message": "Presentation proof fetched successfully", + "data": {} + } + } + } + } + } + }, + "400": { + "description": "Invalid presentation proof id", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid presentation proof id": { + "value": { + "statusCode": 400, + "message": "Invalid presentation proof id", + "data": null + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Presentation Proofs"] + }, + "delete": { + "operationId": "ProofsController_delete", + "summary": "Delete a presentation proof", + "description": "This call deletes a presentation proof for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Presentation proof deleted successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Presentation proof deleted successfully": { + "value": { + "statusCode": 200, + "message": "Presentation proof deleted successfully", + "data": null + } + } + } + } + } + }, + "400": { + "description": "Invalid presentation proof id", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid presentation proof id": { + "value": { + "statusCode": 400, + "message": "Invalid presentation proof id", + "data": null + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + }, + "Presentation proof not found": { + "value": { + "statusCode": 404, + "message": "Presentation proof not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "data": null + } + } + } + } + } + } + }, + "tags": ["Presentation Proofs"] + } + }, + "/v1/proofs/{proofRecordId}/accept": { + "post": { + "operationId": "ProofsController_accept", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { "200": { "description": "" } }, + "tags": ["Presentation Proofs"] + } + } + }, + "info": { + "title": "Gaia-X OCM Proof Manager", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { "schemas": {} } +} diff --git a/apps/proof-manager/package.json b/apps/proof-manager/package.json index 51c3124ac3b6bbd8e05a27cf12735f50e9ceee9b..07a677a73c32399e30292f01d12c7c98c2c28908 100644 --- a/apps/proof-manager/package.json +++ b/apps/proof-manager/package.json @@ -2,7 +2,11 @@ "name": "@ocm/proof-manager", "version": "1.0.0", "description": "Gaia-X OCM Proof Manager", - "author": "Sagar", + "author": "Gaia-X", + "contributors": [ + "Berend Sliedrecht <berend@animo.id>", + "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" + ], "private": true, "license": "Apache-2.0", "type": "module", diff --git a/apps/proof-manager/swagger.json b/apps/proof-manager/swagger.json deleted file mode 100644 index d43658b72a4baf6fd0e0239215b5a918446771af..0000000000000000000000000000000000000000 --- a/apps/proof-manager/swagger.json +++ /dev/null @@ -1,970 +0,0 @@ -{ - "openapi": "3.0.0", - "paths": { - "/v1/health": { - "get": { - "operationId": "HealthController_getHealth", - "summary": "Health check", - "description": "This call provides the capability to check the service is working and up. The call returns 200 Status Code and current server time in json body", - "parameters": [], - "responses": { - "200": { - "description": "Service is up and running.", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Service is up and running.": { - "value": { - "statusCode": 200, - "message": "Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)" - } - } - } - } - } - } - } - } - }, - "/v1/find-proof-presentation": { - "get": { - "operationId": "PresentationProofsController_findProofPresentation", - "summary": "Fetch list of proof requests", - "description": "This call provides the capability to search proofs (Credential Presentation) by using pagination and filter parameters. This call returns a list of proof requests (Proof Presentations) and overall count of records. Filter supports following parameters: page, pageSize, proofRecordId, connectionId, credentialDefId, schemaId, theirDid, status, createdDateStart, createdDateEnd, updatedDateStart, updatedDateEnd", - "parameters": [ - { - "name": "updatedDateEnd", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "updatedDateStart", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "createdDateEnd", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "createdDateStart", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "status", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "theirDid", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "schemaId", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "credentialDefId", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "connectionId", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "proofRecordId", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "schema": {} - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": {} - } - ], - "responses": { - "200": { - "description": "Proof presentations fetched successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Proof presentations fetched successfully": { - "value": { - "statusCode": 200, - "message": "Proof presentations fetched successfully", - "data": { - "count": 1, - "records": [ - { - "id": "30774a7e", - "proofRecordId": "9b4ab922", - "connectionId": "", - "credentialDefId": "", - "schemaId": "", - "theirDid": "", - "status": "request-sent", - "createdDate": "1970-01-01T00:00:00.642Z", - "updatedDate": "1970-01-01T00:00:00.642Z" - } - ] - } - } - } - } - } - } - }, - "404": { - "description": "No Data found", - "content": { - "application/json": { - "schema": {}, - "examples": { - "No Data found": { - "value": { - "statusCode": 404, - "message": "No Data found" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/find-by-presentation-id": { - "get": { - "operationId": "PresentationProofsController_findProofByProofRecordId", - "summary": "Fetch proof presentation by proofRequestId", - "description": "This call provides the capability to get proof request by providing proofRecordId (presentationId). The call returns an information about proof request and also (if user accepted proof request) information about requested user credentials", - "parameters": [ - { - "name": "proofRecordId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Proof presentation fetched successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Proof presentation fetched successfully": { - "value": { - "statusCode": 200, - "message": "Proof presentation fetched successfully", - "data": { - "state": "request-sent", - "presentations": [ - { - "schemaId": "", - "credDefId": "", - "revRegId": "", - "timestamp": "", - "credentialSubject": {} - } - ] - } - } - } - } - } - } - }, - "400": { - "description": "Find presentation request required following attributes: ( proofRecordId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Find presentation request required following attributes: ( proofRecordId )": { - "value": { - "statusCode": 400, - "message": "Find presentation request required following attributes: ( proofRecordId )" - } - } - } - } - } - }, - "404": { - "description": "No Data found", - "content": { - "application/json": { - "schema": {}, - "examples": { - "No Data found": { - "value": { - "statusCode": 404, - "message": "No Data found" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/send-presentation-request": { - "post": { - "operationId": "PresentationProofsController_sendPresentationRequest", - "summary": "Send presentation request", - "description": "This call provides the capability to create a new presentation request bound to existing connection. It is mandatory to provide a schema for every requested attribute and attribute name in the body information of the connection. The call returns an information about proof request (proofRecordId, connectionId, credentialDefId, schemaId, theirDid, status, createdDate, updatedDate, threadId)", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendProofRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Presentation request sent successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Presentation request sent successfully": { - "value": { - "statusCode": 201, - "message": "Presentation request sent successfully", - "data": { - "id": "a7ccc2f7", - "proofRecordId": "fb556018-1907-47c1-a6d6-c7cbca7d23b4", - "connectionId": "a9371aed-67ed-4448-ace0-d773e7b30e1c", - "credentialDefId": "", - "schemaId": "", - "theirDid": "", - "status": "request-sent", - "createdDate": "2023-03-02T13:02:43.656Z", - "updatedDate": "2023-03-02T13:02:43.656Z", - "threadId": "75045c1b-f0ef-4f10-831e-4e4f301333af" - } - } - } - } - } - } - }, - "400": { - "description": "Find presentation request required following attributes: ( proofRecordId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Find presentation request required following attributes: ( proofRecordId )": { - "value": { - "statusCode": 400, - "message": "Find presentation request required following attributes: ( proofRecordId )" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/send-out-of-band-presentation-request": { - "post": { - "operationId": "PresentationProofsController_sendOutOfBandPresentationRequest", - "summary": "Send out of band presentation request", - "description": "This call provides the capability to create a new presentation request not bound to any proposal or existing connection. The call returns an information about presentation request", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendProofRequestBody" - } - } - } - }, - "responses": { - "201": { - "description": "Presentation request sent successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Presentation request sent successfully": { - "value": { - "statusCode": 201, - "message": "Presentation request sent successfully", - "data": { - "id": "d6667caa", - "proofRecordId": "600dd422", - "connectionId": "", - "credentialDefId": "", - "schemaId": "", - "theirDid": "", - "status": "request-sent", - "createdDate": "1970-01-01T00:00:00.934Z", - "updatedDate": "1970-01-01T00:00:00.934Z", - "presentationMessage": "https://serviceEndpointUrl.com:443/ocm/didcomm/?d_m=eyJAdHlwZSI6I", - "presentationMessageShort": "https://selfUrl.com/v1/url/1234abcd" - } - } - } - } - } - } - }, - "400": { - "description": "Send presentation request required following attributes( attributes, schemaId or credentialDefinitionId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Send presentation request required following attributes( attributes, schemaId or credentialDefinitionId )": { - "value": { - "statusCode": 400, - "message": "Send presentation request required following attributes( attributes, schemaId or credentialDefinitionId )" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/out-of-band-proof": { - "post": { - "operationId": "PresentationProofsController_outOfBandProof", - "summary": "Send out of band proof", - "description": "This call provides the capability to create a new presentation request not bound to any proposal or existing connection but it creates just on type defined in attestation manager (type is bound to schema id there). The call returns an information about presentation request", - "parameters": [ - { - "name": "type", - "required": true, - "in": "query", - "schema": {} - } - ], - "responses": { - "201": { - "description": "Presentation request sent successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Presentation request sent successfully": { - "value": { - "statusCode": 201, - "message": "Presentation request sent successfully", - "data": { - "id": "60f38aa4", - "proofRecordId": "852ee278", - "connectionId": "", - "credentialDefId": "", - "schemaId": "", - "theirDid": "", - "status": "request-sent", - "createdDate": "2023-03-02T13:12:38.934Z", - "updatedDate": "2023-03-02T13:12:38.934Z", - "presentationMessage": "https://serviceEndpointUrl.com:443/ocm/didcomm/?d_m=eyJAdHlwZSI6Imh0dHBzOi8", - "presentationMessageShort": "https://selfUrl/v1/url/1234abcd" - } - } - } - } - } - } - }, - "400": { - "description": "Could not get schema details. please try again.", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Could not get schema details. please try again.": { - "value": { - "statusCode": 400, - "message": "Could not get schema details. please try again." - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/accept-presentation/{proofRecordId}": { - "post": { - "operationId": "PresentationProofsController_acceptPresentation", - "summary": "Accept presentation request by proofRecordId", - "description": "Accept a presentation as prover (by sending a presentation acknowledgement message) to the connection associated with the proof record.", - "parameters": [ - { - "name": "proofRecordId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Presentation accepted successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Presentation accepted successfully": { - "value": {} - } - } - } - } - }, - "400": { - "description": "Accept presentation request required following attributes ( proof_record_id )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Accept presentation request required following attributes ( proof_record_id )": { - "value": { - "statusCode": 400, - "message": "Accept presentation request required following attributes ( proof_record_id )" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Internal Server Error": { - "value": { - "statusCode": 500, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Something went wrong: Lorem Ipsum" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/accept-proof-request/{proofRecordId}": { - "post": { - "operationId": "PresentationProofsController_acceptProofRequest", - "summary": "Accept proof request by proofRecordId", - "description": "Accept a presentation request as prover (by sending a presentation message) to the connection associated with the proof record.", - "parameters": [], - "responses": { - "200": { - "description": "Request accepted successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Request accepted successfully": { - "value": { - "statusCode": 200, - "message": "Request accepted successfully", - "data": { - "_tags": { - "threadId": "6b5c57b3", - "state": "request-received", - "connectionId": "653b8cdc" - }, - "metadata": {}, - "id": "19c5269f", - "createdAt": "1970-01-01T00:00:00.498Z", - "requestMessage": { - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "@id": "6b5c57b3", - "comment": "Proof Presenation", - "request_presentations~attach": [ - { - "@id": "libindy-request-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJuYW=" - } - } - ] - }, - "state": "presentation-sent", - "connectionId": "653b8cdc", - "threadId": "6b5c57b3", - "presentationMessage": { - "@type": "https://didcomm.org/present-proof/1.0/presentation", - "@id": "c1089096", - "presentations~attach": [ - { - "@id": "libindy-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJwcm9vZ" - } - } - ], - "~thread": { - "thid": "6b5c57b3" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Accept proof request required following attributes ( proofRecordId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Accept proof request required following attributes ( proofRecordId )": { - "value": { - "statusCode": 400, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Accept proof request required following attributes ( proofRecordId )" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Internal Server Error": { - "value": { - "statusCode": 500, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Something went wrong: Lorem Ipsum" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/delete-proof-request/{proofRecordId}": { - "post": { - "operationId": "PresentationProofsController_deleteProofRequest", - "summary": "Delete proof request by proofRecordId", - "description": "Deletes a proofRecord in the proof repository.", - "parameters": [], - "responses": { - "200": { - "description": "Delete proof request", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Delete proof request": { - "value": { - "statusCode": 200, - "message": "Proof request deleted successfully", - "data": "" - } - } - } - } - } - }, - "400": { - "description": "Delete proof request required following attributes ( proofRecordId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Delete proof request required following attributes ( proofRecordId )": { - "value": { - "statusCode": 400, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Delete proof request required following attributes ( proofRecordId )" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Internal Server Error": { - "value": { - "statusCode": 500, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Something went wrong: Lorem Ipsum" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/decline-proof-request/{proofRecordId}": { - "post": { - "operationId": "PresentationProofsController_declineProofRequest", - "summary": "Decline proof request by proofRecordId", - "description": "Decline proof request as prover (by sending a presentation message) to the connection associated with the proof record.", - "parameters": [], - "responses": { - "200": { - "description": "Request declined successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Request declined successfully": { - "value": { - "statusCode": 200, - "message": "Request declined successfully", - "data": { - "_tags": { - "threadId": "6b5c57b3", - "state": "request-received", - "connectionId": "653b8cdc" - }, - "metadata": {}, - "id": "19c5269f", - "createdAt": "1970-01-01T00:00:00.498Z", - "requestMessage": { - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "@id": "6b5c57b3", - "comment": "Proof Presenation", - "request_presentations~attach": [ - { - "@id": "libindy-request-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJuYW=" - } - } - ] - }, - "state": "presentation-sent", - "connectionId": "653b8cdc", - "threadId": "6b5c57b3", - "presentationMessage": { - "@type": "https://didcomm.org/present-proof/1.0/presentation", - "@id": "c1089096", - "presentations~attach": [ - { - "@id": "libindy-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJwcm9vZ" - } - } - ], - "~thread": { - "thid": "6b5c57b3" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Accept proof request required following attributes ( proofRecordId )", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Accept proof request required following attributes ( proofRecordId )": { - "value": { - "statusCode": 400, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Accept proof request required following attributes ( proofRecordId )" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Internal Server Error": { - "value": { - "statusCode": 500, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Something went wrong: Lorem Ipsum" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/agent-proofs": { - "get": { - "operationId": "PresentationProofsController_getAllProofRequest", - "summary": "Fetch all proofs directly from the agent", - "description": "This call provides the capability to get all proof records directly from agent. Pagination and sorting does not implemented in that version of Aries Framework Javascript", - "parameters": [ - { - "name": "threadId", - "required": false, - "in": "query", - "schema": {} - } - ], - "responses": { - "200": { - "description": "Proofs fetched successfully", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Proofs fetched successfully": { - "value": { - "statusCode": 200, - "message": "Proofs fetched successfully", - "data": [ - { - "_tags": { - "threadId": "75045c1b", - "state": "request-received", - "connectionId": "e6d30380" - }, - "metadata": {}, - "id": "6f776996", - "createdAt": "1970-01-01T00:00:00.640Z", - "requestMessage": { - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "@id": "75045c1b", - "comment": "Proof Presenation", - "request_presentations~attach": [ - { - "@id": "libindy-request-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJ" - } - } - ] - }, - "state": "request-received", - "connectionId": "e6d30380", - "threadId": "75045c1b" - }, - { - "_tags": { - "connectionId": "a9371aed", - "state": "request-sent", - "threadId": "75045c1b" - }, - "metadata": {}, - "id": "fb556018", - "createdAt": "1970-01-01T00:00:00.568Z", - "requestMessage": { - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "@id": "75045c1b", - "comment": "Proof Presenation", - "request_presentations~attach": [ - { - "@id": "libindy-request-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJ" - } - } - ] - }, - "state": "request-sent", - "connectionId": "a9371aed", - "threadId": "75045c1b" - } - ] - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Internal Server Error": { - "value": { - "statusCode": 500, - "timestamp": "1970-01-01T00:00:00.891Z", - "message": "Something went wrong: Lorem Ipsum" - } - } - } - } - } - } - }, - "tags": ["Proofs"] - } - }, - "/v1/url/{id}": { - "get": { - "operationId": "PresentationProofsController_redirectToOriginalUrl", - "summary": "Get full url from short url id", - "description": "Get full url from short url id", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "tags": ["Proofs"] - } - } - }, - "info": { - "title": "Gaia-x Proof Manager API", - "description": "API documentation for GAIA-X Proof Manager", - "version": "1.0", - "contact": {} - }, - "tags": [], - "servers": [], - "components": { - "schemas": { - "SendProofRequest": { - "type": "object", - "properties": { - "comment": { - "type": "string", - "example": "comments" - }, - "connectionId": { - "type": "string", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - }, - "attributes": { - "example": [ - { - "attributeName": "attributeName", - "schemaId": "schemaId", - "credentialDefId": "credentialDefId" - } - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["comment", "connectionId", "attributes"] - }, - "SendProofRequestBody": { - "type": "object", - "properties": { - "comment": { - "type": "string", - "example": "comments" - }, - "schemaId": { - "type": "string", - "example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" - }, - "options": { - "type": "object", - "example": { - "type": "Aries1.0", - "credentialDefinitionId": "credentialDefinitionId" - } - }, - "attributes": { - "example": ["attributeName"], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["comment", "schemaId", "options", "attributes"] - } - } - } -} diff --git a/apps/schema-manager/LICENSE b/apps/schema-manager/LICENSE index 6bc596c6d9ae158f03739f543ee9d26c4fb5e8d6..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/schema-manager/LICENSE +++ b/apps/schema-manager/LICENSE @@ -1,636 +1,202 @@ -GAIA-X "Attestation Manager" -is the microservice which is responsible for handling the features -related to issuance of credentials of the GAIA-X project. It handles REST -endpoints for Schemas, Credential Definitions and Verifiable Credentials. - -Copyright 2022 Vereign AG - -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. - - -This Attestation Manager incorporates - -"elastic/ecs-winston-format", - -a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This Attestation Manager also incorporates - -"nestjs", - -a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma client" - -,an auto-generated query builder that enables type-safe database access and reduces -boilerplate, which is covered by the following copyright and permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"types/node" - -,type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/express" - -,type definitions for Express (http://expressjs.com), which is covered by the following -copyright and permission notice: - -Copyright Boris Yankov, China Medical University Hospital, Puneet Arora, and Dylan Frankland. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"types/jest" - -type definitions for Jest, which is covered by the following copyright and permission notice: - -Copyright Asana (https://asana.com)// Ivo Stratev, jwbay, Alexey Svetliakov, Alex Jover Morales, Allan Lukwago, -Ika, Waseem Dahman, Jamie Mason, Douglas Duteil, Ahn, Jeff Lau, Andrew Makarov, Martin Hochel, Sebastian Sebald, -Andy, Antoine Brault, Gregor Stamać, ExE Boss, Alex Bolenok, Mario Beltrán Alarcón, Tony Hallett, Jason Yu, Pawel Fajfer, -Regev Brody, Alexandre Germain, and Adam Jones. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -and - -"class-transformer" - -,a tool to transform plain object to some instance of class and versa, also to serialize / -deserialize object based on criteria, both of which are covered by the following copyright -and permission notice: - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"express" - -,a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"husky" - -, modern native Git hooks made easy, which is covered by the following copyright and -permission notice: - -Copyright (c) 2021 typicode - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -This Attestation Manager also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This Attestation Manager also incorporates - -"liquibase" - -, liquibase is an open-source database-independent library for tracking, managing and applying database schema change, which is covered -by the following copyright and permission notice: - -Copyright (c) Taylor Buckner <taylora.buckner@gmail.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This Attestation Manager also incorporates - -"pg - node postgres" - -, non-blocking PostgreSQL client for Node.js, which is covered by -the following copyright and permission notice: - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This Attestation Manager also incorporates - -"prisma" - -, next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, -SQLite, MongoDB and CockroachDB, which is covered by the following copyright and -permission notice: - -Copyright 2019 Johannes Schickling - -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. - - -This Attestation Manager also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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 + 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 2024 Gaia-X + + 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. - - -This Attestation Manager also incorporates - -"rimraf" - -, a `rm -rf` util for nodejs, which is covered by the following copyright -and permission notice: - -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - -(The ISC License) -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -This Attestation Manager also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This Attestation Manager also incorporates - -"Swagger UI Express" - -, allows to serve auto-generated swagger-ui generated API docs from express, -based on a swagger.json file, which is covered by the following copyright and -permission notice: - -Copyright (c) 2018 Scott IT London - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This Attestation Manager also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/schema-manager/README.md b/apps/schema-manager/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0b61ba3c5421e248d58d6b13a39b1e1359bf7d23 --- /dev/null +++ b/apps/schema-manager/README.md @@ -0,0 +1,78 @@ +# OCM Schema Manager + +## Introduction +The OCM Schema Manager API enables you to: +- Register Schemas on the ledger +- Register Credential Definitions on the ledger +- List registered schemas and credential definitions +- Fetch schemas and credential definitions by ID + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | + +## Usage + +Start in development mode: +```bash +pnpm start +``` + +### Operations +> **Note:** All requests need a `tenantId` query parameter. + +#### Register a new schema + +```bash +curl -X POST -d '{"issuerDid":"did:indy:...","name":"...",...}' http://ocm-indy.xfsc.dev/v1/schemas?tenantId=<tenantId> +``` + +Response: + +```json +{ + "statusCode": 201, + "data": { + "schemaId": "did:indy:...", + "name": "...", + "version": "...", + ... + } +} +``` + +#### Register a credential definition + +```bash +curl -X POST -d '{"schemaId":"did:indy:...","tag":"...","supportRevocation":true}' http://ocm-indy.xfsc.dev/v1/credential-definitions?tenantId=<tenantId> +``` + +Response: + +```json +{ + "statusCode": 201, + "data": { + "credentialDefinitionId": "did:indy:...", + "schemaId": "did:indy:...", + ... + } +} +``` + +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). + +## License +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/schema-manager/openapi.json b/apps/schema-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..b3a5233ec0031e4cf1ac15b32867313cd5a052ec --- /dev/null +++ b/apps/schema-manager/openapi.json @@ -0,0 +1,552 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/schemas": { + "get": { + "operationId": "SchemasController_getAll", + "summary": "Fetch a list of schemas", + "description": "This call provides a list of schemas for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Schemas fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Schemas fetched successfully": { + "value": { + "statusCode": 200, + "message": "Schemas fetched successfully", + "data": [] + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Schemas"] + }, + "post": { + "operationId": "SchemasController_register", + "summary": "Register a new schema", + "description": "This call provides the capability to create new schema on ledger by name, author, version, schema attributes and type. Later this schema can be used to issue new credential definition. This call returns an information about created schema.", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RegisterSchemaPayload" } + } + } + }, + "responses": { + "201": { + "description": "Schema registered successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Schema registered successfully": { + "value": { + "statusCode": 201, + "message": "Schema registered successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "400": { + "description": "All fields are required for schema registration", + "content": { + "application/json": { + "schema": {}, + "examples": { + "All fields are required for schema registration": { + "value": { + "statusCode": 400, + "message": "All fields are required for schema registration", + "error": "Bad Request" + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "409": { + "description": "Schema already exists", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Schema already exists": { + "value": { + "statusCode": 409, + "message": "Schema already exists", + "error": "Conflict" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Schemas"] + } + }, + "/v1/schemas/{schemaId}": { + "get": { + "operationId": "SchemasController_getById", + "summary": "Fetch a schema by id", + "description": "This call allows you to retrieve schema data for a given tenant by specifying the `schemaId`.", + "parameters": [ + { + "name": "schemaId", + "required": true, + "in": "path", + "description": "The schema ID to retrieve", + "schema": { "format": "string", "type": "string" } + }, + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Schema fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Schema fetched successfully": { + "value": { + "statusCode": 200, + "message": "Schema fetched successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "data": null + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Schemas"] + } + }, + "/v1/credential-definitions": { + "get": { + "operationId": "CredentialDefinitionsController_find", + "summary": "Fetch a list of credential definitions", + "description": "This call provides a list of credential definitions for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential definitions fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential definitions fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential definitions fetched successfully", + "data": [{ "id": "71b784a3" }] + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "error": "Not Found" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Definitions"] + }, + "post": { + "operationId": "CredentialDefinitionsController_register", + "summary": "Create a credential definition", + "description": "This call allows you to create a credential definition for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCredentialDefinitionPayload" + } + } + } + }, + "responses": { + "201": { + "description": "Credential definition created successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential definition created successfully": { + "value": { + "statusCode": 201, + "message": "Credential definition created successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Invalid request": { + "value": { + "statusCode": 400, + "message": "Invalid request", + "error": "Bad Request" + } + } + } + } + } + }, + "404": { + "description": "Tenant not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Tenant not found": { + "value": { + "statusCode": 404, + "message": "Tenant not found", + "error": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Credential definition already exists", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential definition already exists": { + "value": { + "statusCode": 409, + "message": "Credential definition already exists", + "error": "Conflict" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Definitions"] + } + }, + "/v1/credential-definitions/{credentialDefinitionId}": { + "get": { + "operationId": "CredentialDefinitionsController_get", + "summary": "Fetch a credential definition by ID", + "description": "This call provides a credential definition for a given tenant", + "parameters": [ + { + "name": "tenantId", + "required": true, + "in": "query", + "description": "Specifies the tenant ID", + "schema": { "type": "string" } + }, + { + "name": "credentialDefinitionId", + "required": true, + "in": "path", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Credential definition fetched successfully", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential definition fetched successfully": { + "value": { + "statusCode": 200, + "message": "Credential definition fetched successfully", + "data": { "id": "71b784a3" } + } + } + } + } + } + }, + "404": { + "description": "Credential definition not found", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Credential definition not found": { + "value": { + "statusCode": 404, + "message": "Credential definition not found", + "error": "Not Found" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Internal server error": { + "value": { + "statusCode": 500, + "message": "Internal server error", + "error": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": ["Credential Definitions"] + } + } + }, + "info": { + "title": "Gaia-X OCM Schema Manager", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "RegisterSchemaPayload": { + "type": "object", + "properties": { + "issuerDid": { "type": "string" }, + "name": { "type": "string" }, + "version": { "type": "string" }, + "attributeNames": { "type": "array", "items": { "type": "string" } } + }, + "required": ["issuerDid", "name", "version", "attributeNames"] + }, + "CreateCredentialDefinitionPayload": { + "type": "object", + "properties": { + "issuerDid": { "type": "string" }, + "schemaId": { "type": "string" }, + "tag": { "type": "string" }, + "supportsRevocation": { "type": "boolean" } + }, + "required": ["issuerDid", "schemaId", "tag", "supportsRevocation"] + } + } + } +} diff --git a/apps/schema-manager/package.json b/apps/schema-manager/package.json index e408aa7d56ad21cca726bd23df832e53cb502410..6b7946d56e456765da76a688ac7320f218db6be5 100644 --- a/apps/schema-manager/package.json +++ b/apps/schema-manager/package.json @@ -2,8 +2,9 @@ "name": "@ocm/schema-manager", "version": "1.0.0", "description": "Gaia-X OCM Schema Manager", - "author": "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>", + "author": "Gaia-X", "contributors": [ + "Berend Sliedrecht <berend@animo.id>", "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" ], "private": true, diff --git a/apps/shared/LICENSE b/apps/shared/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6300b5d99b0da44567e15af74ae5261ef2dd11a7 --- /dev/null +++ b/apps/shared/LICENSE @@ -0,0 +1,202 @@ + + 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 2024 Gaia-X + + 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/apps/shared/package.json b/apps/shared/package.json index 600a51501de37c680fc12ca6438608ec169fee82..defc96c570fe2fe3351d5bffe3c14e86db1cc627 100644 --- a/apps/shared/package.json +++ b/apps/shared/package.json @@ -1,8 +1,12 @@ { "name": "@ocm/shared", "version": "0.0.1", - "description": "Shared functionality that can be reused between the services", - "author": "Spherity", + "description": "Gaia-X OCM Shared Module", + "author": "Gaia-X", + "contributors": [ + "Berend Sliedrecht <berend@animo.id>", + "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" + ], "private": true, "type": "module", "license": "Apache-2.0", diff --git a/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md b/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md deleted file mode 100644 index b858705e2c1ca5f949ad1de9cceceda9a720efdb..0000000000000000000000000000000000000000 --- a/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md +++ /dev/null @@ -1,39 +0,0 @@ -<hr/> - -# Event types published on nats - -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/BasicMessageStateChanged', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/ConnectionStateChanged', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/CredentialStateChanged', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/ProofStateChanged', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/MediationStateChanged', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/RecipientKeylistUpdated', - } - ``` -- ``` - { - endpoint: 'SSI_ABSTRACTION_SERVICE/OutboundWebSocketClosedEvent', - } - ``` diff --git a/apps/ssi-abstraction/GDPR.md b/apps/ssi-abstraction/GDPR.md deleted file mode 100644 index b8b842a3a15cdc6f5d845f5aa7753c852a3f85b3..0000000000000000000000000000000000000000 --- a/apps/ssi-abstraction/GDPR.md +++ /dev/null @@ -1,37 +0,0 @@ -# GDPR Compliance Document - -The objective of this document is to detail, the data being stored and proccessed by the Organization Credential Manager's, SSI Abstraction Services. - -## What information is stored - -### Source User Information - -- Verifiable Credential Specific Information - The various VC's issued by the particular OCM. -- Proof Presentation Specific Information - Credential Claims. - -### Technical User Information (Public) - -- Connection Information - The list of connections with different PCM and OCM agents and Pairwise DID. -- Schema information (public) -- Credential/credential definition ids and states -- DID of issuer -- DID of holder -- Created/updated dates - -## How is the information stored - -### Source User Information - -User specific Source User Information is encrypted using the Private Key of the Organizations SSI Agent and stored until the issuance of credential in Organization's SSI Agent's PostgreSQL database. - -### Technical User Information (Public) - -Technical User Information is encrypted using the Private Key of the Organizations SSI Agent and stored internally (on the agent) on PostgreSQL. - -## Who can access the information - -The Source User Information and Technical User Information both are accessible only by the Organization specific SSI agent's private key. - -## How long will the information stay - -The Source User Information and Technical User Information is never wiped out unless the Agent Database is cleared. diff --git a/apps/ssi-abstraction/LICENSE b/apps/ssi-abstraction/LICENSE index c6373b1ab3650d672b6736909974ebafc0dfbd45..6300b5d99b0da44567e15af74ae5261ef2dd11a7 100644 --- a/apps/ssi-abstraction/LICENSE +++ b/apps/ssi-abstraction/LICENSE @@ -1,651 +1,202 @@ -GAIA-X "SSI-Abstraction" -core GAIA-X service for the Organizational Credential Manager, providing the DIDComm -functionality and initializing the agent, wallet and ledger interactions of the whole application. - -Copyright 2022 Vereign AG - -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. - - -This SSI-Abstraction incorporates - -"credo-ts" - -Aries Framework JavaScript is a framework written in TypeScript for building -SSI Agents and DIDComm services that aims to be compliant and interoperable with -the standards defined in the Aries RFCs, which is covered by the following -copyright and permission notice: - -Copyright 2020-present Hyperledger Contributors. -Copyright 2021 Queen’s Printer for Ontario. Mostafa Youssef (https://github.com/MosCD3), -Amit Padmani (https://github.com/nbAmit), Prasad Katkar (https://github.com/NB-PrasadKatkar), -Mike Richardson (https://github.com/NB-MikeRichardson) - -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 + 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 2024 Gaia-X + + 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. - - -This SSI-Abstraction incorporates - -"elastic/ecs-winston-format", - -a Node.js package to provide a formatter for the winston logger compatible -with Elastic Common Schema (ECS) logging, which is covered by the following copyright -and permission notice: - -Copyright 2020 Elastic and contributors - -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. - - -This SSI-Abstraction also incorporates - -"nestjs", - -a progressive Node.js framework for building efficient and scalable server-side applications, -which is covered by the following copyright and permission notice: - -Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"nestjs/terminus" - -, integrated healthchecks for Nest, which contains the -following copyright and permission notice: - -Copyright (c) 2018-2021 Livio Brunner, Kamil Myśliwiec - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"types/node" - -,type definitions for Node, which is covered by the following copyright and -permission notice: - -Copyright Microsoft TypeScript, DefinitelyTyped, Alberto Schiabel, -Alvis HT Tang, Andrew Makarov, Benjamin Toueg, Chigozirim C., David Junger, Deividas Bakanas, Eugene Y. Q. Shen, -Hannes Magnusson, Huw, Kelvin Jin, Klaus Meinhardt, Lishude, Mariusz Wiktorczyk, Mohsen Azimi, Nicolas Even, -Nikita Galkin, Parambir Singh, Sebastian Silbermann, Simon Schick, Thomas den Hollander, Wilco Bakker, wwwy3y3, -Samuel Ainsworth, Kyle Uehlein, Thanik Bhongbhibhat, Marcin Kopacz, Trivikram Kamat, Junxiao Shi, Ilia Baryshnikov, -ExE Boss, Piotr Błażejewicz, Anna Henningsen, Victor Perin, Yongsheng Zhang, NodeJS Contributors, -Linus Unnebäck, wafuwafu13, and Matteo Collina. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"types/express" - -,type definitions for Express (http://expressjs.com), which is covered by the following -copyright and permission notice: - -Copyright Boris Yankov, China Medical University Hospital, Puneet Arora, and Dylan Frankland. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"types/jest" - -type definitions for Jest, which is covered by the following copyright and permission notice: - -Copyright Asana (https://asana.com)// Ivo Stratev, jwbay, Alexey Svetliakov, Alex Jover Morales, Allan Lukwago, -Ika, Waseem Dahman, Jamie Mason, Douglas Duteil, Ahn, Jeff Lau, Andrew Makarov, Martin Hochel, Sebastian Sebald, -Andy, Antoine Brault, Gregor Stamać, ExE Boss, Alex Bolenok, Mario Beltrán Alarcón, Tony Hallett, Jason Yu, Pawel Fajfer, -Regev Brody, Alexandre Germain, and Adam Jones. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -This Proof Manager also incorporates - -"DefinitelyTyped, types/shelljs, types/supertest" - -, the repository for high quality TypeScript type definitions, which is covered by the -following copyright and permission notice: - -Copyrights are respective of each contributor listed at the beginning of each -definition file. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"axios" - -, promise based HTTP client for the browser and node.js, which is covered -by the following license and permission notice: - -Copyright (c) 2014-present Matt Zabriskie & Collaborators - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"class-validator" - -, a tool to allow decorator and non-decorator based validation, - -Copyright 2015-2020 TypeStack - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"express" - -,a fast, unopinionated, minimalist web framework for node, which is covered by the following copyright -and permission notice: - -Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com> -Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"joi" - -, the most powerful schema description language and data validator for JavaScript, which is -covered by the following copyright and permission notice: - -Copyright (c) 2012-2020, Sideway. Inc, and project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -- The names of any contributors may not be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This SSI-Abstraction also incorporates - -"moment" - -, a JavaScript date library for parsing, validating, manipulating, and formatting dates, -which is covered by the following copyright and permission notice: - -Copyright (c) JS Foundation and other contributors - -(The MIT License) -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"nats" - -, a Node.js client for the NATS messaging system, which is covered by -the following copyright and permission notice: - -Copyright 2013-2018 The NATS Authors - -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. - - -This SSI-Abstraction also incorporates - -"pg - node postgres" - -, non-blocking PostgreSQL client for Node.js, which is covered by -the following copyright and permission notice: - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"reflect-metadata" - -, prototype for a Metadata Reflection API for ECMAScript, which is covered -by the following copyright and permission notice: - -Copyright 2019 Ron Buckton - -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. - - -This SSI-Abstraction also incorporates - -"rimraf" - -, a `rm -rf` util for nodejs, which is covered by the following copyright -and permission notice: - -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - -(The ISC License) -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -This SSI-Abstraction also incorporates - -"rxjs" - -, reactive extensions for JavaScript, which is covered by the following copyright -and permission notice: - -Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - -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. - - -This SSI-Abstraction also incorporates - -"ShellJS" - -, portable Unix shell commands for Node.js, which is covered by the following -copyright and permission notice: - -Copyright (c) 2012, Artur Adib <arturadib@gmail.com> -All rights reserved. - -(BSD 3-Clause License) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This SSI-Abstraction also incorporates - -"Swagger UI Express" - -, allows to serve auto-generated swagger-ui generated API docs from express, -based on a swagger.json file, which is covered by the following copyright and -permission notice: - -Copyright (c) 2018 Scott IT London - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"winston" - -, a logger for just about everything, which is covered by the following copyright and -permission notice: - -Copyright (c) 2010 Charlie Robbins - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -This SSI-Abstraction also incorporates - -"winston-elasticsearch" - -, an elasticsearch transport for winston, which is covered by the following copyright and -permission notice: - -Copyright (c) 2015 - 2018 Thomas Hoppe. -Copyright (c) 2013 Jacques-Olivier D. Bernier. - -(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 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/apps/ssi-abstraction/README.md b/apps/ssi-abstraction/README.md index 7e3e4d4fabd46e0b0aadcfdd771c06a6cc994063..53f79b18ea1d9d36e5e6b33a094a92a711eb0712 100644 --- a/apps/ssi-abstraction/README.md +++ b/apps/ssi-abstraction/README.md @@ -1,118 +1,52 @@ -# SSI Abstraction Service - -## Description - -<hr/> - <p align="center">A core service for the Organizational Credential Manager, providing the DIDComm functionality and initializing the agent, wallet and ledger interactions of the whole application.</p> +# OCM SSI Abstraction Manager + +## Introduction +SSI Abstraction is a core component of the OCM microservices stack, designed to interface with the Indy Ledger. This connection is facilitated through the `AGENT_LEDGER_ID` environment variable, which specifies the target ledger for operations and transactions. + +Underpinning SSI Abstraction is the engine credo-ts, which leverages an internal SQLite database to store and manage data efficiently. This database is integral to the operation of SSI Abstraction, providing a robust and reliable storage solution that supports the service's functionality and performance requirements. + +SSI Abstraction is designed to subscribe to a specific set of events, facilitating its communication within the OCM ecosystem. This subscription model is central to how SSI Abstraction receives and processes requests from other services in the stack. The List of these events is in the `events.md` file. Communication with SSI Abstraction is achieved as other services publish these predefined events on NATS. This mechanism ensures a decoupled, scalable, and efficient way for services to interact and fulfill their roles within the microservices architecture. + +SSI Abstraction requires an S3-compatible server to store tails files, which are essential for the credential revocation mechanism within the Indy ledger system. Details, such as the server URL, the access key and the secret key, are set with respective environment variables. + +In the SSI Abstraction component, the endorser DID seed plays a critical role in the endorsement of tenants' transactions on the ledger. This seed is a foundational element used to generate a Digital Identity (DID) that possesses the authority to endorse transactions, ensuring they are valid and authorized for inclusion on the ledger. The endorser DID seed is configured within SSI Abstraction through the `AGENT_INDY_DID_SEED` environment variable. By setting this variable, administrators can define the specific seed value that will be used to generate the endorser DID, thereby granting the necessary permissions for transaction endorsement. + +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). +You will also need a DID which has at least the 'ENDORSER' permission on the ledger. + +## Configuration +Set configuration via environment variables or an `.env` file: + +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | Username for NATS authentication | | +| `NATS_PASSWORD` | Password for NATS authentication | | +| `NATS_MONITORING_URL` | URL for accessing NATS monitoring interface | `http://localhost:8222` | +| `AGENT_NAME` | Name identifier for the agent within the ecosystem | | +| `AGENT_WALLET_ID` | Unique identifier for the agent's wallet | | +| `AGENT_WALLET_KEY` | Key of the agent's wallet | | +| `AGENT_HOST` | Hostname or IP address where the agent service is accessible | | +| `AGENT_INBOUND_PORT` | Port for inbound connections to the agent | `3001` | +| `AGENT_INDY_DID_SEED` | Seed used to generate the agent's DID for transactions on the ledger | | +| `AGENT_AUTO_ACCEPT_CONNECTION` | Automatically accept incoming connection requests | `true` | +| `AGENT_AUTO_ACCEPT_CREDENTIAL` | Automatically accept incoming credential offers | `contentApproved` | +| `AGENT_LEDGER_ID` | Identifier for the ledger the agent interacts with | | +| `TAILS_SERVER_BASE_URL` | Base URL for the server hosting tails files for revocation | | +| `TAILS_SERVER_BUCKET_NAME` | Name of the bucket on the tails file server | | +| `S3_ACCESS_KEY` | Access key for S3 or S3-compatible storage service | | +| `S3_SECRET` | Secret key for S3 or S3-compatible storage service | | ## Usage -<hr/> - -### Endpoint documentation at: - -[Aries REST Extension](swagger.json) - -[Full Agent Events](EVENTS-DOCUMENTATION.md) - -[Sign and Verify Interface](SIGN-AND-VERIFY.md) - -with the default exposed ports: - -- 3010 - Aries REST extension -- 3009 - Sign and Veify interface exposed -- 4000 - didcomm interface - -## Installation - -<hr/> - -Dependencies: - -```bash -$ pnpm install -``` - -- **If docker is not installed, [Install docker](https://docs.docker.com/engine/install/)**. - -- **If docker-compose is not installed, [Install docker-compose](https://docs.docker.com/compose/install/)**. - -- (optional) Postgres GUI - https://dbeaver.io/download/ - -<hr/> - -## Running the app - -<hr/> - -### Environment variables - -[.env.example](.env.example) - -- PORT is the port for the signing and verification interface -- AGENT_AUTO_ACCEPT_CONNECTION can be either true or false -- AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never -- AGENT_INDY_DID_SEED will generate the did and verkey (32 symbols) -- for security reasons AGENT_WALLET_KEY and AGENT_WALLET_ID should be different -- AGENT_LEDGER_ID can be: ID_UNION,BCOVRIN_TEST,GREEN_LIGHT - - - the three pool transaction genesis are inside the code configuration - - every ledger can be provided on its own - - multiple ledgers can also be specified, separated by a comma - -- AGENT_ID_UNION_KEY is needed if the ledger of choice is IDUnion - -**Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.** - -**The .env files are in the infrastructure repository under /env** - -### There are two separate Dockefiles in "./deployment" of every project: - -```bash - ## production in: - ./deployment/ci - ## development in: - ./deployment/dev -``` - -- (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles. - -- Run while in **"infrastructure"** project: - -```bash -$ docker-compose up --build -``` - -## Test - -<hr/> - +Start in development mode: ```bash -# unit tests -$ pnpm test - -# e2e tests -$ pnpm test:e2e - -# test coverage -$ pnpm test:cov +pnpm start ``` -## GDPR - -<hr/> - -[GDPR](GDPR.md) - -## Dependencies - -<hr/> - -[Dependencies](package.json) - ## License +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). -<hr/> - -[Apache 2.0 license](LICENSE) diff --git a/apps/ssi-abstraction/SIGN-AND-VERIFY.md b/apps/ssi-abstraction/SIGN-AND-VERIFY.md deleted file mode 100644 index b17386b1b514da77fbe209fdb05faa6645beedb9..0000000000000000000000000000000000000000 --- a/apps/ssi-abstraction/SIGN-AND-VERIFY.md +++ /dev/null @@ -1,86 +0,0 @@ -## Signing and verification interface is accessible on SSI Abstraction - -### METHOD: POST - -**type: "buffer" is necessary to know internally what transformation needs to be done** - -``` -:3009/v1/agent/wallet/sign - -body : { - data: [ - { - type: "buffer", - dataBase64: base64 string - }, - verkey: string - ] -} - - -``` - -### Returns - -``` -{ - statusCode: Number, - message: string, // The message is the path you followed on the agent object - data: base64 string, // signature -} -``` - -<hr/> -and -<hr/> - -### METHOD: POST - -``` -:3009/v1/agent/wallet/verify - -body : { - data: [ - signerVerkey: string, - { - type: "buffer", - dataBase64: base64 string //// This is the data to be verified - }, - { - type: "buffer", - dataBase64: base64 string //// This is the signature - } - ] -} -``` - -### Returns - -``` -{ - statusCode: Number, - message: string, // The message is the path you followed on the agent object - data: boolean // returns validity of signature on the data -} -``` - -## Get Agent Info endpoint (did, verkey) on SSI Abstraction - -### METHOD: GET - -``` -:3009/v1/agent/info -``` - -### Returns - -``` -{ - "statusCode": 200, - "message": "Success", - "data": { - "did": string, // did of the OCM agent - "verkey": string // verkey needed for signing and verification - } -} -``` diff --git a/apps/ssi-abstraction/events.md b/apps/ssi-abstraction/events.md new file mode 100644 index 0000000000000000000000000000000000000000..71fdd7d8a24f90ea3d7253c0171446813245a370 --- /dev/null +++ b/apps/ssi-abstraction/events.md @@ -0,0 +1,42 @@ +# OCM NATS Events + +| Token | +|-| +| `didcomm.connections.getAll` | +| `didcomm.connections.getById` | +| `didcomm.connections.createInvitation` | +| `didcomm.connections.receiveInvitationFromUrl` | +| `didcomm.connections.createWithSelf` | +| `didcomm.connections.block` | +| `didcomm.connections.parseInvitation` | +| `anoncreds.credentialDefinitions.getAll` | +| `anoncreds.credentialDefinitions.getById` | +| `anoncreds.credentialDefinitions.register` | +| `anoncreds.credentials.getAll` | +| `anoncreds.credentials.getById` | +| `didcomm.anoncreds.credentials.acceptOffer` | +| `didcomm.anoncreds.credentials.offer` | +| `didcomm.anoncreds.credentials.offerToSelf` | +| `anoncreds.credentials.offerToSelf.deleteById` | +| `anoncreds.credentialOffers.getAll` | +| `anoncreds.credentialOffers.getById` | +| `anoncreds.credentialRequests.getAll` | +| `anoncreds.credentialRequests.getById` | +| `dids.resolve` | +| `dids.register.indy.endorser` | +| `dids.register.indy.fromSeed` | +| `dids.didConfiguration` | +| `anoncreds.proofs.getAll` | +| `anoncreds.proofs.getById` | +| `didcomm.anoncreds.proofs.request` | +| `anoncreds.proofs.deleteById` | +| `didcomm.anoncreds.proofs.acceptRequest` | +| `anoncreds.revocation.revoke` | +| `anoncreds.revocation.registerRevocationStatusList` | +| `anoncreds.revocation.tailsFile` | +| `anoncreds.revocation.checkCredentialStatus` | +| `anoncreds.schemas.getAll` | +| `anoncreds.schemas.getById` | +| `anoncreds.schemas.register` | +| `tenants.create` | +| `tenants.getAllTenantIds` | diff --git a/apps/ssi-abstraction/package.json b/apps/ssi-abstraction/package.json index 15c6be7be8d8eec20cb2d9690a6a9f8539d527e7..6c11860b4e26b6cbab639e4876401fb31254872d 100644 --- a/apps/ssi-abstraction/package.json +++ b/apps/ssi-abstraction/package.json @@ -1,9 +1,12 @@ { "name": "@ocm/ssi-abstraction", "version": "0.0.1", - "description": "A core OCM service that provides the SSI interface through REST endpoints and events.", - "author": "Vereign", - "private": true, + "description": "Gaia-X OCM SSI Abstraction Layer", + "author": "Gaia-X", + "contributors": [ + "Berend Sliedrecht <berend@animo.id>", + "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" + ], "type": "module", "license": "Apache-2.0", "scripts": { diff --git a/apps/tenant-manager/LICENSE b/apps/tenant-manager/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6300b5d99b0da44567e15af74ae5261ef2dd11a7 --- /dev/null +++ b/apps/tenant-manager/LICENSE @@ -0,0 +1,202 @@ + + 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 2024 Gaia-X + + 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/apps/tenant-manager/README.md b/apps/tenant-manager/README.md index a57487e62ae6b9aab371c9fbcadd97860043e44a..9a80217855cb4e34acbc4410f59cd765e7e3ea44 100644 --- a/apps/tenant-manager/README.md +++ b/apps/tenant-manager/README.md @@ -1,32 +1,78 @@ -# Gaia-X OCM Tenant Manager +# OCM Tenant Manager -The Gaia-X OCM Tenant Manager is a component of the Gaia-X Open Common Metadata (OCM) project. It provides functionality for managing tenants within the Gaia-X ecosystem. +## Introduction +The OCM Tenant Manager is a component of the Gaia-X Open Common Metadata (OCM) project. It provides functionality for managing tenants within the Gaia-X ecosystem. -## Table of Contents +The OCM Tenant Manager enables you to: +- Create new tenants +- List existing tenants -- [Introduction](#introduction) -- [Features](#features) -- [Installation](#installation) -- [Usage](#usage) -- [Contributing](#contributing) -- [License](#license) +## Prerequisites +Ensure you have Node.js installed ([official Node.js website](https://nodejs.org)). -## Introduction +## Configuration +Set configuration via environment variables or an `.env` file: -The Gaia-X OCM Tenant Manager is designed to facilitate the management of tenants in the Gaia-X ecosystem. It allows users to create, update, and delete tenants, as well as manage their associated resources. +| Property | Description | Default | +|---|---|---| +| `HTTP_HOSTNAME` | HTTP server hostname | `0.0.0.0` | +| `HTTP_PORT` | HTTP server port | `3000` | +| `NATS_URL` | NATS Server URL | `nats://localhost:4222` | +| `NATS_USER` | NATS user | | +| `NATS_PASSWORD` | NATS password | | +| `NATS_MONITORING_URL` | NATS Monitoring URL | `http://localhost:8222` | -## Features +## Usage -- Create new tenants -- Update existing tenants -- Delete tenants -- Manage tenant resources +Start in development mode: +```bash +pnpm start +``` + +### Operations + +#### Create a tenant + +```bash +curl -X POST -d '{"label":"Alice"}' http://ocm-indy.xfsc.dev/v1/tenants +``` + +Response: + +```json +{ + "statusCode": 201, + "data": { + "_tags": {}, + "metadata": {}, + "storageVersion": "0.5", + "id": "907a9007-29fb-448e-aa91-34f28e4db5ce", + "createdAt": "2024-03-12T08:46:26.615Z", + "config": { + "label": "issuer", + ... + }, + ... + } +} +``` + +#### List existing tenants -## Installation +```bash +curl -X GET http://ocm-indy.xfsc.dev/v1/tenants +``` -To install the Gaia-X OCM Tenant Manager, follow these steps: +Response: +```json +{ + "statusCode": 200, + "data": ["907a9007-29fb-448e-aa91-34f28e4db5ce"] +} +``` -1. Clone the repository: +## API Reference +For detailed documentation, refer to the [OpenAPI Specification](openapi.json). - ```bash - git clone https://github.com/gaia-x/ocm-tenant-manager.git +## License +Licensed under the Apache 2.0 License ([LICENSE](LICENSE)). diff --git a/apps/tenant-manager/openapi.json b/apps/tenant-manager/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..86fe885440a932f80adce98a5f3f5cf84da9edb7 --- /dev/null +++ b/apps/tenant-manager/openapi.json @@ -0,0 +1,50 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/tenants": { + "get": { + "operationId": "TenantsController_find", + "parameters": [], + "responses": { "200": { "description": "" } }, + "tags": ["Tenants"] + }, + "post": { + "operationId": "TenantsController_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateTenantPayload" } + } + } + }, + "responses": { "201": { "description": "" } }, + "tags": ["Tenants"] + } + } + }, + "info": { + "title": "Gaia-X OCM Tenant Manager", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "CreateTenantPayload": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label of the tenant", + "example": "Alice" + } + }, + "required": ["label"] + } + } + } +} diff --git a/documentation/Architecture.md b/documentation/Architecture.md new file mode 100644 index 0000000000000000000000000000000000000000..51e3cedfc94f30f4009a0983f54cc5a561630b68 --- /dev/null +++ b/documentation/Architecture.md @@ -0,0 +1,54 @@ +# Chapter: System Architecture of Organization Credential Manager (OCM) + +## Introduction to Microservice Architecture + +In today's fast-paced and scalable application development environments, microservice architecture has emerged as a pivotal design choice. This architectural style structures an application as a collection of loosely coupled services, each implementing a specific business functionality or process. Unlike monolithic architectures, where different functions are tightly integrated into a single application, microservices are developed, deployed, and scaled independently. + +### Advantages of Microservice Architecture + +1. **Scalability**: Microservices can be independently scaled to meet demand for specific functionalities of the application, allowing for efficient resource utilization. +2. **Flexibility**: Teams can develop, test, and deploy updates to individual microservices without impacting the entire system, enabling rapid iteration and innovation. +3. **Resilience**: The failure of a single microservice does not necessarily compromise the entire system, enhancing overall resilience and uptime. +4. **Technology Diversity**: Microservices allow for the use of different technology stacks across various components, catering to the optimal tools for specific tasks. + +## OCM Architecture Components + +The Organization Credential Manager (OCM) leverages microservice architecture to offer a modular, scalable, and efficient solution for managing digital identities and credentials. Here is an overview of the key components within the OCM architecture: + +### SSI Abstraction + +This component encapsulates the `Credo` JavaScript library, offering a comprehensive suite of tools for implementing Self-Sovereign Identity (SSI) solutions. It abstracts the complexity of SSI functionalities, providing a simplified interface for other services within the OCM architecture. + +- **URL**: [https://credo.js.org/](https://credo.js.org/) + +### Tenant Manager + +The Tenant Manager is a dedicated service responsible for managing tenants within the OCM installation. It ensures that tenant data is isolated and managed securely, enabling organizations to maintain separate environments for different user groups or projects. + +### DID Manager + +The Decentralized Identifiers (DID) Manager oversees the creation, resolution, and management of DIDs. These identifiers are central to establishing and verifying digital identities in a decentralized manner, pivotal for the integrity and trustworthiness of the OCM system. + +### Schema Manager + +This service manages schemas and credential definitions, primarily focusing on the Indy framework. It plays a crucial role in defining the structure and rules for the credentials being issued, ensuring consistency and compatibility across the ecosystem. + +### Connection Manager + +The Connection Manager facilitates the management of connections between OCM users and other parties. It ensures secure and reliable communication channels for exchanging credentials and proofs, vital for the seamless operation of SSI solutions. + +### Credential Manager + +Responsible for issuing credentials based on the AnonCreds protocol, the Credential Manager allows for the creation of verifiable digital credentials. These credentials can be securely shared and verified across the network without revealing unnecessary personal information. + +### Proof Manager + +The Proof Manager handles the creation and management of proof requests. It enables verifiers to request and receive proofs of credentials from holders, ensuring the authenticity and validity of the shared information without compromising the holder's privacy. + +### Scalability and Independence + +Thanks to the microservice architecture, each of these services can be scaled independently to address higher loads. This design allows the OCM system to efficiently manage resources and maintain high performance, even as demand for specific services varies. + +## Conclusion + +The Organization Credential Manager (OCM) is designed with a modern, microservice-based architecture to deliver a scalable, resilient, and flexible solution for digital identity management. Through its suite of specialized components, OCM provides a comprehensive ecosystem for managing decentralized identifiers, credentials, and connections, ensuring a robust infrastructure for SSI applications. diff --git a/documentation/Attestation_Manager_Complete.postman_collection.json b/documentation/Attestation_Manager_Complete.postman_collection.json deleted file mode 100644 index 97596a08e47b9a62abb2d938e0994f1c107146b7..0000000000000000000000000000000000000000 --- a/documentation/Attestation_Manager_Complete.postman_collection.json +++ /dev/null @@ -1,528 +0,0 @@ -{ - "info": { - "_postman_id": "fb7eaa5c-4a0e-4fcc-8c75-c71b76716709", - "name": "Attestation Manager Complete", - "description": "Attestation Manager is the collection of apis which are used used to create schema and credential definition, offer verifiable credentials and issue them, get list of schemas and credential definition by different filters.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17714957" - }, - "item": [ - { - "name": "Autoissue-PCM-VC", - "item": [ - { - "name": "Create-pcm-schema", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"pcm-schema-id\", res.data.schemaID);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"name\": \"principal_schema_01-07-22\",\r\n \"version\": \"01.07.22\",\r\n \"attributes\": [\r\n \"email\",\r\n \"issuerDID\",\r\n \"subjectDID\",\r\n \"federationName\",\r\n \"employeeID\",\r\n \"federationID\",\r\n \"firstName\",\r\n \"lastName\",\r\n \"address\"\r\n ],\r\n \"createdBy\": \"acceptsAnyStrings\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/schemas", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "schemas"] - } - }, - "response": [] - }, - { - "name": "Create-pcm-cred-def", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"pcm-vc-cred-def-id\", res.data.credDefId);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"name\": \"principal_member-010722-01\",\r\n \"isRevokable\": false,\r\n \"isAutoIssue\": false,\r\n \"schemaID\": \"{{pcm-schema-id}}\",\r\n \"createdBy\": \"acceptsAnyString\",\r\n \"expiryHours\" : \"-1\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/credentialDef", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credentialDef"] - } - }, - "response": [] - }, - { - "name": "Post-credentialType-for-autoissue", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"type\": \"principalMemberCredential\",\n \"schemaId\": \"{{pcm-schema-id}}\"\n}" - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/credentialType", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credentialType"] - } - }, - "response": [] - }, - { - "name": "update-credDefId-Type", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"{{pcm-schema-id}}\"\n}" - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/updateSchemaIdByType?type=principalMemberCredential", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "updateSchemaIdByType"], - "query": [ - { - "key": "type", - "value": "principalMemberCredential" - } - ] - } - }, - "response": [] - }, - { - "name": "Offer-pcm-cred-def-MANUALLY-temp", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"cred-offer-id\", res.data.id);\r", - "}\r", - "\r", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "const arr = JSON.parse(pm.environment.get(\"schema_attr\"))\r", - "for (let i = 0; i < arr.length; i++) {\r", - " pm.globals.set(\"array\"+[i], arr[i]);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"connectionId\": \"{{conn-id}}\",\r\n \"credentialDefinitionId\": \"{{pcm-vc-cred-def-id}}\",\r\n \"comment\": \"Created\",\r\n \"attributes\": [\r\n {\r\n \"name\": \"email\",\r\n \"value\": \"alena@vomoto.com\"\r\n },\r\n {\r\n \"name\": \"issuerDID\",\r\n \"value\": \"H1XnVZzx83suh2x71jnFJt\"\r\n },\r\n {\r\n \"name\": \"subjectDID\",\r\n \"value\": \"H1XnVZzx83suh2x71jnFJt\"\r\n }\r\n ],\r\n \"autoAcceptCredential\": \"never\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/create-offer-credential/", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "create-offer-credential", ""] - } - }, - "response": [] - } - ] - }, - { - "name": "Get-all-schemas", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/schemas?pageSize=20&page", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "schemas"], - "query": [ - { - "key": "pageSize", - "value": "20" - }, - { - "key": "page", - "value": null - } - ] - }, - "description": "#### **Description** **:**\n\nThis request fetches all the the schemas created by the requesting participant.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| pageSize | no | `pageSize` <br>Should be provided in query parameter. It filters the list and sets the page size. |\n| page | no | `page` <br>Should be provided in query parameter. It filters the list and sets the page to land on. |" - }, - "response": [] - }, - { - "name": "Get-schema-by-id", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/schemas/{{pcm-schema-id}}", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "schemas", "{{pcm-schema-id}}"] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch schema for the provided schema id in URL." - }, - "response": [] - }, - { - "name": "Create-schemas", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"schema-id\", res.data.schemaID);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"name\": \"pizza_sandwich_280622-01\",\r\n \"version\": \"28.06.22\",\r\n \"attributes\": {{schema_attr}},\r\n \"createdBy\": \"2344789247389\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/schemas", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "schemas"] - }, - "description": "#### **Description** **:**\n\nIt is used to create the schema.\n\n> The schema is a template which defines the schema name, version and the attributes and is used to define the credential definition.\n\n#### **Body Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| name | required | `\"shema_name\"` <br>should be provided in \"STRING\" format |\n| version | required | `\"X.X.X\"` <br>should be provided as \"SemVer\"(\"1.2.3\") in \"STRING\" format. |\n| attributes | required | `[\"attr_1\",\"attr_2\"......\"attr_n\"]` <br>attributes are the key against which the values will be issued in credential. attributes in the \"STRING\" array. |\n| created_by | required | `\"OCM_DID\"` <br>created_by accepts the Organization Credential Manager's DID. |" - }, - "response": [] - }, - { - "name": "Create-cred-def", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"cred-def-id\", res.data.credDefId);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"name\": \"Enrollment_credDef-010722\",\r\n \"isRevokable\": false,\r\n \"isAutoIssue\": false,\r\n \"schemaID\": \"{{schema-id}}\",\r\n \"createdBy\": \"acceptsAnyString\",\r\n \"expiryHours\" : \"24\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/credentialDef", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credentialDef"] - }, - "description": "#### **Description** **:**\n\nIt is used to create the Credential Definition.\n\n> A credential definition is a particular issuer's template based on an existing schema to issue credentials from.\n\n#### **Body Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| name | required | `\"Cred_Def_name\"` <br>should be provided in \"STRING\" format |\n| is_revokable | required | `true` or `false` <br>should be provided boolean. |\n| is_auto_issue | required | `true` or `false` <br>should be provided boolean. |\n| schemaID | required | `\"schema_name\"`Should be valid existing schema and should be provided as \"STRING\" |\n| created_by | required | `\"OCM_DID\"` <br>created_by accepts the Organization Credential Manager's DID. |\n| expiry | required | `\"number of hours\"` <br>expiry provides the time for which the verifiable credential will stay active in the wallet. |" - }, - "response": [] - }, - { - "name": "Offer-cred-def", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"cred-offer-id\", res.data.id);\r", - "}\r", - "\r", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "const arr = JSON.parse(pm.environment.get(\"schema_attr\"))\r", - "for (let i = 0; i < arr.length; i++) {\r", - " pm.globals.set(\"array\"+[i], arr[i]);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"connectionId\": \"{{conn-id}}\",\r\n \"credentialDefinitionId\": \"{{cred-def-id}}\",\r\n \"comment\": \"Created\",\r\n \"attributes\": [\r\n {\r\n \"name\": \"{{array0}}\",\r\n \"value\": \"test_fname_3\"\r\n },\r\n {\r\n \"name\": \"{{array1}}\",\r\n \"value\": \"test_lname_3\"\r\n },\r\n {\r\n \"name\": \"{{array2}}\",\r\n \"value\": \"test_gender_3\"\r\n }\r\n ],\r\n \"autoAcceptCredential\": \"never\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{att_man_baseURL}}/v1/create-offer-credential/", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "create-offer-credential", ""] - }, - "description": "#### **Description** **:**\n\nA message sent by the Issuer to the potential Holder, describing the credential they intend to offer.\n\n> In Hyperledger Indy, this message is required, because it forces the Issuer to make a cryptographic commitment to the set of fields in the final credential and thus prevents Issuers from inserting spurious data.\n\n#### **Body Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| connectionId | required | `\"`connectionId`\"` <br>should be provided in \"STRING\" format. It the peer to peer connection id for two aeries agent. |\n| credentialDefinitionId | required | `\"cred_def_id\"` <br>should be provided in \"STRING\" format. It is the derived when the Credential Definition is created. |\n| attributes | required | `[{ \"name\" : \"attr_name\", \"value\" : \"attr_value\" }]` <br>should be provided JSON array. |" - }, - "response": [] - }, - { - "name": "Accept-request-issue-cred", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/accept-request?credentialId={{cred-offer-id}}", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "accept-request"], - "query": [ - { - "key": "credentialId", - "value": "{{cred-offer-id}}" - } - ] - }, - "description": "#### **Description** **:**\n\nIt is used to accept the acknowledgement received from another Aries agent for the issuance for Verifiable Credential and send Verifiable Credential.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| credentialId | required | `\"credential_offer_id\"` <br>should be provided in \"STRING\" format. It is derived from offer_credential_definition request. |" - }, - "response": [] - }, - { - "name": "Get-credentials", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/credential/", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credential", ""], - "query": [ - { - "key": "state", - "value": "", - "disabled": true - }, - { - "key": "pageSize", - "value": "", - "disabled": true - }, - { - "key": "page", - "value": "", - "disabled": true - }, - { - "key": "isReceived", - "value": "true", - "disabled": true - }, - { - "key": "threadId", - "value": "33e5ea8e-ec08-4144-aac3-d173ab0e58b8", - "disabled": true - } - ] - }, - "description": "#### **Description** **:**\n\nThis request fetches the created credentials.\n\n> It uses pagination to provide the particular number of records filtered as per the input given.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| state | no | `state` <br>should be provided in query parameter. It filters the connections list according the provided state value. |\n| pageSize | no | `pageSize` <br>Should be provided in query parameter. It filters the list and sets the page size. |\n| page | no | `page` <br>Should be provided in query parameter. It filters the list and sets the page to land on. |" - }, - "response": [] - }, - { - "name": "Get-cred-by-id", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [""], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "exec": [""], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/credentialDef/{{cred-def-id}}", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credentialDef", "{{cred-def-id}}"] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch credential definitions for the provided cred_def_id in URL." - }, - "response": [] - }, - { - "name": "Get-cred-by-schema-id", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/credentialDef?schemaID={{schema-id}}", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "credentialDef"], - "query": [ - { - "key": "schemaID", - "value": "{{schema-id}}" - } - ] - }, - "description": "#### **Description** **:**\n\nThis request fetches the created credentials against provided schema_id.\n\n> It uses pagination to provide the particular number of records filtered as per the input given.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| schemaID | no | `\"schema_name\"`Should be valid existing schema and should be provided as \"STRING\" |" - }, - "response": [] - }, - { - "name": "Get-Dids-For-Schema", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{att_man_baseURL}}/v1/schemas/get-dids-for-schema/{{pcm-schema-id}}", - "host": ["{{att_man_baseURL}}"], - "path": ["v1", "schemas", "get-dids-for-schema", "{{pcm-schema-id}}"] - } - }, - "response": [] - }, - { - "name": "map-user-info", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "\t\r", - "let template = `\r", - "<html>\r", - " <body> \r", - " <br>\r", - " <div style=\"text-align:center;\">\r", - " <img src='https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=+{{data.invitationUrl}}'></img>\r", - " </div>\r", - " </body>\r", - "</html>`;\r", - "pm.visualizer.set(template, res);\r", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"userInfoURL\": \"https://retoolapi.dev/MJrw6e/userinfo/10\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{princi_man_baseURL}}/v1/map-user-info", - "host": ["{{princi_man_baseURL}}"], - "path": ["v1", "map-user-info"] - }, - "description": "#### **Description** **:**\n\nIt is used to accept the acknowledgement received from another Aries agent for the issuance for Verifiable Credential and send Verifiable Credential.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| credentialId | required | `\"credential_offer_id\"` <br>should be provided in \"STRING\" format. It is derived from offer_credential_definition request. |" - }, - "response": [] - } - ] -} diff --git a/documentation/Connection_Manager.postman_collection.json b/documentation/Connection_Manager.postman_collection.json deleted file mode 100644 index 0d4e21c8177d4747cb9e38b0b2c10117006c1525..0000000000000000000000000000000000000000 --- a/documentation/Connection_Manager.postman_collection.json +++ /dev/null @@ -1,457 +0,0 @@ -{ - "info": { - "_postman_id": "2409bab2-cd0d-4956-8f46-bb9919b46ae7", - "name": "Connection Manager", - "description": "StartFragment\n\nThe Connection Manager is a collection of requests which can be used to create the connection invitation URL, to get all connections and their information.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17714957" - }, - "item": [ - { - "name": "Create-Invitation-URL", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "if (res.statusCode == 200) {\r", - "\tpm.environment.set(\"conn-id\", res.data.connection.id);\r", - "\r", - "\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div>Scan the QR code below for connetion with id {{data.connection.id}}</div>\r", - " <br>\r", - " <div style=\"text-align:center;\">\r", - " <img src='https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=+{{data.invitationUrl}}'></img>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\tpm.visualizer.set(template, res);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{Con_man_baseURL}}/v1/invitation-url?alias=member", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "invitation-url"], - "query": [ - { - "key": "alias", - "value": "member" - }, - { - "key": "alias", - "value": "subscriber", - "disabled": true - } - ] - }, - "description": "#### **Description** **:**\n\nIt is used to create the connection invitation URL to establish the peer to peer connection between two aeries agents or the participant user and the principal user.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| alias | required | \"member\" or \"subscriber\" |\n\n> for this request, the request parameter needs to be provided as \"alias\" which is required and only accepts \"member\" or \"subscriber\".\n> \n> **\"member\" as alias** : the connection invitation is created for the member.\n> \n> **\"subscriber\" as alias** : the connection invitation is created for the subscriber.\n\n> **Connecting as a member :**\n> \n> A member is someone who is enrolling for first time in GaiaX ecosystem. The principal user will receive membership credential once connected as member and the connection will move to \"trusted\" state.\n\n> **Connecting as subscriber :**\n> \n> A subscriber is someone who is already connected with some participant in GaiaX ecosystem and is willing to connect (subscribe) with some other participants in ecosystem. The principal user need to present proof against membership credential. The proof presentation will be requested upon successful connection.\n> \n> And once the proof is presented successfully, the connection will move to \"trusted\" state.\n\n \n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| **Key** | **Description** |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → invitationUrl` | It returns the invitation URL to receive connection on principal end. |\n| `data → invitation` | It returns the invitation object to receive connection on principal end. |\n| `data → connection` | It returns connection object which contains the information about the connection. |\n| `data → connection → id` | It returns the connection unique identifier. |\n| `data → connection → createdAt` | It returns the created date and time. |\n| `data → connection → did` | It returns the connection DID. |\n| `data → connection → state` | It returns the connection state. |\n| `data → connection → role` | It returns the agent role. |\n| `data → connection → alias` | It returns the alias which we set at time of creating or receiving the connection. |\n| `data → connection → multiUseInvitation` | It returns the boolean which indicates whether the connection is multi-use or not. |" - }, - "response": [ - { - "name": "Create-Invitation-URL", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{Con_man_baseURL}}/v1/invitation-url?alias=member", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "invitation-url"], - "query": [ - { - "key": "alias", - "value": "member" - }, - { - "key": "alias", - "value": "subscriber", - "disabled": true - } - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:18:04 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "1989" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"7c5-cp94PvE2DNowIosoNk1tOsH7jDY\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connection created successfully\",\n \"data\": {\n \"invitationUrl\": \"https://gaiax.vereign.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiJkOTMzOTk5Mi02ZjZmLTQxYzEtYjQ0Yy1lMjNkMjUwMGMzNWIiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiREFnNEhrNzkyRXh6SFpRNjhHdktoY3ZrQzVYV3VqUHdiRlpmaWhTVlQyOFUiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9nYWlheC52ZXJlaWduLmNvbTo0NDMvb2NtL2RpZGNvbW0iLCJyb3V0aW5nS2V5cyI6W119\",\n \"invitation\": {\n \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n \"@id\": \"d9339992-6f6f-41c1-b44c-e23d2500c35b\",\n \"label\": \"ssi-abstraction-agent\",\n \"recipientKeys\": [\n \"DAg4Hk792ExzHZQ68GvKhcvkC5XWujPwbFZfihSVT28U\"\n ],\n \"serviceEndpoint\": \"https://gaiax.vereign.com:443/ocm/didcomm\",\n \"routingKeys\": []\n },\n \"connection\": {\n \"_tags\": {},\n \"metadata\": {},\n \"id\": \"ffc4cd40-ae18-42f7-87c2-fe4d45b6e300\",\n \"createdAt\": \"2022-06-15T09:18:04.978Z\",\n \"did\": \"PKjWC17JFYBPLAjdeaZoaK\",\n \"didDoc\": {\n \"@context\": \"https://w3id.org/did/v1\",\n \"publicKey\": [\n {\n \"id\": \"PKjWC17JFYBPLAjdeaZoaK#1\",\n \"controller\": \"PKjWC17JFYBPLAjdeaZoaK\",\n \"type\": \"Ed25519VerificationKey2018\",\n \"publicKeyBase58\": \"DAg4Hk792ExzHZQ68GvKhcvkC5XWujPwbFZfihSVT28U\"\n }\n ],\n \"service\": [\n {\n \"id\": \"PKjWC17JFYBPLAjdeaZoaK#IndyAgentService\",\n \"serviceEndpoint\": \"https://gaiax.vereign.com:443/ocm/didcomm\",\n \"type\": \"IndyAgent\",\n \"priority\": 0,\n \"recipientKeys\": [\n \"DAg4Hk792ExzHZQ68GvKhcvkC5XWujPwbFZfihSVT28U\"\n ],\n \"routingKeys\": []\n }\n ],\n \"authentication\": [\n {\n \"publicKey\": \"PKjWC17JFYBPLAjdeaZoaK#1\",\n \"type\": \"Ed25519SignatureAuthentication2018\"\n }\n ],\n \"id\": \"PKjWC17JFYBPLAjdeaZoaK\"\n },\n \"verkey\": \"DAg4Hk792ExzHZQ68GvKhcvkC5XWujPwbFZfihSVT28U\",\n \"state\": \"invited\",\n \"role\": \"inviter\",\n \"alias\": \"member\",\n \"invitation\": {\n \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n \"@id\": \"d9339992-6f6f-41c1-b44c-e23d2500c35b\",\n \"label\": \"ssi-abstraction-agent\",\n \"recipientKeys\": [\n \"DAg4Hk792ExzHZQ68GvKhcvkC5XWujPwbFZfihSVT28U\"\n ],\n \"serviceEndpoint\": \"https://gaiax.vereign.com:443/ocm/didcomm\",\n \"routingKeys\": []\n },\n \"multiUseInvitation\": false\n }\n }\n}" - } - ] - }, - { - "name": "Get-Connection-by-ConnectionID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "let template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:green; text-transform: capitalize;\">\r", - " <h2>{{data.records.status}}</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "pm.visualizer.set(template, res);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connections/{{conn-id}}", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connections", "{{conn-id}}"] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch connection information for the connection id provided in URL.\n\n> It also provides state of the connection established.\n\n \n \n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| **Key** | **Description** |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → records → id` | It returns the unique identifier for connection table. |\n| `data → records → connectionId` | It returns the connection unique identifier. |\n| `data → records → participantDid` | It returns the participant DID. |\n| `data → records → theirDid` | It returns the principal DID. |\n| `data → records → theirLabel` | It returns the email of the principal. |\n| `data → records → createdDate` | It returns the created date. |\n| `data → records → updatedDate` | It returns the updated date. |\n| `data → records → isActive` | It returns the boolean value which indicates record is active. |" - }, - "response": [ - { - "name": "Get-Connection-by-ConnectionID", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connections/{{conn-id}}", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connections", "{{conn-id}}"] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:25:00 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "411" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"19b-TySvMVsRlQAW5a6BNN0k6i1Lo50\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connections fetch successfully\",\n \"data\": {\n \"records\": {\n \"id\": \"0f8a7f07-f064-45af-ae0a-a98c5b721d04\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"status\": \"trusted\",\n \"participantDid\": \"R5LHJTmiuP8PRtH74SVHXb\",\n \"theirDid\": \"XpaT7i3hYHHHSMrw1rY3EB\",\n \"theirLabel\": \"test_corp@vomoto.com\",\n \"createdDate\": \"2022-06-15T09:24:15.248Z\",\n \"updatedDate\": \"2022-06-15T09:24:56.988Z\",\n \"isActive\": true\n }\n }\n}" - } - ] - }, - { - "name": "Get-Connections", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "let template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:green; text-transform: capitalize;\">\r", - " <h2>{{data.records.status}}</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "pm.visualizer.set(template, res);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connections", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connections"], - "query": [ - { - "key": "participantDID", - "value": "Jv5JtLcLuEeByKazGBtfSC", - "disabled": true - }, - { - "key": "status", - "value": "trusted", - "disabled": true - }, - { - "key": "pageSize", - "value": "5", - "disabled": true - }, - { - "key": "page", - "value": "2", - "disabled": true - } - ] - }, - "description": "#### **Description** **:**\n\nThis request fetches the connection information against the provided participantDID otherwise all the connections are fetched.\n\n> It uses pagination to provide the particular number of records filtered as per the input given.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| participantDID | required | `participantDID` <br>should be provided in query parameter. |\n| status | no | `status` <br>should be provided in query parameter. It filters the connections list according the provided status value. |\n| pageSize | no | `pageSize` <br>Should be provided in query parameter. It filters the list and sets the page size. |\n| page | no | `page` <br>Should be provided in query parameter. It filters the list and sets the page to land on. |\n\n \n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| **Key** | **Description** |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → count` | It returns the total number of records available in the table for matching query. |\n| `data → records → id` | It returns the unique identifier for connection table. |\n| `data → records → connectionId` | It returns the connection unique identifier. |\n| `data → records → participantDid` | It returns the participant DID. |\n| `data → records → theirDid` | It returns the principal DID. |\n| `data → records → theirLabel` | It returns the email of the principal. |\n| `data → records → createdDate` | It returns the created date. |\n| `data → records → updatedDate` | It returns the updated date. |\n| `data → records → isActive` | It returns the boolean value which indicates record is active. |" - }, - "response": [ - { - "name": "Get-Connections", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connections", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connections"], - "query": [ - { - "key": "participantDID", - "value": "3zrMzUB6fur6snh5u4eiaQ", - "disabled": true - }, - { - "key": "status", - "value": "", - "disabled": true - }, - { - "key": "pageSize", - "value": "", - "disabled": true - }, - { - "key": "page", - "value": "", - "disabled": true - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:25:28 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "3180" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"c6c-VFB0g130QAnHpy+JUr0Gx7WAWmM\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connections fetch successfully\",\n \"data\": {\n \"count\": 111,\n \"records\": [\n {\n \"id\": \"02f41110-18b7-4d1f-89d4-b418cf2d603a\",\n \"connectionId\": \"24402e32-234b-453f-a4cf-9f3e94ed85ab\",\n \"status\": \"complete\",\n \"participantDid\": \"BbiM3ypCFV49iqwVKnQ3Pt\",\n \"theirDid\": \"6XYGkoJanFdNfQCF7yy8rx\",\n \"theirLabel\": \"emilie@vomoto.com\",\n \"createdDate\": \"2022-06-09T14:53:40.457Z\",\n \"updatedDate\": \"2022-06-09T14:54:40.301Z\",\n \"isActive\": false\n },\n {\n \"id\": \"049ec6ed-8645-465b-8f3a-fdd438aed36b\",\n \"connectionId\": \"fd96855b-c979-4125-95ba-d2535e63dfe6\",\n \"status\": \"invited\",\n \"participantDid\": \"Jv5JtLcLuEeByKazGBtfSC\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2022-06-08T13:26:16.708Z\",\n \"updatedDate\": \"2022-06-08T13:26:16.708Z\",\n \"isActive\": false\n },\n {\n \"id\": \"092b1789-2522-44e1-9de7-de00c8e4e601\",\n \"connectionId\": \"719ddbe9-7dce-43df-b4be-4714bcca20a7\",\n \"status\": \"complete\",\n \"participantDid\": \"9DJSEsZpu6Neh2zypBGJoA\",\n \"theirDid\": \"SMrr5oVvxW1xWCfetQdYUn\",\n \"theirLabel\": \"rangoon@vomoto.com\",\n \"createdDate\": \"2022-06-08T14:40:13.868Z\",\n \"updatedDate\": \"2022-06-08T14:40:23.967Z\",\n \"isActive\": false\n },\n {\n \"id\": \"0af9b87d-50ad-4faa-ad97-4ba1ea74af73\",\n \"connectionId\": \"2b092454-05e6-4687-85e7-61c9ec4be97c\",\n \"status\": \"invited\",\n \"participantDid\": \"2j7hMxDhLwR6ya8Ptz5ewv\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2022-06-06T12:09:07.844Z\",\n \"updatedDate\": \"2022-06-06T12:09:07.844Z\",\n \"isActive\": false\n },\n {\n \"id\": \"0b1eb233-0fdc-43ba-887e-01ca49f0984a\",\n \"connectionId\": \"1279a5c1-c7f1-4abe-bece-816f5e710050\",\n \"status\": \"invited\",\n \"participantDid\": \"4WZPvgYQoiiyKEwePV2th1\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2022-06-07T12:39:18.101Z\",\n \"updatedDate\": \"2022-06-07T12:39:18.101Z\",\n \"isActive\": false\n },\n {\n \"id\": \"0b369941-5648-4475-aff3-4b12f6d8f3c2\",\n \"connectionId\": \"48afe258-dc0a-4c8b-a0f1-4b346e20f13c\",\n \"status\": \"invited\",\n \"participantDid\": \"NdDAdo5Kg2RvKCNZp62ehS\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2022-06-08T14:14:37.972Z\",\n \"updatedDate\": \"2022-06-08T14:14:37.972Z\",\n \"isActive\": false\n },\n {\n \"id\": \"0e6c6705-9b8f-4cdb-a5ea-ab7651512e6a\",\n \"connectionId\": \"e0eb278f-3283-419c-95ae-85ed0b4007de\",\n \"status\": \"responded\",\n \"participantDid\": \"P7jc1nckvYDu4aVxGQeS1z\",\n \"theirDid\": \"NEfdsLk7xnxCui4RbNJj5S\",\n \"theirLabel\": \"alena@vomoto.com\",\n \"createdDate\": \"2022-06-09T13:44:50.029Z\",\n \"updatedDate\": \"2022-06-09T13:45:01.246Z\",\n \"isActive\": false\n },\n {\n \"id\": \"0ea21690-9127-47cf-aad6-5c55721dbae2\",\n \"connectionId\": \"9050c647-2931-4fdb-8f65-007c79f0bd33\",\n \"status\": \"trusted\",\n \"participantDid\": \"TaojhXfMbbKgoiE8FjMDUG\",\n \"theirDid\": \"JmQBgTUpfu8A7egsv1ib4s\",\n \"theirLabel\": \"sam\",\n \"createdDate\": \"2022-06-14T10:35:42.300Z\",\n \"updatedDate\": \"2022-06-14T10:43:59.067Z\",\n \"isActive\": true\n },\n {\n \"id\": \"0f8a7f07-f064-45af-ae0a-a98c5b721d04\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"status\": \"trusted\",\n \"participantDid\": \"R5LHJTmiuP8PRtH74SVHXb\",\n \"theirDid\": \"XpaT7i3hYHHHSMrw1rY3EB\",\n \"theirLabel\": \"test_corp@vomoto.com\",\n \"createdDate\": \"2022-06-15T09:24:15.248Z\",\n \"updatedDate\": \"2022-06-15T09:24:56.988Z\",\n \"isActive\": true\n },\n {\n \"id\": \"12870002-9220-4e3b-810f-369ef4351e51\",\n \"connectionId\": \"c559ed17-cbce-4992-8d36-4ffb3550988b\",\n \"status\": \"invited\",\n \"participantDid\": \"AeB43tLJgwCLPR3CsjwcSU\",\n \"theirDid\": \"\",\n \"theirLabel\": \"\",\n \"createdDate\": \"2022-06-06T11:42:52.186Z\",\n \"updatedDate\": \"2022-06-06T11:42:52.186Z\",\n \"isActive\": false\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Accept-Connection", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"invitationUrl\": \"http://3.111.77.38:4021?c_i=eyJAdHlwZSI6ImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb25zLzEuMC9pbnZpdGF0aW9uIiwiQGlkIjoiNTY0ZTM3NzQtZGViNy00ZTU2LWEyNTUtZWE3MmUyOWFlZmY4IiwibGFiZWwiOiJkZW1vNyIsInJlY2lwaWVudEtleXMiOlsiSHhVeVl4N1pIQnQ4ZHBCbk1MOVA4d0NqSm1jTmFFVGUzR2EzQjdHZ3l4VWoiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cDovLzMuMTExLjc3LjM4OjQwMjEiLCJyb3V0aW5nS2V5cyI6W119\",\r\n \"autoAcceptConnection\": true\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://3.111.77.38:3003/v1/accept-connection-invitation", - "protocol": "http", - "host": ["3", "111", "77", "38"], - "port": "3003", - "path": ["v1", "accept-connection-invitation"] - } - }, - "response": [] - }, - { - "name": "Get-Connection-Information", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connection-information?connectionId={{conn-id}}", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connection-information"], - "query": [ - { - "key": "did", - "value": "MJys9zJZ1m2S6dFccFJQJs", - "disabled": true - }, - { - "key": "connectionId", - "value": "{{conn-id}}" - } - ] - }, - "description": "#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| **Key** | **Description** |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → records → issueCredentials` | It returns the array of issued credentials against connection id. |\n| `data → records → issueCredentials → id` | It returns the unique identifier for issued credentials record in table. |\n| `data → records → issueCredentials → credentialId` | It returns the unique identifier for issued credentials. |\n| `data → records → issueCredentials → state` | It returns the state of the issued credentials. |\n| `data → records → issueCredentials → principalDid` | It returns the principal DID. |\n| `data → records → issueCredentials → connectionId` | It returns the connection ID. |\n| `data → records → issueCredentials → createdDate` | It returns the created date. |\n| `data → records → issueCredentials → updatedDate` | It returns the updated date. |\n| `data → records → issueCredentials → expirationDate` | It returns the expiration date of issued credentials. |\n| `data → records → presenProofs` | It returns the list of proofs presentation. |\n| `data → records → presenProofs → id` | It returns the unique identifier for proofs record in table. |\n| `data → records → presenProofs → presentation_id` | It returns the unique identifier for proof presentation. |\n| `data → records → presenProofs → connectionId` | It returns the connection ID. |\n| `data → records → presenProofs → credential_def_id` | It returns the credential def id. |\n| `data → records → presenProofs → schemaId` | It returns the schema id. |\n| `data → records → presenProofs → their_did` | It returns the principal DID. |\n| `data → records → presenProofs → status` | It returns the status of proof presentation. |\n| `data → records → presenProofs → created_date` | It returns the created date. |\n| `data → records → presenProofs → updated_date` | It returns the updated date. |" - }, - "response": [ - { - "name": "Get-Connection-Information", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Con_man_baseURL}}/v1/connection-information?did&connectionId={{conn-id}}", - "host": ["{{Con_man_baseURL}}"], - "path": ["v1", "connection-information"], - "query": [ - { - "key": "did", - "value": null - }, - { - "key": "connectionId", - "value": "{{conn-id}}" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:28:39 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "1320" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"528-EZqt2BArtofGni3d7fvQseXpEg8\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Connection information fetch successfully\",\n \"data\": {\n \"records\": {\n \"issueCredentials\": [\n {\n \"id\": \"8bf0c9bf-c008-4324-b462-74ce2d0948ad\",\n \"credentialId\": \"1b7e0718-0eb0-4899-89b9-3fd04b95b148\",\n \"credDefId\": \"7KuDTpQh3GJ7Gp6kErpWvM:3:CL:322876:test_test_cred-def_140622-07\",\n \"state\": \"done\",\n \"principalDid\": \"XpaT7i3hYHHHSMrw1rY3EB\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"createdDate\": \"2022-06-15T09:25:59.053Z\",\n \"updatedDate\": \"2022-06-15T09:26:57.810Z\",\n \"expirationDate\": \"2022-07-15T09:25:59.052Z\"\n },\n {\n \"id\": \"04d6d4c9-0230-4441-a1de-9aec69ed2ff2\",\n \"credentialId\": \"12b0640c-99f7-4413-a27c-5b34b0ecfb0a\",\n \"credDefId\": \"7KuDTpQh3GJ7Gp6kErpWvM:3:CL:321508:princi_cred_def130622\",\n \"state\": \"done\",\n \"principalDid\": \"XpaT7i3hYHHHSMrw1rY3EB\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"createdDate\": \"2022-06-15T09:24:27.429Z\",\n \"updatedDate\": \"2022-06-15T09:24:56.976Z\",\n \"expirationDate\": \"2022-12-12T09:24:27.339Z\"\n }\n ],\n \"presenProofs\": [\n {\n \"id\": \"48b2b61d-a5d9-4c1d-a745-ed5cd018c5bd\",\n \"presentation_id\": \"07f27a99-4ff2-4d3c-82f9-0f49cd6d8203\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-07:14.06.2207\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-15T09:27:07.302Z\",\n \"updated_date\": \"2022-06-15T09:27:26.804Z\"\n }\n ]\n }\n }\n}" - } - ] - } - ] -} diff --git a/documentation/GAIA-X-Documentation.docx b/documentation/GAIA-X-Documentation.docx deleted file mode 100644 index faa65386efec9048f2e329b35c6db0e2e54defc3..0000000000000000000000000000000000000000 Binary files a/documentation/GAIA-X-Documentation.docx and /dev/null differ diff --git a/documentation/GAIA-X-OCM.Participant Onboarding.drawio.png b/documentation/GAIA-X-OCM.Participant Onboarding.drawio.png deleted file mode 100644 index d7bbdbba5e92079e14eddf0975dad0c80910f5f1..0000000000000000000000000000000000000000 Binary files a/documentation/GAIA-X-OCM.Participant Onboarding.drawio.png and /dev/null differ diff --git a/documentation/GAIA-X-Overview-blockDiagram.png b/documentation/GAIA-X-Overview-blockDiagram.png deleted file mode 100644 index 2d16bb7022b7d67b0aac91af1e414ebc33943623..0000000000000000000000000000000000000000 Binary files a/documentation/GAIA-X-Overview-blockDiagram.png and /dev/null differ diff --git a/documentation/GAIAX-Complete-Flow-GX.postman_environment.json b/documentation/GAIAX-Complete-Flow-GX.postman_environment.json deleted file mode 100644 index 9d5003b7ce017e825ff45ca8e2d102c33bedbaed..0000000000000000000000000000000000000000 --- a/documentation/GAIAX-Complete-Flow-GX.postman_environment.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "id": "a78e1388-afe8-405d-8d5e-273f5dd3ad34", - "name": "GAIAX-Complete-Flow-GX", - "values": [ - { - "key": "email", - "value": "tagotejo@zetmail.com", - "type": "default", - "enabled": true - }, - { - "key": "password", - "value": "password@123", - "type": "default", - "enabled": true - }, - { - "key": "otp_received", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "otpId", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "part-id", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "conn-id", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "schema-id", - "value": "7KuDTpQh3GJ7Gp6kErpWvM:2:pizza_sandwich_230622:23.06.22", - "type": "default", - "enabled": true - }, - { - "key": "cred-def-id", - "value": "AXF7h6Jiz3At18H5Mgrcwh:3:CL:242632:KYC_Cred_Def", - "type": "default", - "enabled": true - }, - { - "key": "cred-offer-id", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "presentation-id", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "schema_attr", - "value": "[ \"fName\",\"lName\", \"gender\"]", - "type": "default", - "enabled": true - }, - { - "key": "email2", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "password2", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "pcm-vc-cred-def-id", - "value": "", - "type": "default", - "enabled": true - }, - { - "key": "oob-presentation-id", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "Con_man_baseURL", - "value": "https://gaiax.vereign.com/ocm/connection/", - "enabled": true - }, - { - "key": "Onboarding_man_baseURL", - "value": "http://3.111.77.38:3004", - "type": "default", - "enabled": true - }, - { - "key": "proof_man_baseURL", - "value": "https://gaiax.vereign.com/ocm/proof", - "enabled": true - }, - { - "key": "att_man_baseURL", - "value": "https://gaiax.vereign.com/ocm/attestation", - "type": "default", - "enabled": true - }, - { - "key": "pcm-schema-id", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "prpsl_conn-id", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "oob_type-presentation-id", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "princi_man_baseURL", - "value": "https://gaiax.vereign.com/ocm/principal", - "type": "default", - "enabled": true - }, - { - "key": "accptfa_conn-id", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "accptfa_credID", - "value": "", - "type": "any", - "enabled": true - }, - { - "key": "proofpfa_presentaionID", - "value": "", - "type": "any", - "enabled": true - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2022-07-06T14:10:05.351Z", - "_postman_exported_using": "Postman/9.24.0" -} diff --git a/documentation/Gaia-X Organization Credential Manager.postman_collection.json b/documentation/Gaia-X_Organization_Credential_Manager.postman_collection.json similarity index 53% rename from documentation/Gaia-X Organization Credential Manager.postman_collection.json rename to documentation/Gaia-X_Organization_Credential_Manager.postman_collection.json index 3c289d3606862037ada666b085d608c80d69dbe0..5f3a4c7ee8c2f94b6d054a7b4f2ee66335095cb3 100644 --- a/documentation/Gaia-X Organization Credential Manager.postman_collection.json +++ b/documentation/Gaia-X_Organization_Credential_Manager.postman_collection.json @@ -11,151 +11,1448 @@ "name": "APIs", "item": [ { - "name": "Schema Manager", - "item": [] + "name": "Tenant Manager", + "item": [ + { + "name": "tenants", + "item": [ + { + "name": "Tenants Controller find", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Tenant Manager Base URL}}/v1/tenants", + "host": [ + "{{Tenant Manager Base URL}}" + ], + "path": [ + "v1", + "tenants" + ] + } + }, + "response": [] + }, + { + "name": "Tenants Controller create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Tenant Manager Base URL}}/v1/tenants", + "host": [ + "{{Tenant Manager Base URL}}" + ], + "path": [ + "v1", + "tenants" + ] + } + }, + "response": [] + } + ] + } + ] }, { - "name": "Connection Manager", - "item": [] + "name": "Schema Manager", + "item": [ + { + "name": "schemas", + "item": [ + { + "name": "Fetch a list of schemas", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of schemas for a given tenant" + }, + "response": [] + }, + { + "name": "Register a new schema", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"issuerDid\": \"\",\n \"name\": \"\",\n \"version\": \"\",\n \"attributeNames\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides the capability to create new schema on ledger by name, author, version, schema attributes and type. Later this schema can be used to issue new credential definition. This call returns an information about created schema." + }, + "response": [] + }, + { + "name": "Fetch a schema by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas/:schemaId?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas", + ":schemaId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "schemaId", + "value": "", + "description": "(Required) The schema ID to retrieve" + } + ] + }, + "description": "This call allows you to retrieve schema data for a given tenant by specifying the `schemaId`." + }, + "response": [] + } + ] + }, + { + "name": "credential-definitions", + "item": [ + { + "name": "Fetch a list of credential definitions", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential definitions for a given tenant" + }, + "response": [] + }, + { + "name": "Create a credential definition", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"issuerDid\": \"\",\n \"schemaId\": \"\",\n \"tag\": \"\",\n \"supportsRevocation\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call allows you to create a credential definition for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential definition by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions/:credentialDefinitionId?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions", + ":credentialDefinitionId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialDefinitionId", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "This call provides a credential definition for a given tenant" + }, + "response": [] + } + ] + } + ] }, { - "name": "Credential Manager", - "item": [] + "name": "Connection Manager", + "item": [ + { + "name": "connections", + "item": [ + { + "name": "Fetch a list of connections", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of connections for a given tenant" + }, + "response": [] + }, + { + "name": "Create a connection", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a self connection for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a connection by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "", + "description": "(Required) The connection ID" + } + ] + }, + "description": "This call provides a connection for a given tenant and connection ID" + }, + "response": [] + }, + { + "name": "Block a connection", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:idOrDid/block?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":idOrDid", + "block" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "idOrDid", + "value": "", + "description": "(Required) The connection ID or DID" + } + ] + }, + "description": "This call blocks a connection for a given tenant and connection ID" + }, + "response": [] + } + ] + }, + { + "name": "invitations", + "item": [ + { + "name": "Create a new invitation", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a new invitation for a given tenant" + }, + "response": [] + }, + { + "name": "Receive an invitation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invitationUrl\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations/receive?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations", + "receive" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call receives an invitation for a given tenant" + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Credential Manager", + "item": [ + { + "name": "credentials", + "item": [ + { + "name": "Fetch a list of credentials", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credentials for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialRecordId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialRecordId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialRecordId", + "value": "", + "description": "(Required) The credential record ID to retrieve" + } + ] + }, + "description": "This call provides a credential for a given tenant" + }, + "response": [] + }, + { + "name": "Revoke a credential", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialId/revoke?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialId", + "revoke" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialId" + } + ] + }, + "description": "This call revokes a credential for a given tenant" + }, + "response": [] + }, + { + "name": "Delete a credential", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialId" + } + ] + }, + "description": "This call deletes a credential for a given tenant" + }, + "response": [] + } + ] + }, + { + "name": "credential-offers", + "item": [ + { + "name": "Fetch a list of credential offers", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential offers for a given tenant" + }, + "response": [] + }, + { + "name": "Create a credential offer", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"connectionId\": \"\",\n \"credentialDefinitionId\": \"\",\n \"attributes\": [\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n },\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n }\n ],\n \"revocationRegistryDefinitionId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a credential offer for a given connection ID and credential definition ID" + }, + "response": [] + }, + { + "name": "Fetch a credential offer by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/:credentialOfferId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + ":credentialOfferId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialOfferId", + "value": "", + "description": "(Required) The credential offer ID to retrieve" + } + ] + }, + "description": "This call provides a credential offer for a given ID" + }, + "response": [] + }, + { + "name": "Create a credential offer to self", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialDefinitionId\": \"\",\n \"attributes\": [\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n },\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n }\n ],\n \"revocationRegistryDefinitionId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/self?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + "self" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a credential offer for a given credential definition ID" + }, + "response": [] + }, + { + "name": "Accept a credential offer", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/:credentialOfferId/accept?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + ":credentialOfferId", + "accept" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialOfferId", + "value": "", + "description": "(Required) The credential offer ID to retrieve" + } + ] + }, + "description": "This call accepts a credential offer for a given ID" + }, + "response": [] + } + ] + }, + { + "name": "credential-requests", + "item": [ + { + "name": "Fetch a list of credential requests", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-requests?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-requests" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential requests for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential request by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-requests/:id?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-requests", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call provides a credential request for a given tenant by id" + }, + "response": [] + } + ] + }, + { + "name": "policies", + "item": [ + { + "name": "Check if a credential can be reissued", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/check-reissue?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "check-reissue" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential can be reissued" + }, + "response": [] + }, + { + "name": "Check if a credential should be revoked", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/check-revocation?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "check-revocation" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential should be revoked" + }, + "response": [] + }, + { + "name": "Check if a credential should be refreshed", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/refresh?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "refresh" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential should be refreshed" + }, + "response": [] + } + ] + } + ] }, { "name": "Proof Manager", - "item": [] + "item": [ + { + "name": "proofs", + "item": [ + { + "name": "Fetch a list of presentation proofs", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of presentation proofs for a given tenant" + }, + "response": [] + }, + { + "name": "Request a presentation proof", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"connectionId\": \"\",\n \"requestedAttributes\": {},\n \"requestedPredicates\": {}\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call requests a presentation proof for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a presentation proof by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:id?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call provides a presentation proof for a given tenant and id" + }, + "response": [] + }, + { + "name": "Delete a presentation proof", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:id?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call deletes a presentation proof for a given tenant" + }, + "response": [] + }, + { + "name": "Proofs Controller accept", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:proofRecordId/accept?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":proofRecordId", + "accept" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "proofRecordId" + } + ] + } + }, + "response": [] + } + ] + } + ] }, { "name": "DID Manager", - "item": [] - }, - { - "name": "Tenant Manager", "item": [ { - "name": "v1", + "name": "dids", "item": [ { - "name": "tenants", - "item": [ - { - "name": "Tenants Controller find", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{Tenant Manager Base URL}}/v1/tenants", - "host": [ - "{{Tenant Manager Base URL}}" - ], - "path": [ - "v1", - "tenants" - ] + "name": "Resolve DID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids/:did?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids", + ":did" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" } - }, - "response": [ + ], + "variable": [ { - "name": "Get all tenant IDs", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/v1/tenants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "v1", - "tenants" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" + "key": "did", + "value": "", + "description": "(Required) DID to resolve" } ] }, - { - "name": "Tenants Controller create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label\": \"\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{Tenant Manager Base URL}}/v1/tenants", - "host": [ - "{{Tenant Manager Base URL}}" - ], - "path": [ - "v1", - "tenants" - ] - } + "description": "Resolve DID" + }, + "response": [] + }, + { + "name": "Register DID from seed", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" }, - "response": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"seed\": \"\",\n \"services\": []\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids" + ], + "query": [ { - "name": "Create 'Alice' tenant", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label\": \"Alice\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "http://localhost:4007/v1/tenants", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "4007", - "path": [ - "v1", - "tenants" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" } ] - } - ] + }, + "description": "Register DID from seed" + }, + "response": [] + }, + { + "name": "Get DID configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids/configuration?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids", + "configuration" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Get DID configuration" + }, + "response": [] } ] } @@ -299,6 +1596,49 @@ }, "response": [] }, + { + "name": "Create 'intruder' tenant", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "const json = pm.response.json();", + "pm.collectionVariables.set(\"intruder_id\", json.data.id);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"label\": \"intruder\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{Tenant Manager Base URL}}/v1/tenants", + "host": [ + "{{Tenant Manager Base URL}}" + ], + "path": [ + "v1", + "tenants" + ] + } + }, + "response": [] + }, { "name": "Register DID for 'issuer'", "event": [ @@ -331,7 +1671,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"seed\": \"{{$randomPassword}}{{$randomAlphaNumeric}}{{$randomAlphaNumeric}}{{$randomPassword}}\",\n \"services\": [\n {\n \"id\": \"#endpoint\",\n \"type\": \"endpoint\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#didcomm-messaging\",\n \"type\": \"didcomm-messaging\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#did-communication\",\n \"type\": \"did-communication\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#DIDComm\",\n \"type\": \"DIDComm\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n }\n ]\n}", + "raw": "{\n \"seed\": \"{{$randomPassword}}{{$randomAlphaNumeric}}{{$randomAlphaNumeric}}{{$randomPassword}}\",\n \"services\": [\n {\n \"id\": \"#DIDComm\",\n \"type\": \"DIDComm\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -1789,6 +3129,233 @@ "response": [] } ] + }, + { + "name": "Block connection", + "item": [ + { + "name": "Create invitation (issuer)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const json = pm.response.json();", + "pm.collectionVariables.set('issuer_to_inruder_invitationUrl', json.data.invitationUrl);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Receive invitation from issuer (intruder)", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.sendRequest({", + " url: pm.collectionVariables.get('Connection Manager Base URL') + \"/v1/connections?tenantId=\" + pm.collectionVariables.get('issuer_id'),", + " method: \"GET\"", + "}, (err, res) => {", + " const connections = res.json().data;", + " const connectionIds = connections.map(({ id }) => id);", + " pm.variables.set('issuer_connection_ids', connectionIds);", + "})" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.collectionVariables.unset('issuer_to_inruder_invitationUrl');", + "", + "const json = pm.response.json();", + "pm.collectionVariables.set('issuer_intruder_connection_id_for_intruder', json.data.id);", + "", + "const oldConnectionIds = pm.variables.get('issuer_connection_ids');", + "", + "pm.sendRequest({", + " url: pm.collectionVariables.get('Connection Manager Base URL') + \"/v1/connections?tenantId=\" + pm.collectionVariables.get('issuer_id'),", + " method: \"GET\"", + "}, (err, res) => {", + " const connections = res.json().data;", + " const connectionIds = connections.map(({ id }) => id);", + " const newConnectionIds = connectionIds.filter((id) => !oldConnectionIds.includes(id));", + "", + " if (newConnectionIds.length) {", + " pm.collectionVariables.set('issuer_intruder_connection_id_for_issuer', newConnectionIds[0]);", + " }", + "})" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"invitationUrl\": \"{{issuer_to_inruder_invitationUrl}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations/receive?tenantId={{intruder_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations", + "receive" + ], + "query": [ + { + "key": "tenantId", + "value": "{{intruder_id}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get issuer connection to intruder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_issuer}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get intruder connection to issuer", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId={{intruder_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "{{intruder_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_intruder}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Block connection to intruder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId/block?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId", + "block" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_issuer}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "TSA Policies", + "item": [] } ], "description": "This folder is designed to house a comprehensive series of requests aimed at conducting end-to-end testing for all APIs" @@ -1939,7 +3506,15 @@ "value": "" }, { - "key": "issuer_invitationUrl", + "key": "intruder_id", + "value": "" + }, + { + "key": "issuer_intruder_connection_id_for_intruder", + "value": "" + }, + { + "key": "issuer_intruder_connection_id_for_issuer", "value": "" } ] diff --git a/documentation/OCM Create a schema and a creddef.png b/documentation/OCM Create a schema and a creddef.png new file mode 100644 index 0000000000000000000000000000000000000000..c0e5cdf792a175e989ae7bf50e0d719abd0e1ecb Binary files /dev/null and b/documentation/OCM Create a schema and a creddef.png differ diff --git a/documentation/OCM Establish a connection.png b/documentation/OCM Establish a connection.png new file mode 100644 index 0000000000000000000000000000000000000000..248d0e6358cce871317eda07fec1cd2a2279aace Binary files /dev/null and b/documentation/OCM Establish a connection.png differ diff --git a/documentation/OCM Initialization.png b/documentation/OCM Initialization.png new file mode 100644 index 0000000000000000000000000000000000000000..d399ae4a35d12eca72eb33995da741cbcbc15fa3 Binary files /dev/null and b/documentation/OCM Initialization.png differ diff --git a/documentation/OCM Issue a credential.png b/documentation/OCM Issue a credential.png new file mode 100644 index 0000000000000000000000000000000000000000..691e7d7a0939abeb1b3a122555a2c191e46f167c Binary files /dev/null and b/documentation/OCM Issue a credential.png differ diff --git a/documentation/OCM Request a proof.png b/documentation/OCM Request a proof.png new file mode 100644 index 0000000000000000000000000000000000000000..4acf0d56d51fffec0d1323704b90e798849b00e8 Binary files /dev/null and b/documentation/OCM Request a proof.png differ diff --git a/documentation/OCM TSA policies evaluation.png b/documentation/OCM TSA policies evaluation.png new file mode 100644 index 0000000000000000000000000000000000000000..5e0a9540ff2624abaedd4f7e3245e219d3ec83e2 Binary files /dev/null and b/documentation/OCM TSA policies evaluation.png differ diff --git a/documentation/Proof_Manager.postman_collection.json b/documentation/Proof_Manager.postman_collection.json deleted file mode 100644 index 22f7ef5b3e68b302a3cc25bf586690d35fa791d6..0000000000000000000000000000000000000000 --- a/documentation/Proof_Manager.postman_collection.json +++ /dev/null @@ -1,737 +0,0 @@ -{ - "info": { - "_postman_id": "fc2cf79c-4e29-4101-a833-3fd2a9243c9e", - "name": "Proof Manager", - "description": "#### **Description** **:**\n\nThe Proof Manager is the collection of request which can be used to request proof presentation to connections and for out of band verifications. Also it returns all the proof presentation requests and their status.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17714957" - }, - "item": [ - { - "name": "Find-proof-presentation", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-proof-presentation?pageSize=&page", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-proof-presentation"], - "query": [ - { - "key": "pageSize", - "value": "" - }, - { - "key": "page", - "value": null - } - ] - }, - "description": "#### **Description** **:**\n\nThis request fetches the all the proof presentation requests for the participant. The records can be filtered using provided query parameters.\n\n#### **Query Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| pageSize | no | `pageSize` <br>Should be provided in query parameter. It filters the list and sets the page size. |\n| page | no | `page` <br>Should be provided in query parameter. It filters the list and sets the page to land on. |\n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| Key | Description |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → count` | It returns the total number of records available in the response. |\n| `data → records` | It returns the actual information that was requested in the form of JSON object array. |\n| `data → records → id` | It returns the id for the corresponding record in the database. |\n| `data → records → presentation_id` | It returns the presentation id for the corresponding record in the database. |\n| `data → records → connectionId` | It returns the connection id for the corresponding record in the database. |\n| `data → records → credential_def_id` | It returns the credential defination id for the corresponding record in the database. |\n| `data → records → schemaId` | It returns the corresponding unique id for schema on the ledger. |\n| `data → records → their_did` | It returns the their did for the corresponding record in the database. |\n| `data → records → status` | It returns the status for the corresponding record in the database. |\n| `data → records → created_date` | It returns the date the proof was created. |\n| `data → records → updated_date` | It returns the last proof updation date. |" - }, - "response": [ - { - "name": "Find-proof-presentation", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-proof-presentation?pageSize=&page", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-proof-presentation"], - "query": [ - { - "key": "pageSize", - "value": "" - }, - { - "key": "page", - "value": null - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:28:21 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "3672" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"e58-XnEVMyMw0qXfuwsZQNiDlSRBjyQ\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentation fetch successfully\",\n \"data\": {\n \"count\": 36,\n \"records\": [\n {\n \"id\": \"051bdceb-07df-419b-98f4-3c0dd92c4b68\",\n \"presentation_id\": \"a033c848-7d9c-448e-9336-8237882d4418\",\n \"connectionId\": \"\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema130622:13.06.22\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-13T13:56:09.864Z\",\n \"updated_date\": \"2022-06-13T13:56:09.864Z\"\n },\n {\n \"id\": \"095e6ea8-f580-4269-993a-8eef6758ba74\",\n \"presentation_id\": \"b0784df1-14a6-4f5d-b038-43c296bf715f\",\n \"connectionId\": \"9050c647-2931-4fdb-8f65-007c79f0bd33\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:principal_schema_13-06-22:13.06.22\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-14T10:39:49.377Z\",\n \"updated_date\": \"2022-06-14T10:40:59.510Z\"\n },\n {\n \"id\": \"15107aeb-3a77-4b62-a3b6-0710cdc64225\",\n \"presentation_id\": \"bfbd97a8-efd9-4aa0-bdc4-b2fa1d342148\",\n \"connectionId\": \"\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema130622:13.06.22\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-13T14:11:14.955Z\",\n \"updated_date\": \"2022-06-13T14:11:29.769Z\"\n },\n {\n \"id\": \"1b459690-849b-4f3d-b6a4-0316933590a4\",\n \"presentation_id\": \"bcda614b-bac8-41f7-9680-f95ff67f6382\",\n \"connectionId\": \"\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-07:14.06.2207\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-14T11:58:39.846Z\",\n \"updated_date\": \"2022-06-14T12:01:07.841Z\"\n },\n {\n \"id\": \"1f8df45a-0e53-461b-b90b-cfe40042e629\",\n \"presentation_id\": \"b00113d8-4aa7-4c6f-9bfa-90be89834355\",\n \"connectionId\": \"493f3aee-448d-4fc7-9698-e3d8aa6f862c\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:principal_schema_06_09:1.0.4\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-09T12:16:23.157Z\",\n \"updated_date\": \"2022-06-09T12:16:23.157Z\"\n },\n {\n \"id\": \"1fe91ebc-c086-43ef-8cac-ebb56f32e14d\",\n \"presentation_id\": \"f3c137d7-c945-4e1b-8c00-55c3dbc94cf4\",\n \"connectionId\": \"f4f39f80-3f9f-45b3-a6f9-e7eb3946353c\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:principal_schema_13-06-22:13.06.22\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-14T10:20:54.732Z\",\n \"updated_date\": \"2022-06-14T10:21:06.573Z\"\n },\n {\n \"id\": \"2bf3377e-4d84-46c9-851a-98d8ab0244ec\",\n \"presentation_id\": \"0b3e2ec9-d5f7-4c34-8fba-d2b4120c0866\",\n \"connectionId\": \"9050c647-2931-4fdb-8f65-007c79f0bd33\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-04:14.06.2204\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-14T10:36:51.670Z\",\n \"updated_date\": \"2022-06-14T10:36:51.670Z\"\n },\n {\n \"id\": \"2d725225-acfd-4aa3-96b0-2564aa2a71a3\",\n \"presentation_id\": \"0f65c623-f130-4895-8154-fb229b2484f8\",\n \"connectionId\": \"30df956f-e9f2-4421-9d5b-73d259106667\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:principal_schema_13-06-22:13.06.22\",\n \"their_did\": \"\",\n \"status\": \"done\",\n \"created_date\": \"2022-06-13T13:54:43.312Z\",\n \"updated_date\": \"2022-06-13T13:55:13.701Z\"\n },\n {\n \"id\": \"377cbfc2-7055-48f1-8d69-ccb994e4dc0f\",\n \"presentation_id\": \"5732be89-cb54-40fc-81e6-7b9fe7676769\",\n \"connectionId\": \"9050c647-2931-4fdb-8f65-007c79f0bd33\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-06:14.06.2206\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-14T10:46:12.010Z\",\n \"updated_date\": \"2022-06-14T10:46:12.010Z\"\n },\n {\n \"id\": \"3a2eae7d-1021-4ee8-8cfb-41ec7789d03e\",\n \"presentation_id\": \"62257855-af83-46dc-9f18-ea223db7e663\",\n \"connectionId\": \"\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-04:14.06.2204\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-14T10:26:57.734Z\",\n \"updated_date\": \"2022-06-14T10:26:57.734Z\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Send-presentation-request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json()\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"presentation-id\", res.data.presentationId);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"comment\": \"Tested participant\",\r\n \"attributes\": [\r\n {\r\n \"attribute_name\": \"{{array0}}\",\r\n \"value\": \"\",\r\n \"condition\": \"\"\r\n }\r\n ],\r\n \"schemaId\": \"\",\r\n \"credentialDefId\": \"{{cred-def-id}}\",\r\n \"connectionId\": \"{{conn-id}}\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/send-presentation-request", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "send-presentation-request"] - }, - "description": "#### **Description** **:**\n\nFrom a verifier to a prover, the presentation request message describes values that need to be revealed and predicates that need to be fulfilled.\n\n> In Hyperledger Indy, this message is required, because it forces the Issuer to make a cryptographic commitment to the set of fields in the final credential and thus prevents Issuers from inserting spurious data.\n\n#### **Body Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| connectionId | required | `\"`connectionId`\"` <br>should be provided in \"STRING\" format. It the peer to peer connection id for two aeries agent. |\n| credential_def_id | required | `\"cred_def_id\"` <br>key maps to the credential definition identifier of the credential with the current attribute. It should be provided in \"STRING\" format. Mandatory if schema_id is not provided. |\n| schemaId | required | `\"schema_name\"` <br>Should be valid existing schema and should be provided as \"STRING\". Mandatory if cred_def_id is not provided. |\n| attributes | required | `[{ \"`attribute_name`\" : \"attr_name\" }]` <br>should be provided JSON array. |\n\n \n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| Key | Description |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → id` | It returns the id for the corresponding record in the database. |\n| `data → presentation_id` | It returns the presentation id for the corresponding record in the database. |\n| `data → connectionId` | It returns the connection id for the corresponding record in the database. |\n| `data → credential_def_id` | It returns the credential defination id for the corresponding record in the database. |\n| `data → schemaId` | It returns the corresponding unique id for schema on the ledger. |\n| `data → their_did` | It returns the their did for the corresponding record in the database. |\n| `data → status` | It returns the status for the corresponding record in the database. |\n| `data → created_date` | It returns the date the proof was created. |\n| `data → updated_date` | It returns the last proof updation date. |" - }, - "response": [ - { - "name": "Send-presentation-request", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"comment\": \"Tested participant\",\r\n \"attributes\": [\r\n {\r\n \"attribute_name\": \"{{array0}}\",\r\n \"value\": \"\",\r\n \"condition\": \"\"\r\n },\r\n {\r\n \"attribute_name\": \"{{array1}}\",\r\n \"value\": \"\",\r\n \"condition\": \"\"\r\n }\r\n ],\r\n \"schemaId\": \"{{schema-id}}\",\r\n \"credential_def_id\": \"\",\r\n \"connectionId\": \"{{conn-id}}\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/send-presentation-request", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "send-presentation-request"] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:27:07 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "454" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"1c6-E7pFwPlnxfbEOOkPcsFYYpmaWW8\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 201,\n \"message\": \"Presentation request send successfully\",\n \"data\": {\n \"id\": \"48b2b61d-a5d9-4c1d-a745-ed5cd018c5bd\",\n \"presentation_id\": \"07f27a99-4ff2-4d3c-82f9-0f49cd6d8203\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-07:14.06.2207\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-15T09:27:07.302Z\",\n \"updated_date\": \"2022-06-15T09:27:07.302Z\"\n }\n}" - } - ] - }, - { - "name": "Check-Verification", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "if (res.statusCode == 200) {\r", - "\tif (res.data.isVerified == true && res.data.state == \"done\") {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:green;\">\r", - " <h2>Proof verified successfully</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t} else {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:red;\">\r", - " <h2>Proof not presented yet.</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t}\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentationId={{presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentationId", - "value": "{{presentation-id}}" - } - ] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch proof presentation request information for the presentation id provided in query parameter.\n\n> It also provides state of the proof presentation request.\n\n#### **Query Parameter** **:**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| presentationId | required | `\"presentation_id\"` <br>presentation_id is fetched from the proof request. It provides the state of the request. |" - }, - "response": [ - { - "name": "Check-Verification", - "originalRequest": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentation_id={{presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentation_id", - "value": "{{presentation-id}}" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:27:28 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "7040" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"1b80-KzH+KoJHRvjoAbq0eUEVKSnHnbc\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentation fetch successfully\",\n \"data\": {\n \"_tags\": {\n \"threadId\": \"2037118f-1e63-4bd7-963b-c0e437f0ddd3\",\n \"state\": \"done\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\"\n },\n \"metadata\": {},\n \"id\": \"07f27a99-4ff2-4d3c-82f9-0f49cd6d8203\",\n \"createdAt\": \"2022-06-15T09:27:07.209Z\",\n \"requestMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/request-presentation\",\n \"@id\": \"2037118f-1e63-4bd7-963b-c0e437f0ddd3\",\n \"comment\": \"Tested participant\",\n \"request_presentations~attach\": [\n {\n \"@id\": \"libindy-request-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJuYW1lIjoiUHJvb2YgUmVxdWVzdCIsInZlcnNpb24iOiJQcm9vZiBSZXF1ZXN0Iiwibm9uY2UiOiIxMTMzMjE0Mzg2ODU3IiwicmVxdWVzdGVkX2F0dHJpYnV0ZXMiOnsiYWRkaXRpb25hbFByb3AxIjp7Im5hbWVzIjpbImZOYW1lIiwibE5hbWUiXSwicmVzdHJpY3Rpb25zIjpbeyJzY2hlbWFfaWQiOiI3S3VEVHBRaDNHSjdHcDZrRXJwV3ZNOjI6dGVzdF90ZXN0X3NjaGVtYTE0MDYyMi0wNzoxNC4wNi4yMjA3In1dfX0sInJlcXVlc3RlZF9wcmVkaWNhdGVzIjp7fX0=\"\n }\n }\n ]\n },\n \"state\": \"done\",\n \"connectionId\": \"3d14a056-8e4d-4336-9a48-541ce7ec7a80\",\n \"threadId\": \"2037118f-1e63-4bd7-963b-c0e437f0ddd3\",\n \"isVerified\": true,\n \"presentationMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/presentation\",\n \"@id\": \"7396b6fd-cde1-454f-b620-1014e363b723\",\n \"presentations~attach\": [\n {\n \"@id\": \"libindy-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsiZm5hbWUiOiI0MjkzNDcxNDc0OTY3NTMwMzk1ODI1OTA0NDczMTAyOTQ2NDcxODMwODcxMjkzOTE0ODc5NjcyODk2ODQxNzI3MzY2NjYyMjUwNTA1MSIsImxuYW1lIjoiMjgxMzAxMTU0OTE5NzQ0MTU0MjQyNDA4MDgzMTA1NDczMTE5MzE1MDg4NzA1NzkzMTY4Njg4ODc2MjA3MzYwMTI2NzE2NTkyOTA4MjMifSwiYV9wcmltZSI6IjU0ODA1NjExMjEwMzgxMDA1MTgxNjc3Njg0OTU2Mjg3ODYzMjkwODMyODI0MjEzNzM2NjQwNDE2MjA2MTAzMDQ0ODQxNzkyMTMyMzc3MTA4ODE4NTg3MzgyOTEyNTE2ODU2NTc0NzA4NjI2Nzc4NDgzMDU4NzI3ODc1MjAzNTkzOTUxMDgxODMxNzMyMDg2MzEzMDM1MzQxODY0NTkzMDk2Nzk5ODYxMTE5NjQ1MTAwMzc0ODAxODM3NzU3ODU0MDI4OTMxMzYxMDA4NTk4NTgxNDU2MDI1OTAxNzM1NTc5MzkxNDc0MDE4Mzg1NDUxNjY2MjY1MzUyNjM3OTcwMTUxMTA0NDQzNDI3NzQ0MDI4MjYyNTg0ODU1MDQ4ODQzMzg1NTQ4MTYyNjA5NzU2NzM4NzA1OTcyNjExNDg0ODgzOTkwODM3OTE5MDI1NzI0NDExODg4MTkyMTI3NDUzMTIwMDI2MzY0NTU1NzAzMjcxNjYxNTUwNTMxMTk1NTIwNzk3OTU1ODI4MTcwODcxNzMwNjQ4MzYyMDE2MTc3MjU5Njk2NDQyNzE2NTAyNDY2MDcxMzgwNzk4Mjc4OTM0NTc5Nzg0NDIxMTg3NjYzMjU5MjU1MDk5Mzg2ODgxNDc4NDM5MDkyMTA3MDE2MzgwMTYxNzYwMDg5MTUzMDUzNjMwNzY2ODQzMDQwNDY0MTY3ODE3NTgxMjc4NTEwOTA4MjIxNjY2OTUwNjgxMTEwMDI4NzU2OTMwNDIxNjkxNjE3MDcxNzgxODcwNzU0NDI5NDk3NzQyMzYwMTI1MjEwNjg4MzM0NTI1NjkxIiwiZSI6IjM5ODgzMDc4NDcyMjI5MTg1ODQzMTE2NjkxNDM1ODc2MzA0MTUzMDQwMzI5MTQ0MTY1MzY3MTU4ODY1MDY5MzExOTQ5MzY2NTM2NDg0NTgxMjU0NDc3NTUwNzYwODgzNzEzNjc0NTQ4ODI0MzQ1ODU1MTczMDgxNDI5MDc0MTY0OTE1ODkzOTA5IiwidiI6IjExMTI0Njg4MDYyMTE5MDgwNTg3MTYwOTgwMDI5MjIzNTc3MjIwNzAyMjQzNzY5MTIyMzkyMTg1OTA5NDE5Nzg5MjExODg4NjUzMjg1NTAwNTYwNDQ5MzcxODY2MTA1NTkzMzMyNDMwOTE4Mzg1MTQ5NTQ5NTAwMzI5NTMwNDY3NTkyMzc4Mjg0OTg1ODk1MTM0NDExMDY2NTUyNDg2ODMxNzA0NzM1MzY1MTYyMzM5MjI5NTMxNjA2MDYzMzk4OTk3MjQzMDE4OTU5NDE0NzE2ODkyNDY2NjM0MDEzOTE0MzM5MTQzODI4NDk0NDYwODQ3NTAyNjIxMzI4MDM3OTc2MDE3OTQyMjM0NDEwNzAzNzgyMzgxNDYxNjYwNTc1NzQyMjk5NDYwMDM1NDczNjI4MzE1MjAxOTUzMjI0MDkyNDgwMTgyNzk3NDg2MjU0MDY4MTExMzQ3MjkxMDM2NDA4MDE3OTgwNjU4NTg3OTE0MTA1NTM4MDU5MDgxMzU3MTI3MjU1OTc3MjU1MzM5Mzg2MTIyMjQwMjM3ODA5Nzg4Mzk3MDQyMzYwMTY0OTI3NDIyNjI4NDA4OTE5OTc3ODMxMzIxNDA1NDY0MjQxNzgzNzU5MTYxNDEzODYyNTY0OTQzNjE1MjA3MTk4NDk4MzUxNjA5OTk1OTE3MTY4MzY1NjA1MTc3MDM4MDA2NTMwNzA4MjA3OTk5MTY0NjQ3MjcwNDYzNDY1NDA5NDU0MzA4MDA0NjU0Nzg1OTI2NjEzMDYwNDk5NDY2NzIxMjI5NzQwOTk5NDM2NDMxMzM4MTAxMTY5NjY3Nzk1ODk4Nzk0NjQ3MjkxOTI2OTk5MTUxMjgxNDY1MDQyMDgwMjQ1NzM4MzA3MTM1NjAyNDgzNDg0OTQwOTU4NTUwNjMzMTAxMjE5MTkxNjYwMDExNjQ5MjY3MzI3ODIzMzk0MzY4NTk5MDE3Njk1NTEwNTk1NjU2MTU4MDI3NjUyMjEyODQ1MTUyNTQ0MzE1Njk1NjE2NDU1MzI1NTI2NzE1NTA3MzQ2NjA0NDIxMjc5NTA1OTQ0MjY5NzQ2OTg4NjIwNTUzNjI2OTk3NjkzNjY3MzUxMTIyNTQ0MDMwNTg4NjE2MDQxNDc0MDMyNDQzNTY0MTcwMDI4NzIyOTQxMzk1NDYyNDk3ODM4MDY1NjY1MTU4NDAyODgxNTI5MzEwOTYwNjU3ODIwNDYzNDkwMDU0OTUiLCJtIjp7ImdlbmRlciI6IjcyMjk0MzA2MDk1NjU2OTQ1OTY2NzgxMDAwNzY1NDg0OTA0Mjg4MjUyMDU1MjE0OTU1MjEzNzE3NzU4MTc0MTE4ODY3OTEzODI5MzAwMzk2MjA3OTU5MzA2MzU5MTI3MTEzMzYzMDA0MDUzNTc5NzE3OTQ2MTUyMzQyODAxNjUzOTUwNDY0MzgwMzExNTU4NDEwOTUzODc3MjMxMTEyMzQ3OTY2NTQ2MjQyNTc1NjY3MDIiLCJtYXN0ZXJfc2VjcmV0IjoiNjM5MDE0ODgzMjE3NTY0ODA4Njk3MTAxOTMyNjgyODg3Mzc4MjE1Njk4MzkwNDAxNDYzMzY2OTkwMzgyNzQ1MzQwMTM1Mjk2Njc3ODI2MTY5NDEwNjA3MTEyODAwNjc1OTk0NTU3ODgwNDI1NTUxMzAwNjg4MDA5NzU5NDkwOTYwMTY1NTY2OTI4MzUyMjM3NDE5OTY4NTQ1MjY0NDkzNzgxNjkzNzMyOTE1Nzg1OTE3NyJ9LCJtMiI6IjgwNjYxMzg5NDY1MDcwMDU5NjkwMTkxNzU2Mzk5NjUzOTUxNTgzNTc1Mjk3NjQ1MjQ3NzIyNjgyNTA1MDM4MDcyMzc4NzA5Nzg4MTc0MTc4MzgyNjMzMTI1MjY4OTU3OTE2Njg1NTYzNTU1NTg2MDQ2OTM1NzAxNTI1NDg5MDc5MjI2NDA3MDMwMDM4MjU2MTkzNzA3MTM0NzcxMzA0NDk0MTAyNzM5MzcwNzAwOTM1NDAifSwiZ2VfcHJvb2ZzIjpbXX0sIm5vbl9yZXZvY19wcm9vZiI6bnVsbH1dLCJhZ2dyZWdhdGVkX3Byb29mIjp7ImNfaGFzaCI6IjExMjI1Nzc2Njc5MDE1NzAxODY5NjgwNTAzMzcxMDg2NzI4NjY4OTMwMDIwOTc5NjEyOTgwMTA2MDk3Mzk0Nzk0OTI1OTg3OTc2MDM1MCIsImNfbGlzdCI6W1sxLDE3OCwzNiwyMjUsMTU3LDI0OSwyNCwyMDgsMTMsNTAsODIsMTYsMjE0LDY3LDQ0LDI0NywyMTMsNjgsMTg1LDI1NSwxMDUsMTM4LDIzMywxNDksMTI4LDEyMiwxODAsMjE3LDE3NSwyMywzMyw2NywxMzIsMjA4LDUxLDQ2LDExOCwyMzMsMjIsMjMyLDExMSwxMTcsMjEwLDk3LDEzMCw1LDIwNSwzOCwyOCwzMCwxMjQsMjE3LDE0NSwyMTgsOTMsMTYwLDEyNiw2MywyMTQsMjAwLDUsNDcsNjksODEsMjI1LDM5LDU4LDEwNywxOCwxMjcsMTcyLDIwLDI1Myw1MCw3Nyw5NiwyMjMsMTc3LDQzLDYxLDU1LDIxNSwyMSw1NSw2MCwyMTIsMTc5LDEwNywzNiwyNTUsNjksMTQ5LDE5MSwyNDQsNjAsMjA4LDIwMiwxODQsMjAzLDE0OSwxNTcsMTU0LDE0MywxMDUsMTcwLDE2NSwxMSwzLDkzLDk0LDIzMiwxNjQsMTc4LDI0MSwyMzUsNTgsOTMsMjQyLDIxOCw2MSw3NSw2Niw5MywxNTcsMjQ2LDE5OCwxNzIsMTY2LDEwMCwxOCwxMTgsMTk2LDU2LDU4LDEzNywyMjksMTMyLDIyNSwyMiw1MSwxNTksMTcxLDYsNTUsMjM1LDE2OCwxMiw0NiwxMjIsNDAsMTcsMTU4LDE4NywxNzksMTkwLDEyMCwyNDcsMTk3LDY2LDE0NSwxNDcsNzcsNTksMTg3LDI1NCw3MCwyMjYsOSwxNzgsMjIyLDEwMiwyMzcsMTYsMTMwLDEwLDI0MywyNiwxNzQsMTIwLDEwNCwxMDQsMTA3LDc1LDE4NiwzMCwyMTksNzYsMTAxLDIzOCwxMiw3Niw2OCwzMyw2LDE4MSwxMzEsMjU0LDI1MCwxNjIsMTAyLDE4OSw4LDU3LDE1MywxMTIsOSwyNSwxOTYsMjA5LDAsMTk4LDE5MiwxOTgsMTcwLDIxOCwxMiw1Nyw3MiwzNCwzLDExOCwxMzAsMTU4LDIyNyw0NCwxODcsMTA5LDE4MSwyMzAsMjE3LDIwNyw0Myw3NSwxNjIsMjQzLDIxMiwyMSwxNjcsMTU3LDIwNiwxMzksMTM3LDI1MCwxNzksMzAsODIsNzAsNzMsMTQsNjMsMjA2LDI0Myw2MiwxNjksMTYyLDI0NCwyNTFdXX19LCJyZXF1ZXN0ZWRfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnt9LCJyZXZlYWxlZF9hdHRyX2dyb3VwcyI6eyJhZGRpdGlvbmFsUHJvcDEiOnsic3ViX3Byb29mX2luZGV4IjowLCJ2YWx1ZXMiOnsiZk5hbWUiOnsicmF3IjoidGVzdF9mbmFtZV8zIiwiZW5jb2RlZCI6IjQyOTM0NzE0NzQ5Njc1MzAzOTU4MjU5MDQ0NzMxMDI5NDY0NzE4MzA4NzEyOTM5MTQ4Nzk2NzI4OTY4NDE3MjczNjY2NjIyNTA1MDUxIn0sImxOYW1lIjp7InJhdyI6InRlc3RfbG5hbWVfMyIsImVuY29kZWQiOiIyODEzMDExNTQ5MTk3NDQxNTQyNDI0MDgwODMxMDU0NzMxMTkzMTUwODg3MDU3OTMxNjg2ODg4NzYyMDczNjAxMjY3MTY1OTI5MDgyMyJ9fX19LCJzZWxmX2F0dGVzdGVkX2F0dHJzIjp7fSwidW5yZXZlYWxlZF9hdHRycyI6e30sInByZWRpY2F0ZXMiOnt9fSwiaWRlbnRpZmllcnMiOlt7InNjaGVtYV9pZCI6IjdLdURUcFFoM0dKN0dwNmtFcnBXdk06Mjp0ZXN0X3Rlc3Rfc2NoZW1hMTQwNjIyLTA3OjE0LjA2LjIyMDciLCJjcmVkX2RlZl9pZCI6IjdLdURUcFFoM0dKN0dwNmtFcnBXdk06MzpDTDozMjI4NzY6dGVzdF90ZXN0X2NyZWQtZGVmXzE0MDYyMi0wNyIsInJldl9yZWdfaWQiOm51bGwsInRpbWVzdGFtcCI6bnVsbH1dfQ==\"\n }\n }\n ],\n \"~thread\": {\n \"thid\": \"2037118f-1e63-4bd7-963b-c0e437f0ddd3\"\n }\n }\n }\n}" - } - ] - }, - { - "name": "Out-of-band-proof-presentation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "let template = `\r", - "<html>\r", - " <body> \r", - " <div>Scan the QR code below for out of band proof presentation</div>\r", - " <br>\r", - " <div style=\"text-align:center;\">\r", - " <img src='https://api.qrserver.com/v1/create-qr-code/?size=350x350&data=+{{data.presentationMessage}}'></img>\r", - " </div>\r", - " </body>\r", - "</html>`;\r", - "pm.visualizer.set(template, res);\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"oob-presentation-id\", res.data.presentationId);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"schemaName\":\"\",\r\n \"attributes\":[\"{{array0}}\",\"{{array1}}\"],\r\n \"options\": { \r\n \"type\":\"Aries1.0\",\r\n \"credentialDefinationName\":\"{{cred-def-id}}\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/send-out-of-band-presentation-request", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "send-out-of-band-presentation-request"] - }, - "description": "#### **Description** **:**\n\nFrom a verifier to a prover, the out of band presentation request message describes values that need to be revealed and predicates that need to be fulfilled.\n\n> The Out-of-band protocol is used when you wish to engage with another agent and you don't have a DIDComm connection to use for the interaction.\n\n#### **Body Parameters :**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| credential_def_id | required | `\"cred_def_id\"` <br>key maps to the credential definition identifier of the credential with the current attribute. It should be provided in \"STRING\" format. Mandatory if schema_id is not provided. |\n| schemaId | required | `\"schema_name\"` <br>Should be valid existing schema and should be provided as \"STRING\". Mandatory if cred_def_id is not provided. |\n| attributes | required | `[{ \"`attribute_name`\" : \"attr_name\" }]` <br>should be provided JSON array. |\n\n \n \n\n#### **Response :**\n\nThe positive response for this request comprises of following attributes :\n\n| Key | Description |\n| --- | --- |\n| `statusCode` | It return the http response code on the execution of this request. |\n| `message` | It returns the standard response with accordance to the action performed. |\n| `data` | It returns the requested information for the request. |\n| `data → id` | It returns the id for the corresponding record in the database. |\n| `data → presentation_id` | It returns the presentation id for the corresponding record in the database. |\n| `data → connectionId` | It returns the connection id for the corresponding record in the database. |\n| `data → credential_def_id` | It returns the credential defination id for the corresponding record in the database. |\n| `data → schemaId` | It returns the corresponding unique id for schema on the ledger. |\n| `data → their_did` | It returns the their did for the corresponding record in the database. |\n| `data → status` | It returns the status for the corresponding record in the database. |\n| `data → created_date` | It returns the date the presentation proof was created. |\n| `data → updated_date` | It returns the last presentation proof updation date. |\n| `data → presentationMessage` | It returns the presentation message for the corresponding record return by the mediator. |" - }, - "response": [ - { - "name": "Out-of-band-proof-presentation", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"comment\": \"Out of Band\",\r\n \"attributes\": [\r\n {\r\n \"attribute_name\": \"{{array0}}\",\r\n \"value\": \"\",\r\n \"condition\": \"\"\r\n },\r\n {\r\n \"attribute_name\": \"{{array1}}\",\r\n \"value\": \"\",\r\n \"condition\": \"\"\r\n }\r\n ],\r\n \"credential_def_id\": \"\",\r\n \"schemaId\": \"{{schema-id}}\"\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{proof_man_baseURL}}/v1/send-out-of-band-presentation-request", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "send-out-of-band-presentation-request"] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:27:47 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "1570" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"622-ZaUMbvDBDS5ELn3jeaSKeedxEIQ\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 201,\n \"message\": \"Presentation request send successfully\",\n \"data\": {\n \"id\": \"853d92b2-0260-41a7-a9af-3c026be8fe35\",\n \"presentation_id\": \"7fa03531-74f4-49a0-a94f-6feb30041c13\",\n \"connectionId\": \"\",\n \"credential_def_id\": \"\",\n \"schemaId\": \"7KuDTpQh3GJ7Gp6kErpWvM:2:test_test_schema140622-07:14.06.2207\",\n \"their_did\": \"\",\n \"status\": \"request-sent\",\n \"created_date\": \"2022-06-15T09:27:47.562Z\",\n \"updated_date\": \"2022-06-15T09:27:47.562Z\",\n \"presentationMessage\": \"https://gaiax.vereign.com:443/ocm/didcomm/?d_m=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvcHJlc2VudC1wcm9vZi8xLjAvcmVxdWVzdC1wcmVzZW50YXRpb24iLCJAaWQiOiJlOGViZGQyZS0xOGM2LTRkY2EtOWFmMy05ZjZjNWYyNzk0YzYiLCJjb21tZW50IjoiT3V0IG9mIEJhbmQiLCJyZXF1ZXN0X3ByZXNlbnRhdGlvbnN-YXR0YWNoIjpbeyJAaWQiOiJsaWJpbmR5LXJlcXVlc3QtcHJlc2VudGF0aW9uLTAiLCJtaW1lLXR5cGUiOiJhcHBsaWNhdGlvbi9qc29uIiwiZGF0YSI6eyJiYXNlNjQiOiJleUp1WVcxbElqb2lUM1YwSUU5bUlFSmhibVFnVUhKdmIyWWdVbVZ4ZFdWemRDSXNJblpsY25OcGIyNGlPaUpQZFhRZ1QyWWdRbUZ1WkNCUWNtOXZaaUJTWlhGMVpYTjBJaXdpYm05dVkyVWlPaUk1TmprMk5qTTBNalkyTkRZMElpd2ljbVZ4ZFdWemRHVmtYMkYwZEhKcFluVjBaWE1pT25zaVlXUmthWFJwYjI1aGJGQnliM0F4SWpwN0ltNWhiV1Z6SWpwYkltWk9ZVzFsSWl3aWJFNWhiV1VpWFN3aWNtVnpkSEpwWTNScGIyNXpJanBiZXlKelkyaGxiV0ZmYVdRaU9pSTNTM1ZFVkhCUmFETkhTamRIY0RaclJYSndWM1pOT2pJNmRHVnpkRjkwWlhOMFgzTmphR1Z0WVRFME1EWXlNaTB3TnpveE5DNHdOaTR5TWpBM0luMWRmWDBzSW5KbGNYVmxjM1JsWkY5d2NtVmthV05oZEdWeklqcDdmWDA9In19XSwifnNlcnZpY2UiOnsicmVjaXBpZW50S2V5cyI6WyJCdWpMMnlmYTNYTkFXTHJ6dmVyc216OXpZdkpKTmRZaHBMa0tCNXpnM0JpTCJdLCJyb3V0aW5nS2V5cyI6W10sInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vZ2FpYXgudmVyZWlnbi5jb206NDQzL29jbS9kaWRjb21tIn19\"\n }\n}" - } - ] - }, - { - "name": "Check-OOB-Verification", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "if (res.statusCode == 200) {\r", - "\tif (res.data.isVerified == true && res.data.state == \"done\") {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:green;\">\r", - " <h2>Proof verified successfully</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t} else {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:red;\">\r", - " <h2>Proof not presented yet.</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t}\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentationId={{oob-presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentationId", - "value": "{{oob-presentation-id}}" - } - ] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch proof presentation request information for the presentation id provided in query parameter.\n\n> It also provides state of the proof presentation request.\n\n#### **Query Parameter** **:**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| presentationId | required | `\"presentation_id\"` <br>presentation_id is fetched from the proof request. It provides the state of the request. |" - }, - "response": [ - { - "name": "Check-OOB-Verification", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentation_id={{oob-presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentation_id", - "value": "{{oob-presentation-id}}" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:28:08 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "7384" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"1cd8-GlvND2hpBaJd1J2NNqI0bQBluQU\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentation fetch successfully\",\n \"data\": {\n \"_tags\": {\n \"state\": \"done\",\n \"threadId\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\"\n },\n \"metadata\": {},\n \"id\": \"7fa03531-74f4-49a0-a94f-6feb30041c13\",\n \"createdAt\": \"2022-06-15T09:27:47.528Z\",\n \"requestMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/request-presentation\",\n \"@id\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\",\n \"comment\": \"Out of Band\",\n \"request_presentations~attach\": [\n {\n \"@id\": \"libindy-request-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJuYW1lIjoiT3V0IE9mIEJhbmQgUHJvb2YgUmVxdWVzdCIsInZlcnNpb24iOiJPdXQgT2YgQmFuZCBQcm9vZiBSZXF1ZXN0Iiwibm9uY2UiOiI5Njk2NjM0MjY2NDY0IiwicmVxdWVzdGVkX2F0dHJpYnV0ZXMiOnsiYWRkaXRpb25hbFByb3AxIjp7Im5hbWVzIjpbImZOYW1lIiwibE5hbWUiXSwicmVzdHJpY3Rpb25zIjpbeyJzY2hlbWFfaWQiOiI3S3VEVHBRaDNHSjdHcDZrRXJwV3ZNOjI6dGVzdF90ZXN0X3NjaGVtYTE0MDYyMi0wNzoxNC4wNi4yMjA3In1dfX0sInJlcXVlc3RlZF9wcmVkaWNhdGVzIjp7fX0=\"\n }\n }\n ],\n \"~service\": {\n \"recipientKeys\": [\n \"BujL2yfa3XNAWLrzversmz9zYvJJNdYhpLkKB5zg3BiL\"\n ],\n \"routingKeys\": [],\n \"serviceEndpoint\": \"https://gaiax.vereign.com:443/ocm/didcomm\"\n }\n },\n \"state\": \"done\",\n \"threadId\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\",\n \"autoAcceptProof\": \"always\",\n \"isVerified\": true,\n \"presentationMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/presentation\",\n \"@id\": \"8e2ce5d1-2f04-4edd-935e-75e6b5fed752\",\n \"presentations~attach\": [\n {\n \"@id\": \"libindy-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsiZm5hbWUiOiI0MjkzNDcxNDc0OTY3NTMwMzk1ODI1OTA0NDczMTAyOTQ2NDcxODMwODcxMjkzOTE0ODc5NjcyODk2ODQxNzI3MzY2NjYyMjUwNTA1MSIsImxuYW1lIjoiMjgxMzAxMTU0OTE5NzQ0MTU0MjQyNDA4MDgzMTA1NDczMTE5MzE1MDg4NzA1NzkzMTY4Njg4ODc2MjA3MzYwMTI2NzE2NTkyOTA4MjMifSwiYV9wcmltZSI6IjIzNzk0MTQ0MDAyNjU3Nzk2ODUxNzA2MTE2NTU1MDkyMTI4ODg3MzA0ODc1NzMwODQ3OTMyNDczODI5NzQ4MjE3MzQwMTE5ODQ4Nzg4OTY1OTg3NDIzNDAyOTg1OTUyMzIxMDYwOTk2MDkxNzIwMzgzMzQzNTk2Mjg1MjY5ODA4NjM5NzIxMjM1Njc2MjM5ODk3MjczNDY0NDQyMzkwMDI5ODMyNDk5Mzg3NDg3NTI1MjQyODA0ODI2ODI4OTE1ODcyMjUzNTI3NTI2Nzk2OTg3NzQ0NDc5Njc4MDY3NTMyMTI4ODU4NzczNDA4NDI0NDYwNDIyMjI4MzEwNTg0OTY5MzU3MzIzNTAzNzM0OTc0OTA0MjAzNzc3MzE1Nzc2ODk3NjkwOTk0OTA1ODk0OTA1NzM2MzY0NDY1MzU4NDY0ODkxNDExOTI2MzI5OTcyNTQ5MjM0NjU4ODk2Mzg0Njk4NDMyMDUzMjQ2NDIzNjI0NjY1MTE0MTA5NDk4MTY5NjAyNjgwMDQ4NTI5MTI5NTQxMzA2NzQ5MjQ2MDQ5MjIzMjMwOTU3NzI3Mzk3MTY4Njc4OTkyNDcxMDczMjYzNjQ3MTYxNzg1ODY0NzExNzIyMTA5NTUzMDA5MjQwOTAxODE1NTU3NzEwNTMwNzM2NjA4MDE5MzQ3NDExMzgxMDE1OTM2MTU4ODIxMTQ1MzEzOTk5MzU2NjAzNjQ5MTc1NTU2MDU5NzQwMTA1ODA0OTgyMjI3Njk1OTI3ODcyMzIzOTE5ODMyOTMxODI4MjUwNjAzNTg1Nzg4OTgzOTk1NTk5Mjk1MjUzNjc1IiwiZSI6IjE0NDU5NDA4Nzg4MjMwNTI5ODYxODg2Mzg2NjEwMzY2MjcxMjY3NzgwMjQxOTI4MjY1MzU5Njg5MzQ0MzAwMDUyOTcyMDIzMDI3OTE4NzIwODk0NzI0OTgyNDE2NDYyMzUxOTY1OTA4MDc0Njc1MzgwMDA2NTM3NjQ1MDI5MTg1MzkyNjcyMTQyMyIsInYiOiIxMTE4MTE2MzM1MjY4MTU5NzgzMDA4MzM4ODQ3ODY3NzkxNjk3MTQ3NTAxOTk4ODMwMzIwMDYwNzQ0NjYwOTM2NjU1NDk1Mjc2OTg3NDUzODUyNzUzNzU5MjUzMzYyNDQxNjIyMjMzNTc5Mzc5MDUwMTE1NDI4MjkwMzY5ODg3OTI4MjY2MDQ3NDk0NzYwNzczODc1NjM1MDM0MjYwNjIwMDUxNzEyNTQzOTkzODc5MjQ2NTgxNjE5NDAyMzQ4OTE1MTUyOTA4OTMyNzQ4NzIyOTIwMzU2NDgxMTkzODkwODcwNjEyOTc1NzQyNTk2ODc4MDk4MzkxMDM0NTY5MjgxOTMwMTcwMjQ4NjY5Njc3ODQ4NzU4MTg1NDA0MzY3MTk2OTgwOTQ1NDgxMDkyOTkzOTg2MzQzNzc5MDI4MzI3MTIyMjk1OTkyODQ1NjY5NzIxOTU4Njk1Mzg0MjA1MzU1MTI4ODU3Mzc0NDIyMzk3NTA1MTI5MDYzMzU1MjMxNDIzMzA5OTQwMzk5MjE3NTk4NjgwNDUzNjkxODU1MzE5NzAzMzUxNTczODI2NDk5NDQ3OTg5NTU5MTY1NjgxMzcyNjM3NzYwOTg3MjE4MjMxMjA0NTczNzA1NTg3NDc0MTQ0MTQxMDY0NTY0ODc4OTgxMjEwOTI2ODAxNTY1MjQyOTg3ODMzMTYxMjMxNTQ0NTQ0OTUyODI1MDk5ODM3MDY1Mjg1OTExOTE4OTkyOTcyODA0NDExMzcxODk5MDg1ODc2MTU3OTAxODI1OTU4NzE0NDIzMTA5OTg0ODkwNjc0NTQ2MTMyMjczMTc2Mzg5MjQ1NzU5NjA4MDg3MjU4MDMxNzYwOTU1NTI1MDM4Mjc1MzcyNTQ1NDMyODQwMTA5MDI1NjI3NzU2ODMzMzI5MjMzNzQxNDQ3MDI2NTg0OTUzNTI4NjM3MDM0NzUxNzIzMjE4MTY4OTMxNDM1MDg4MjMyMTc2OTM2MjkxMTIzMjY0ODEyNzg5MTY2MTA3NTk3NTg1NzMzMjQxMDM0MDUzODMxNzA5MjU4MjUyMTU4OTY3MjcyMTkzMTkxODYxNzk1NjMzMjMyODE0ODEzNjE2NTA2MjE2MTU4NDU3MDI1NDQwMDAzMTc0MDEzNTg5ODk2OTg3MDcxMDIwMzA0Mjk2NTUzNDkxNzg0NDE3MDM2MDQxMzI0NTcxNzk4ODExNTczODY2NDI0NTkwNjgxIiwibSI6eyJtYXN0ZXJfc2VjcmV0IjoiMTAxMTQ4NTA2NDgxNjEyOTM4NzI3NTgzNzYxMjQxODQwMzYxODcyMTU1NzU3NDE3MDg1Nzk2MjQzMjY5Nzg0MTg3NTk2NzE0OTA2MTc4MTIxNTk3MDM4NTM0MTk5MDExMTc2NjMxNjY3ODk4NzQ3ODQzNjE2MDE0MzU2OTQ4MDUzMDUzMTcxNjQzODQwOTY1MDE3NTk0MDA0Mjk3ODU2Mjk4OTcwNDI0Mzg2ODY1NjU2OTYiLCJnZW5kZXIiOiIzMjc1MzEzNTkxNDkyMDMyNzUwNDcxMTI4MDA3NTc0NTc3MDkyNDQxODYyMzM1NDg0NDg2MTUzNTM3Njc1OTY4MjUzNjcwMDI2Mjg4NzA0OTg1Nzc4ODc4NDM4ODQ0MTIwODQ0MjU4ODc3NDEyMjAwNzI0MTI2NjAxNzkyOTY0ODA2NzU5NzI4NDA4ODA0MTEwOTk4NzUwOTMzMjQ0MTI2NDQ0NDQyMDA3NDU5MzgxNDA2In0sIm0yIjoiMTI2ODM1NDM0OTk2NTkzNjUyNzU3MTQ2MzY1MTA2NjQzNTYxOTA3NDM0MTY3Njg1ODc2NjU5NzUwMTU2Njg4MDM1MDQ1NDg4MjM1MjA0MjU0MjI4NTk2MTcyOTI2MTgwMjc3NzU4MjYzMTU1MDY1ODE4MjAyNTE2OTc3NTIzOTYwOTQ1MDIzMDkzOTk2Nzc2MjM1MDQyNTk0NzIxMjc5NDIzMzk5ODI3MjE0MzE1OTI4OTgifSwiZ2VfcHJvb2ZzIjpbXX0sIm5vbl9yZXZvY19wcm9vZiI6bnVsbH1dLCJhZ2dyZWdhdGVkX3Byb29mIjp7ImNfaGFzaCI6IjQ1OTgzMTQzOTkwNDU4NDM2NjYzNzIwODcyNDkwNzA0NTIxMjYxODI2NjUzMDA0MjE1ODE0OTAzODA1MzAxMzE4NDIwMjQyNTgyNTA3IiwiY19saXN0IjpbWzE4OCwxMjQsMTAxLDE5MSw3OCw4MiwyMjgsMjE4LDI1MCwxOTQsODgsMTk0LDEyMywzOCw2LDEsMjA0LDIyMSw3MywyMDIsMTQ5LDkwLDE3NiwyNTEsMTExLDU0LDIxMSwxOCwxNCwyNDgsMzEsNzMsNjQsMTU2LDIxNywzMywxMDcsNTcsOTgsMjExLDI0MiwyMzQsMTksMTE5LDc2LDE5LDYzLDM1LDI0OCw4Myw2NywyMjgsMjE5LDE1MiwyOCw0Nyw4NywxMjYsMTk5LDI0MiwxNDYsMTQsMTM3LDk2LDE4NSwyNDMsNDUsMzgsMTA3LDE2NSwyMDksMjA0LDczLDE0MywxMCwxMjEsMTU2LDE0MywyMDQsMjM0LDY3LDI0Miw3MiwxNDQsMTg4LDI1MCwyMTMsMTM2LDE3NiwxMDUsMjA2LDU5LDExMywyMzYsMjQyLDEyMywyMTcsMTEsMjE1LDE2MSwxNTEsMjM1LDgxLDI0NiwyMDEsMTgyLDE4OSw1MSwyMDEsMjI4LDc1LDE3MCwyMjgsMTgyLDM4LDUxLDExNiwxODgsMjM1LDE4NiwyMjIsMTI2LDEyNSwxOSwxNTgsMTQsNTYsNDYsODgsMTc4LDU0LDIxMCwxMDUsMjE2LDEyOSwyMzEsNTAsMTExLDg3LDE1OSwyNDUsMjQsNzksMjQxLDkzLDI1NCwxMjYsMTg1LDEyOCwyMjgsMTExLDg3LDc1LDE0MSwyMjAsMjI5LDQ2LDEwLDI0LDYwLDIxNSwxMDIsMTY3LDE0MCw1NCw3NywyMzIsMjUxLDE0MSw3NiwyNSwyLDE1NSw1NSwyNTEsMjQyLDE4NiwxNTQsMjM1LDI5LDgxLDExMiwxNjMsNjgsNSwyMCwxNzEsNiwyMTYsMTgwLDUwLDExOCwyMDIsNjgsNTYsNzQsMjMxLDIyNSw4OSwxMTYsMTYxLDU2LDE1Miw1MSwxNzEsOTksMjI4LDcyLDE0MCw0MCwyMTAsNjMsODEsMjUyLDIyLDEwLDIwOSwxNTAsMjMyLDE0NSw1MiwxNDcsMTIyLDI0NCwxOCwxMDQsNTIsMjI0LDI1NSwxNiwxMzcsMTA4LDI0NSwyNDAsMTIwLDE1NCwxOTYsMjAwLDIxMiw1Myw2MywxMDQsMjAwLDIzLDE2MiwxMDQsMTA5LDE1OSwyMzgsMTc5LDAsMTcxLDEzMCwyNTAsMTQwLDE3MV1dfX0sInJlcXVlc3RlZF9wcm9vZiI6eyJyZXZlYWxlZF9hdHRycyI6e30sInJldmVhbGVkX2F0dHJfZ3JvdXBzIjp7ImFkZGl0aW9uYWxQcm9wMSI6eyJzdWJfcHJvb2ZfaW5kZXgiOjAsInZhbHVlcyI6eyJmTmFtZSI6eyJyYXciOiJ0ZXN0X2ZuYW1lXzMiLCJlbmNvZGVkIjoiNDI5MzQ3MTQ3NDk2NzUzMDM5NTgyNTkwNDQ3MzEwMjk0NjQ3MTgzMDg3MTI5MzkxNDg3OTY3Mjg5Njg0MTcyNzM2NjY2MjI1MDUwNTEifSwibE5hbWUiOnsicmF3IjoidGVzdF9sbmFtZV8zIiwiZW5jb2RlZCI6IjI4MTMwMTE1NDkxOTc0NDE1NDI0MjQwODA4MzEwNTQ3MzExOTMxNTA4ODcwNTc5MzE2ODY4ODg3NjIwNzM2MDEyNjcxNjU5MjkwODIzIn19fX0sInNlbGZfYXR0ZXN0ZWRfYXR0cnMiOnt9LCJ1bnJldmVhbGVkX2F0dHJzIjp7fSwicHJlZGljYXRlcyI6e319LCJpZGVudGlmaWVycyI6W3sic2NoZW1hX2lkIjoiN0t1RFRwUWgzR0o3R3A2a0VycFd2TToyOnRlc3RfdGVzdF9zY2hlbWExNDA2MjItMDc6MTQuMDYuMjIwNyIsImNyZWRfZGVmX2lkIjoiN0t1RFRwUWgzR0o3R3A2a0VycFd2TTozOkNMOjMyMjg3Njp0ZXN0X3Rlc3RfY3JlZC1kZWZfMTQwNjIyLTA3IiwicmV2X3JlZ19pZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19\"\n }\n }\n ],\n \"~thread\": {\n \"thid\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\"\n },\n \"~service\": {\n \"recipientKeys\": [\n \"evCcbASAsuvWGB4y2Z3tVeXKQLsgnF6MZ1NPWcPteiH\"\n ],\n \"routingKeys\": [\n \"3uq8CaLCKcP1Q2JW8KLyDQu9ZrHPbZw4Kix9oZqeY7Tf\"\n ],\n \"serviceEndpoint\": \"https://gaiax.vereign.com/mediator\"\n },\n \"~transport\": {\n \"return_route\": \"all\"\n }\n }\n }\n}" - } - ] - }, - { - "name": "Out-of-band-proof-for-type", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "let template = `\r", - "<html>\r", - " <body> \r", - " <div>Scan the QR code below for out of band proof presentation</div>\r", - " <br>\r", - " <div style=\"text-align:center;\">\r", - " <img src='https://api.qrserver.com/v1/create-qr-code/?size=350x350&data=+{{data.presentationMessage}}'></img>\r", - " </div>\r", - " </body>\r", - "</html>`;\r", - "pm.visualizer.set(template, res);\r", - "\r", - "if(res.statusCode == 201){\r", - " pm.environment.set(\"oob_type-presentation-id\", res.data.presentationId);\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "accept", - "value": "*/*" - } - ], - "url": { - "raw": "{{proof_man_baseURL}}/v1/out-of-band-proof?type=principalMemberCredential", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "out-of-band-proof"], - "query": [ - { - "key": "type", - "value": "principalMemberCredential" - } - ] - } - }, - "response": [] - }, - { - "name": "Check-OOB-Type-Verification", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();\r", - "\r", - "if (res.statusCode == 200) {\r", - "\tif (res.data.isVerified == true && res.data.state == \"done\") {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:green;\">\r", - " <h2>Proof verified successfully</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t} else {\r", - "\t\tlet template = `\r", - " <html>\r", - " <body> \r", - " <div style=\"text-align:center; color:red;\">\r", - " <h2>Proof not presented yet.</h2>\r", - " </div>\r", - " </body>\r", - " </html>`;\r", - "\t\tpm.visualizer.set(template, res);\r", - "\t}\r", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentationId={{oob_type-presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentationId", - "value": "{{oob_type-presentation-id}}" - } - ] - }, - "description": "#### **Description** **:**\n\nThis request is used to fetch proof presentation request information for the presentation id provided in query parameter.\n\n> It also provides state of the proof presentation request.\n\n#### **Query Parameter** **:**\n\n| **Key** | **isRequired** | **Value** |\n| --- | --- | --- |\n| presentationId | required | `\"presentation_id\"` <br>presentation_id is fetched from the proof request. It provides the state of the request. |" - }, - "response": [ - { - "name": "Check-OOB-Verification", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/find-by-presentation-id?presentation_id={{oob-presentation-id}}", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "find-by-presentation-id"], - "query": [ - { - "key": "presentation_id", - "value": "{{oob-presentation-id}}" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "date", - "value": "Wed, 15 Jun 2022 09:28:08 GMT" - }, - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "content-length", - "value": "7384" - }, - { - "key": "x-powered-by", - "value": "Express" - }, - { - "key": "access-control-allow-origin", - "value": "*" - }, - { - "key": "etag", - "value": "W/\"1cd8-GlvND2hpBaJd1J2NNqI0bQBluQU\"" - }, - { - "key": "strict-transport-security", - "value": "max-age=15724800; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 200,\n \"message\": \"Proof presentation fetch successfully\",\n \"data\": {\n \"_tags\": {\n \"state\": \"done\",\n \"threadId\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\"\n },\n \"metadata\": {},\n \"id\": \"7fa03531-74f4-49a0-a94f-6feb30041c13\",\n \"createdAt\": \"2022-06-15T09:27:47.528Z\",\n \"requestMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/request-presentation\",\n \"@id\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\",\n \"comment\": \"Out of Band\",\n \"request_presentations~attach\": [\n {\n \"@id\": \"libindy-request-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJuYW1lIjoiT3V0IE9mIEJhbmQgUHJvb2YgUmVxdWVzdCIsInZlcnNpb24iOiJPdXQgT2YgQmFuZCBQcm9vZiBSZXF1ZXN0Iiwibm9uY2UiOiI5Njk2NjM0MjY2NDY0IiwicmVxdWVzdGVkX2F0dHJpYnV0ZXMiOnsiYWRkaXRpb25hbFByb3AxIjp7Im5hbWVzIjpbImZOYW1lIiwibE5hbWUiXSwicmVzdHJpY3Rpb25zIjpbeyJzY2hlbWFfaWQiOiI3S3VEVHBRaDNHSjdHcDZrRXJwV3ZNOjI6dGVzdF90ZXN0X3NjaGVtYTE0MDYyMi0wNzoxNC4wNi4yMjA3In1dfX0sInJlcXVlc3RlZF9wcmVkaWNhdGVzIjp7fX0=\"\n }\n }\n ],\n \"~service\": {\n \"recipientKeys\": [\n \"BujL2yfa3XNAWLrzversmz9zYvJJNdYhpLkKB5zg3BiL\"\n ],\n \"routingKeys\": [],\n \"serviceEndpoint\": \"https://gaiax.vereign.com:443/ocm/didcomm\"\n }\n },\n \"state\": \"done\",\n \"threadId\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\",\n \"autoAcceptProof\": \"always\",\n \"isVerified\": true,\n \"presentationMessage\": {\n \"@type\": \"https://didcomm.org/present-proof/1.0/presentation\",\n \"@id\": \"8e2ce5d1-2f04-4edd-935e-75e6b5fed752\",\n \"presentations~attach\": [\n {\n \"@id\": \"libindy-presentation-0\",\n \"mime-type\": \"application/json\",\n \"data\": {\n \"base64\": \"eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsiZm5hbWUiOiI0MjkzNDcxNDc0OTY3NTMwMzk1ODI1OTA0NDczMTAyOTQ2NDcxODMwODcxMjkzOTE0ODc5NjcyODk2ODQxNzI3MzY2NjYyMjUwNTA1MSIsImxuYW1lIjoiMjgxMzAxMTU0OTE5NzQ0MTU0MjQyNDA4MDgzMTA1NDczMTE5MzE1MDg4NzA1NzkzMTY4Njg4ODc2MjA3MzYwMTI2NzE2NTkyOTA4MjMifSwiYV9wcmltZSI6IjIzNzk0MTQ0MDAyNjU3Nzk2ODUxNzA2MTE2NTU1MDkyMTI4ODg3MzA0ODc1NzMwODQ3OTMyNDczODI5NzQ4MjE3MzQwMTE5ODQ4Nzg4OTY1OTg3NDIzNDAyOTg1OTUyMzIxMDYwOTk2MDkxNzIwMzgzMzQzNTk2Mjg1MjY5ODA4NjM5NzIxMjM1Njc2MjM5ODk3MjczNDY0NDQyMzkwMDI5ODMyNDk5Mzg3NDg3NTI1MjQyODA0ODI2ODI4OTE1ODcyMjUzNTI3NTI2Nzk2OTg3NzQ0NDc5Njc4MDY3NTMyMTI4ODU4NzczNDA4NDI0NDYwNDIyMjI4MzEwNTg0OTY5MzU3MzIzNTAzNzM0OTc0OTA0MjAzNzc3MzE1Nzc2ODk3NjkwOTk0OTA1ODk0OTA1NzM2MzY0NDY1MzU4NDY0ODkxNDExOTI2MzI5OTcyNTQ5MjM0NjU4ODk2Mzg0Njk4NDMyMDUzMjQ2NDIzNjI0NjY1MTE0MTA5NDk4MTY5NjAyNjgwMDQ4NTI5MTI5NTQxMzA2NzQ5MjQ2MDQ5MjIzMjMwOTU3NzI3Mzk3MTY4Njc4OTkyNDcxMDczMjYzNjQ3MTYxNzg1ODY0NzExNzIyMTA5NTUzMDA5MjQwOTAxODE1NTU3NzEwNTMwNzM2NjA4MDE5MzQ3NDExMzgxMDE1OTM2MTU4ODIxMTQ1MzEzOTk5MzU2NjAzNjQ5MTc1NTU2MDU5NzQwMTA1ODA0OTgyMjI3Njk1OTI3ODcyMzIzOTE5ODMyOTMxODI4MjUwNjAzNTg1Nzg4OTgzOTk1NTk5Mjk1MjUzNjc1IiwiZSI6IjE0NDU5NDA4Nzg4MjMwNTI5ODYxODg2Mzg2NjEwMzY2MjcxMjY3NzgwMjQxOTI4MjY1MzU5Njg5MzQ0MzAwMDUyOTcyMDIzMDI3OTE4NzIwODk0NzI0OTgyNDE2NDYyMzUxOTY1OTA4MDc0Njc1MzgwMDA2NTM3NjQ1MDI5MTg1MzkyNjcyMTQyMyIsInYiOiIxMTE4MTE2MzM1MjY4MTU5NzgzMDA4MzM4ODQ3ODY3NzkxNjk3MTQ3NTAxOTk4ODMwMzIwMDYwNzQ0NjYwOTM2NjU1NDk1Mjc2OTg3NDUzODUyNzUzNzU5MjUzMzYyNDQxNjIyMjMzNTc5Mzc5MDUwMTE1NDI4MjkwMzY5ODg3OTI4MjY2MDQ3NDk0NzYwNzczODc1NjM1MDM0MjYwNjIwMDUxNzEyNTQzOTkzODc5MjQ2NTgxNjE5NDAyMzQ4OTE1MTUyOTA4OTMyNzQ4NzIyOTIwMzU2NDgxMTkzODkwODcwNjEyOTc1NzQyNTk2ODc4MDk4MzkxMDM0NTY5MjgxOTMwMTcwMjQ4NjY5Njc3ODQ4NzU4MTg1NDA0MzY3MTk2OTgwOTQ1NDgxMDkyOTkzOTg2MzQzNzc5MDI4MzI3MTIyMjk1OTkyODQ1NjY5NzIxOTU4Njk1Mzg0MjA1MzU1MTI4ODU3Mzc0NDIyMzk3NTA1MTI5MDYzMzU1MjMxNDIzMzA5OTQwMzk5MjE3NTk4NjgwNDUzNjkxODU1MzE5NzAzMzUxNTczODI2NDk5NDQ3OTg5NTU5MTY1NjgxMzcyNjM3NzYwOTg3MjE4MjMxMjA0NTczNzA1NTg3NDc0MTQ0MTQxMDY0NTY0ODc4OTgxMjEwOTI2ODAxNTY1MjQyOTg3ODMzMTYxMjMxNTQ0NTQ0OTUyODI1MDk5ODM3MDY1Mjg1OTExOTE4OTkyOTcyODA0NDExMzcxODk5MDg1ODc2MTU3OTAxODI1OTU4NzE0NDIzMTA5OTg0ODkwNjc0NTQ2MTMyMjczMTc2Mzg5MjQ1NzU5NjA4MDg3MjU4MDMxNzYwOTU1NTI1MDM4Mjc1MzcyNTQ1NDMyODQwMTA5MDI1NjI3NzU2ODMzMzI5MjMzNzQxNDQ3MDI2NTg0OTUzNTI4NjM3MDM0NzUxNzIzMjE4MTY4OTMxNDM1MDg4MjMyMTc2OTM2MjkxMTIzMjY0ODEyNzg5MTY2MTA3NTk3NTg1NzMzMjQxMDM0MDUzODMxNzA5MjU4MjUyMTU4OTY3MjcyMTkzMTkxODYxNzk1NjMzMjMyODE0ODEzNjE2NTA2MjE2MTU4NDU3MDI1NDQwMDAzMTc0MDEzNTg5ODk2OTg3MDcxMDIwMzA0Mjk2NTUzNDkxNzg0NDE3MDM2MDQxMzI0NTcxNzk4ODExNTczODY2NDI0NTkwNjgxIiwibSI6eyJtYXN0ZXJfc2VjcmV0IjoiMTAxMTQ4NTA2NDgxNjEyOTM4NzI3NTgzNzYxMjQxODQwMzYxODcyMTU1NzU3NDE3MDg1Nzk2MjQzMjY5Nzg0MTg3NTk2NzE0OTA2MTc4MTIxNTk3MDM4NTM0MTk5MDExMTc2NjMxNjY3ODk4NzQ3ODQzNjE2MDE0MzU2OTQ4MDUzMDUzMTcxNjQzODQwOTY1MDE3NTk0MDA0Mjk3ODU2Mjk4OTcwNDI0Mzg2ODY1NjU2OTYiLCJnZW5kZXIiOiIzMjc1MzEzNTkxNDkyMDMyNzUwNDcxMTI4MDA3NTc0NTc3MDkyNDQxODYyMzM1NDg0NDg2MTUzNTM3Njc1OTY4MjUzNjcwMDI2Mjg4NzA0OTg1Nzc4ODc4NDM4ODQ0MTIwODQ0MjU4ODc3NDEyMjAwNzI0MTI2NjAxNzkyOTY0ODA2NzU5NzI4NDA4ODA0MTEwOTk4NzUwOTMzMjQ0MTI2NDQ0NDQyMDA3NDU5MzgxNDA2In0sIm0yIjoiMTI2ODM1NDM0OTk2NTkzNjUyNzU3MTQ2MzY1MTA2NjQzNTYxOTA3NDM0MTY3Njg1ODc2NjU5NzUwMTU2Njg4MDM1MDQ1NDg4MjM1MjA0MjU0MjI4NTk2MTcyOTI2MTgwMjc3NzU4MjYzMTU1MDY1ODE4MjAyNTE2OTc3NTIzOTYwOTQ1MDIzMDkzOTk2Nzc2MjM1MDQyNTk0NzIxMjc5NDIzMzk5ODI3MjE0MzE1OTI4OTgifSwiZ2VfcHJvb2ZzIjpbXX0sIm5vbl9yZXZvY19wcm9vZiI6bnVsbH1dLCJhZ2dyZWdhdGVkX3Byb29mIjp7ImNfaGFzaCI6IjQ1OTgzMTQzOTkwNDU4NDM2NjYzNzIwODcyNDkwNzA0NTIxMjYxODI2NjUzMDA0MjE1ODE0OTAzODA1MzAxMzE4NDIwMjQyNTgyNTA3IiwiY19saXN0IjpbWzE4OCwxMjQsMTAxLDE5MSw3OCw4MiwyMjgsMjE4LDI1MCwxOTQsODgsMTk0LDEyMywzOCw2LDEsMjA0LDIyMSw3MywyMDIsMTQ5LDkwLDE3NiwyNTEsMTExLDU0LDIxMSwxOCwxNCwyNDgsMzEsNzMsNjQsMTU2LDIxNywzMywxMDcsNTcsOTgsMjExLDI0MiwyMzQsMTksMTE5LDc2LDE5LDYzLDM1LDI0OCw4Myw2NywyMjgsMjE5LDE1MiwyOCw0Nyw4NywxMjYsMTk5LDI0MiwxNDYsMTQsMTM3LDk2LDE4NSwyNDMsNDUsMzgsMTA3LDE2NSwyMDksMjA0LDczLDE0MywxMCwxMjEsMTU2LDE0MywyMDQsMjM0LDY3LDI0Miw3MiwxNDQsMTg4LDI1MCwyMTMsMTM2LDE3NiwxMDUsMjA2LDU5LDExMywyMzYsMjQyLDEyMywyMTcsMTEsMjE1LDE2MSwxNTEsMjM1LDgxLDI0NiwyMDEsMTgyLDE4OSw1MSwyMDEsMjI4LDc1LDE3MCwyMjgsMTgyLDM4LDUxLDExNiwxODgsMjM1LDE4NiwyMjIsMTI2LDEyNSwxOSwxNTgsMTQsNTYsNDYsODgsMTc4LDU0LDIxMCwxMDUsMjE2LDEyOSwyMzEsNTAsMTExLDg3LDE1OSwyNDUsMjQsNzksMjQxLDkzLDI1NCwxMjYsMTg1LDEyOCwyMjgsMTExLDg3LDc1LDE0MSwyMjAsMjI5LDQ2LDEwLDI0LDYwLDIxNSwxMDIsMTY3LDE0MCw1NCw3NywyMzIsMjUxLDE0MSw3NiwyNSwyLDE1NSw1NSwyNTEsMjQyLDE4NiwxNTQsMjM1LDI5LDgxLDExMiwxNjMsNjgsNSwyMCwxNzEsNiwyMTYsMTgwLDUwLDExOCwyMDIsNjgsNTYsNzQsMjMxLDIyNSw4OSwxMTYsMTYxLDU2LDE1Miw1MSwxNzEsOTksMjI4LDcyLDE0MCw0MCwyMTAsNjMsODEsMjUyLDIyLDEwLDIwOSwxNTAsMjMyLDE0NSw1MiwxNDcsMTIyLDI0NCwxOCwxMDQsNTIsMjI0LDI1NSwxNiwxMzcsMTA4LDI0NSwyNDAsMTIwLDE1NCwxOTYsMjAwLDIxMiw1Myw2MywxMDQsMjAwLDIzLDE2MiwxMDQsMTA5LDE1OSwyMzgsMTc5LDAsMTcxLDEzMCwyNTAsMTQwLDE3MV1dfX0sInJlcXVlc3RlZF9wcm9vZiI6eyJyZXZlYWxlZF9hdHRycyI6e30sInJldmVhbGVkX2F0dHJfZ3JvdXBzIjp7ImFkZGl0aW9uYWxQcm9wMSI6eyJzdWJfcHJvb2ZfaW5kZXgiOjAsInZhbHVlcyI6eyJmTmFtZSI6eyJyYXciOiJ0ZXN0X2ZuYW1lXzMiLCJlbmNvZGVkIjoiNDI5MzQ3MTQ3NDk2NzUzMDM5NTgyNTkwNDQ3MzEwMjk0NjQ3MTgzMDg3MTI5MzkxNDg3OTY3Mjg5Njg0MTcyNzM2NjY2MjI1MDUwNTEifSwibE5hbWUiOnsicmF3IjoidGVzdF9sbmFtZV8zIiwiZW5jb2RlZCI6IjI4MTMwMTE1NDkxOTc0NDE1NDI0MjQwODA4MzEwNTQ3MzExOTMxNTA4ODcwNTc5MzE2ODY4ODg3NjIwNzM2MDEyNjcxNjU5MjkwODIzIn19fX0sInNlbGZfYXR0ZXN0ZWRfYXR0cnMiOnt9LCJ1bnJldmVhbGVkX2F0dHJzIjp7fSwicHJlZGljYXRlcyI6e319LCJpZGVudGlmaWVycyI6W3sic2NoZW1hX2lkIjoiN0t1RFRwUWgzR0o3R3A2a0VycFd2TToyOnRlc3RfdGVzdF9zY2hlbWExNDA2MjItMDc6MTQuMDYuMjIwNyIsImNyZWRfZGVmX2lkIjoiN0t1RFRwUWgzR0o3R3A2a0VycFd2TTozOkNMOjMyMjg3Njp0ZXN0X3Rlc3RfY3JlZC1kZWZfMTQwNjIyLTA3IiwicmV2X3JlZ19pZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19\"\n }\n }\n ],\n \"~thread\": {\n \"thid\": \"e8ebdd2e-18c6-4dca-9af3-9f6c5f2794c6\"\n },\n \"~service\": {\n \"recipientKeys\": [\n \"evCcbASAsuvWGB4y2Z3tVeXKQLsgnF6MZ1NPWcPteiH\"\n ],\n \"routingKeys\": [\n \"3uq8CaLCKcP1Q2JW8KLyDQu9ZrHPbZw4Kix9oZqeY7Tf\"\n ],\n \"serviceEndpoint\": \"https://gaiax.vereign.com/mediator\"\n },\n \"~transport\": {\n \"return_route\": \"all\"\n }\n }\n }\n}" - } - ] - }, - { - "name": "http://3.111.77.38:3007/v1/accept-presentation?presentation_id=5eceaa96-d08a-42a3-a083-98672ce55188", - "request": { - "method": "POST", - "header": [ - { - "key": "accept", - "value": "*/*" - } - ], - "url": { - "raw": "{{proof_man_baseURL}}/v1/accept-presentation?presentation_id=5eceaa96-d08a-42a3-a083-98672ce55188", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "accept-presentation"], - "query": [ - { - "key": "presentation_id", - "value": "5eceaa96-d08a-42a3-a083-98672ce55188" - } - ] - } - }, - "response": [] - }, - { - "name": "Get-agent-proofs-proposal", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{proof_man_baseURL}}/v1/agent-proofs?threadId=85054e0d-2c21-4711-88d0-0c66ad1959f5", - "host": ["{{proof_man_baseURL}}"], - "path": ["v1", "agent-proofs"], - "query": [ - { - "key": "threadId", - "value": "85054e0d-2c21-4711-88d0-0c66ad1959f5" - } - ] - } - }, - "response": [] - } - ] -} diff --git a/documentation/README.md b/documentation/README.md deleted file mode 100644 index a1014a565e09e5b4be89d5e97502832cbd6485c5..0000000000000000000000000000000000000000 --- a/documentation/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Introduction - -The purpuse of this repository is to hold specific information related to `Organization Credential Manager` project: - -- Initial high level requirement which are specific for the project -- Technical documentation and diagrams -- Agreed tools and libraries -- Outcome of researches diff --git a/documentation/TSA_Integration.md b/documentation/TSA_Integration.md new file mode 100644 index 0000000000000000000000000000000000000000..33ff6c7bba77059823001fb4263248a2f818f655 --- /dev/null +++ b/documentation/TSA_Integration.md @@ -0,0 +1,47 @@ +# Integration with Trust Services (TSA) + +The Organization Credential Manager (OCM) integrates seamlessly with Trust Services (TSA) to enhance credential management through robust policy checks. These integrations leverage TSA policies for various credential-related actions, such as auto-revocation, auto-reissue, and refresh operations, utilizing TSA's Policy Manager via specified endpoints and configuration settings. + +## Configuration Requirements + +Integration with TSA's policy-based functionalities requires: + +- **POLICIES_URL**: This environment variable specifies the URL of the TSA Policy Manager and must be set in the Credential Manager's configuration to enable communication with TSA and execution of policy checks. + +## Response Processing + +For all endpoints described below, the response from TSA contains the result of the policy evaluation. Integrators are responsible for interpreting these responses and taking appropriate actions based on their specific requirements. The response format and the process of handling these results are designed to be flexible, accommodating the varied needs of OCM integrators. + +### Credential Auto-Revocation + +Auto-revocation ensures that credentials are automatically revoked based on specific policies. + +- **Configuration Property**: `POLICIES_AUTO_REVOCATION_POLICY` + - Must be set to a valid policy name existing on the TSA Policy Manager, as specified by `POLICIES_URL`. + +- **Endpoint**: `/v1/policies/check-revocation` + - A request to this endpoint performs a revocation check by evaluating the specified policy against the credential in question. + +### Credential Auto-Reissue + +This functionality allows for credentials to be automatically reissued in accordance with predefined policies, ensuring they remain valid and compliant. + +- **Configuration Property**: `POLICIES_AUTO_REISSUE_POLICY` + - Set this to the name of a policy on the TSA Policy Manager that governs the conditions under which credentials should be automatically reissued. + +- **Endpoint**: `/v1/policies/check-reissue` + - Sending a request here triggers the evaluation of the auto-reissue policy against current credentials to determine if reissuance is necessary. + +### Credential Refresh + +Credential refresh operations ensure that credentials are updated to reflect the latest policies and information. + +- **Configuration Property**: `POLICIES_REFRESH_POLICY` + - Specifies the policy dictating the conditions for refreshing credentials, according to rules set in the TSA Policy Manager. + +- **Endpoint**: `/v1/policies/refresh` + - Requests to this endpoint prompt the Credential Manager to assess whether the credentials meet the current standards and policies for refreshment. + +## Conclusion + +Integrating OCM with TSA's Trust Services through policy management significantly enhances the security and reliability of credential operations. By properly configuring policies and utilizing the designated endpoints, organizations can automate processes for credential revocation, reissuance, and refreshment, ensuring credentials remain valid and compliant with evolving standards. This integration exemplifies a robust component of modern identity management systems, offering flexibility and scalability to meet the demands of various operational contexts. diff --git a/documentation/create-credential-definition.md b/documentation/create-credential-definition.md deleted file mode 100644 index 0b40958bdb81e4f860b76cab3af09214e80ca2aa..0000000000000000000000000000000000000000 --- a/documentation/create-credential-definition.md +++ /dev/null @@ -1,9 +0,0 @@ -```mermaid -sequenceDiagram -participant OCM Admin -participant OCM Attestation Manager - par - OCM Admin ->> OCM Attestation Manager: Calls the POST method credentialDef with relevant attributes. - OCM Attestation Manager ->> OCM Admin: Responds with status code 201, with message 'Credential definition created successfully', if credential definition is created on ledger successfully - end -``` diff --git a/documentation/create-schema-sequence.md b/documentation/create-schema-sequence.md deleted file mode 100644 index b5d9d2e3d29056077d64c90774a4358e5504722b..0000000000000000000000000000000000000000 --- a/documentation/create-schema-sequence.md +++ /dev/null @@ -1,9 +0,0 @@ -```mermaid -sequenceDiagram -participant OCM Admin -participant OCM Attestation Manager - par - OCM Admin ->> OCM Attestation Manager: Calls the POST method Schemas with relevant attributes. - OCM Attestation Manager ->> OCM Admin: Responds with status code 201, with message 'Schema created successfully', if schema is created on ledger successfully - end -``` diff --git a/documentation/deployment.md b/documentation/deployment.md new file mode 100644 index 0000000000000000000000000000000000000000..bbe4dd79592167029a1aef5d49868b63321ccaf2 --- /dev/null +++ b/documentation/deployment.md @@ -0,0 +1,59 @@ +# Organization Credential Manager Deployment Guide + +This guide outlines the procedures for deploying the Organization Credential Manager (OCM) platform. OCM facilitates efficient management and deployment of credentials within organizations, tailored for containerized applications. This document covers how to run OCM in Docker, run services locally for development purposes, and deploy on Kubernetes for scalable production environments. + +## Running Everything in Docker + +This section describes how to deploy OCM using Docker. + +### Prerequisites +Ensure the following are installed: +- Docker Compose: Necessary for managing multi-container Docker applications. + +### Steps +To start all OCM components in Docker, execute the following command: +```bash +docker compose up -d +``` +This initiates all required components as background processes without needing additional configuration steps. + +## Running Services Locally + +For development, testing, or debugging, services can be run locally to allow direct interaction with the code. + +### Prerequisites +The following should be installed: +- Node.js: The JavaScript runtime for server-side execution. +- PNPM: A package manager offering efficiency and speed. +- NATS Server: Facilitates messaging and inter-service communication. A local NATS Server could be started using the command: + ```bash + docker compose up -d nats + ``` +- S3-compatible Server: Necessary for revocation functionality. A local MinIO server could be started using the command: + ```bash + docker compose up -d s3 + ``` + +### Steps +Follow these steps to run a service locally: +1. Clone the OCM repository to your local environment. +2. Install dependencies with `pnpm install`. +3. Create a `.env` file in the service's root directory (e.g., `apps/credential-manager/.env`), using `.env.example` as a template. +4. To start the service, run `pnpm -F SERVICE_NAME start`, replacing `SERVICE_NAME` with the directory name under `apps` for the desired service. + +## Kubernetes Deployment + +Kubernetes offers a scalable and resilient environment for production deployments of OCM. + +### Overview +OCM services are equipped with Helm charts to facilitate deployment on Kubernetes, found at `apps/SERVICE_NAME/deployment/helm`. + +### Steps +To deploy a service on Kubernetes: +1. Ensure `kubectl` and Helm are installed and configured with your cluster. +2. Navigate to the service's Helm chart directory: `apps/SERVICE_NAME/deployment/helm`. +3. Deploy the service using Helm: + ```bash + helm install SERVICE_NAME ./ -f values.yaml + ``` + Replace `SERVICE_NAME` with the actual service name and adjust `values.yaml` as necessary for your specific deployment needs. diff --git a/documentation/er-diagram.md b/documentation/er-diagram.md deleted file mode 100644 index 3fcce92486b468a6f21a8f8fc6f60e00c5e5ffd7..0000000000000000000000000000000000000000 --- a/documentation/er-diagram.md +++ /dev/null @@ -1,145 +0,0 @@ -# OCM ER Diagram - -```mermaid - erDiagram - Participant ||--o{ Schema : Creates-Consume - Schema ||--|{ Attributes : Has - CredentialDef ||--|| Schema : Has - - Connection ||--o{ Credential : Issues - Credential ||--|| CredentialDef : Has - - Participant ||--o{ Connection : Has - Proof }o--|| Connection : Requests - Agent }o--|| Participant : Has - - Agent ||--|{ Ledger : Has - - User }|--|| Participant : Has - - Config { - uuid id - string key - string value - DateTime created_date - DateTime updated_date - } - - Participant { - uuid id - string name - string address - string website - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - User { - uuid id - string email - string password - Boolean is_verified - Role role - uuid participant_id - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Agent { - uuid id - uuid participant_id - string agent_url - string invitation_url - string public_did - string wallet_name - string status - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Ledger { - uuid id - uuid agent_id - string network - Blob genesis_file - string environment - DateTime created_date - DateTime updated_date - } - - Schema { - uuid id - string schemaID - string participant_did - string name - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Attributes { - uuid id - string schemaID - string name - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Credential { - uuid id - uuid exchange_id - uuid cred_def_id - string connection_id - string participant_id - string principal_did - DateTime created_date - DateTime updated_date - } - - CredentialDef { - uuid id - string cred_def_id - string schemaID - string name - Boolean is_auto_issue - Boolean is_revokable - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Connection { - uuid id - string connection_id - string status - string participant_did - string their_did - string their_label - DateTime created_date - uuid created_by - DateTime updated_date - uuid updated_by - } - - Proof { - uuid id - string presentation_id - string credential_def_id - string participant_did - string their_did - string status - DateTime created_date - DateTime updated_date - - } -``` diff --git a/documentation/issue-credential-sequence.md b/documentation/issue-credential-sequence.md deleted file mode 100644 index 562e1b91188e3b712753270de7c0ce39b02dbe0d..0000000000000000000000000000000000000000 --- a/documentation/issue-credential-sequence.md +++ /dev/null @@ -1,14 +0,0 @@ -```mermaid -sequenceDiagram -participant PCM User -participant PCM App -participant OCM Admin -participant OCM Attestation Manager - par - OCM Admin ->> OCM Attestation Manager: Calls the POST method create-offer-Credential with connectionId, credentialDefinitionId and relevant attributes and their values. - OCM Attestation Manager ->> PCM App: Offers the Credential to the corresponding PCM - PCM User->> PCM App: Accepts the Credential - PCM App ->> OCM Attestation Manager: Sends acknowledgement - OCM Attestation Manager ->> PCM App: Accepts the acknowledgement on accept-request API, and issues the Verifiable Credential, which gets stored in PCM wallet. - end -``` diff --git a/documentation/ocm-example-flows.md b/documentation/ocm-example-flows.md new file mode 100644 index 0000000000000000000000000000000000000000..d2be9aead5d9679f0ef7d083e22d2ea7b818b215 --- /dev/null +++ b/documentation/ocm-example-flows.md @@ -0,0 +1,263 @@ +# OCM Example Flows + +## Prerequisites + +Before diving into the example flows of using Organization Credential Manager (OCM), it's essential to set up the environment and create the foundational elements required for managing digital credentials. Follow these steps to get started: + +### Step 1: Create a Tenant + +The first step involves creating a tenant within OCM. A tenant represents an organizational entity within OCM, encapsulating its own collection of credentials, keys, and configurations. This step is crucial as it establishes the context within which all subsequent operations will be performed. + +To create a tenant, you will need to interact with the [**Tenant Manager**](../apps/tenant-manager/README.md). This can be done through a command-line interface, script, or potentially a user interface developed for administrative purposes. Here's an example command (note: replace `tenant_name` with your desired tenant name): + +```bash +# Example command to create a tenant +curl -X POST http://ocm-indy.xfsc.dev/v1/tenants -d '{"label": "tenant_name"}' +``` + +> **Important:** The Tenant Manager is a critical component that should be secured appropriately. Implementing authentication and authorization mechanisms is out of the scope of this project. It is the responsibility of the OCM Administrator to secure access to the Tenant Manager, potentially by developing a custom user interface and access control system. + +### Step 2: Create a DID for the Tenant + +After creating a tenant, the next step is to create a Decentralized Identifier (DID) for it. A DID uniquely identifies the tenant and facilitates secure, verifiable interactions within the OCM ecosystem and beyond. + +This step is performed using the [**DID Manager**](../apps/did-manager/README.md), which interfaces with the Indy Ledger to register the DID and manage its associated DID Document. + +Here's how you can create a DID for your newly created tenant: + +```bash +# Example command to create a DID for the tenant +curl -X POST "http://ocm-indy.xfsc.dev/v1/dids?tenantId=<tenantId>" -d '{"seed": "<seed>"}' +``` + +In this command, replace `<tenantId>` with your tenant's unique identifier and `<seed>` with a randomly generated string of 32 characters. This seed is crucial for the creation of a secure and unique DID. For a detailed example and additional parameters that can be included in the DID creation request, please refer to the [DID Manager's documentation](../apps/did-manager/README.md). + +This will register a new DID on the ledger and associate it with your tenant, enabling the tenant to participate in secure digital interactions. + +## Connections + +### Creating an Invitation + +To initiate a secure connection between tenants in the OCM ecosystem, the first step is to create an invitation. This invitation follows the Aries protocol, serving as a standardized way to establish peer-to-peer connections. + +To create an invitation, use the Connection Manager service. Here's an example command to generate an invitation: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/invitations?tenantId=<tenantId>" +``` + +In this command, replace `<tenantId>` with the identifier of the tenant creating the invitation. The response from this command will include an invitation object, which contains the information needed by another tenant to connect. + +The response from this command will include an invitationUrl. This URL encapsulates the invitation object, which contains the information needed by another tenant to connect. + +### Accepting an Invitation + +After an invitation has been created and the `invitationUrl` delivered to the intended recipient, the next step for the recipient is to accept the invitation to initiate the connection process. The delivery of the `invitationUrl` can be achieved through various methods, such as email, sharing a QR code, or any other secure means of communication preferred by the parties involved. + +Once the recipient has the `invitationUrl`, they can proceed to accept the invitation using the Connection Manager service. Accepting an invitation establishes a secure, peer-to-peer connection between the two tenants, based on the Aries protocols. Here is an example command for accepting an invitation: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/connection-manager/accept-invitation?tenantId=<recipientTenantId>" -d '{"invitationUrl": "<invitationUrl>"}' +``` + +In this command, replace `<recipientTenantId>` with the identifier of the tenant accepting the invitation, and `<invitationUrl>` with the URL received. This action completes the connection setup, enabling secure communication and transactions between the two tenants. + +### Establishing a Connection to Self + +For scenarios where a tenant needs to establish a connection within their own organizational boundaries—essentially connecting to themselves—OCM provides a streamlined process that bypasses the traditional invitation and acceptance steps. This self-connection is particularly useful for internal testing, development, or scenarios where segregated parts of an organization need to interact securely without the need for external verification. + +To establish a connection to self, a single request is made, simplifying the connection setup process. Here's how to initiate a self-connection: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/connections?tenantId=<tenantId>" +``` + +Replace `<tenantId>` with the identifier of the tenant initiating the self-connection. This request does not require a payload, as the necessary information is derived from the tenant ID provided in the request. + +This command instructs the Connection Manager to create a new connection record that is automatically marked as active and trusted, without the need for the traditional invitation exchange process. The resulting connection can then be used for internal transactions, credential issuance, and verifications, just like any other connection established through invitation and acceptance. + +## Schemas and Credential Definitions + +Within the framework of Aries and Hyperledger Indy, the concepts of schemas and credential definitions play crucial roles in the management and issuance of verifiable credentials. Schemas provide a structured template that defines the attributes and format of the credentials, essentially outlining what information a credential will contain. Credential definitions, on the other hand, tie these schemas to specific issuers, enabling them to issue verifiable credentials based on the predefined schema. Together, these components ensure that credentials are issued in a standardized and interoperable manner, facilitating their verification across different systems and platforms. + +### Creating a Schema + +To create a schema within the OCM ecosystem, utilize the Schema Manager service. Here's how you can initiate the process: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/schemas?tenantId=<tenantId>" -d 'payload' +``` + +In the command above, replace `<tenantId>` with the identifier of the tenant creating the schema, and replace `'payload'` with the actual payload. The payload should look like this: + +```json +{ + "name": "ExampleSchema", + "version": "1.0", + "attributeNames": ["firstName", "lastName", "email"], + "issuerDid": "issuerDidValue" +} +``` + +This payload includes the schema's name, version, the attribute names it will include, and the `issuerDid`. Ensure to replace `"issuerDidValue"` with the actual DID of the issuer. + +### Creating a Credential Definition + +After a schema has been established, the subsequent step involves creating a credential definition. This step associates the schema with an issuer, thereby permitting the issuance of verifiable credentials based on that schema. Credential definitions can also specify revocation support, which adds an additional layer of security and control for credential issuers. Here’s how to create a credential definition with revocation support: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/schema-manager/create-credential-definition?tenantId=<tenantId>" -d 'payload' +``` + +In the above command, replace `<tenantId>` with the identifier of the tenant creating the credential definition, and substitute `'payload'` with the actual payload. The payload should be structured as follows: + +```json +{ + "issuerDid": "issuerDidValue", + "schemaId": "schemaId", + "tag": "tagValue", + "supportsRevocation": true +} +``` + +This detailed payload specifies the `issuerDid`, identifying the issuer, and `schemaId`, linking to the specific schema. The `tag` field, which can be a random semantic version string, helps in distinguishing between different credential definitions created by the same issuer for the same schema. Setting `supportsRevocation` to true enables the issued credentials to be revocable. + +## Issuing a Credential + +Issuing a credential within the OCM framework involves a two-step process: making an offer for a credential and then accepting this offer. This process aligns with the Aries protocol for credential exchange, ensuring a standardized approach to issuing verifiable credentials. + +### Making a Credential Offer + +The first step in issuing a credential is to make an offer. This offer is sent from the issuer to the prospective credential holder and includes details about the credential being offered, such as the credential definition ID and the attributes it will contain. + +To make a credential offer, the Credential Manager service is used. Here’s how you can initiate a credential offer: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/credential-offers?tenantId=<issuerTenantId>" -d 'payload' +``` + +Replace `<issuerTenantId>` with the identifier of the tenant (issuer) making the offer. The payload should be structured as follows and replace `'payload'` with it: + +```json +{ + "connectionId": "{{connection_id}}", + "credentialDefinitionId": "{{credential_definition_id}}", + "attributes": [ + { + "name": "firstName", + "value": "John" + }, + { + "name": "lastName", + "value": "Doe" + } + // Add other attributes as needed + ] +} +``` + +This payload specifies the connection over which the offer is made (`connectionId`), the credential definition ID (`credentialDefinitionId`), and the attributes of the credential being offered. + +### Accepting a Credential Offer + +Upon receiving a credential offer, the prospective holder can accept the offer to initiate the credential issuance process. Accepting the offer involves sending a response back to the issuer, indicating the recipient's willingness to receive the credential as per the offer's terms. + +To accept a credential offer, the Credential Manager service is again utilized. Here's an example command to accept an offer: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/credential-offers/<offer_id>/accept?tenantId=<holderTenantId>" +``` + +Replace `<holderTenantId>` with the identifier of the tenant (holder) accepting the offer. Replace `"{{offer_id}}"` with the actual ID of the credential offer received. This completes the credential issuance process, successfully issuing the credential from the issuer to the holder. + +### Self-Issuance of Credentials + +In certain scenarios, a tenant might opt for self-issuance of credentials, where the issuer and the credential holder are the same entity. This process simplifies the credential issuance flow by automatically accepting the credential offer, effectively skipping the manual step of accepting the offer. + +Self-issuance is particularly useful for credentials that don't require external verification or approval, allowing for a streamlined, efficient process. To initiate self-issuance, the same Credential Manager service is used, but the process combines making an offer and automatically accepting it in a single step. + +Here’s an example of how to initiate a self-issued credential: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/credential-offers/self?tenantId=<tenantId>" -d 'payload' +``` + +Replace `<tenantId>` with the identifier of the tenant issuing the credential to themselves. The payload should be structured similarly to making an offer but is tailored for self-issuance: + +```json +{ + "connectionId": "{{self_connection_id}}", + "credentialDefinitionId": "{{credential_definition_id}}", + "attributes": [ + { + "name": "firstName", + "value": "John" + }, + { + "name": "lastName", + "value": "Doe" + } + // Add other attributes as needed + ] +} +``` + +This payload includes the credential definition ID (`credentialDefinitionId`) and the attributes of the credential being issued. Upon submission, the offer is automatically accepted, and the credential is issued directly to the self-issuing tenant, bypassing the need for an explicit acceptance step. + +## Proof Requests + +The process of requesting and providing proofs is fundamental in the verification of credentials within the OCM framework. This involves two main steps: making a proof request by the verifier and accepting this request by the holder, leading to the sharing of a verifiable proof. + +### Making a Proof Request + +A proof request is initiated by a verifier who needs to verify certain attributes or credentials held by another party. This request specifies what information is needed and may include specific attributes, credential types, or conditions that the proof must satisfy. + +To make a proof request, use the Proof Manager service. Here's how to initiate a proof request: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/proofs?tenantId=<verifierTenantId>" -d 'payload' +``` + +Replace `<verifierTenantId>` with the identifier of the tenant (verifier) making the proof request. The payload detailing the specifics of the proof request should look like this, and replace `'payload'` with: + +```json +{ + "name": "dynamic_chameleon", + "connectionId": "connectionId", + "requestedAttributes": { + "person_names": { + "names": ["firstName", "lastName"], + "restrictions": [{}] + } + }, + "requestedPredicates": {} +} +``` + +This payload includes a `name` for the proof request, which is dynamically generated to ensure uniqueness, the `connectionId` over which the request is made, and a `requestedAttributes` object detailing the requirements of the proof, such as the attributes' names and any restrictions related to the credentials being verified. The `requestedPredicates` section can be used to specify additional constraints but is empty in this example. + +### Accepting a Proof Request + +Upon receiving a proof request, the credential holder can respond by providing the requested proof, assuming they possess the credentials that satisfy the request's criteria. Accepting a proof request involves preparing and sending a proof that meets the verifier's specifications. + +To accept a proof request and provide the necessary proof, the Proof Manager service is again utilized. Here's an example command to accept a proof request and send the proof: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/proofs/<proofId>/accept?tenantId=<holderTenantId>" -d 'payload' +``` + +Replace `<holderTenantId>` with the identifier of the tenant (holder) responding to the proof request. + +This action completes the proof exchange, allowing the verifier to receive and verify the proof. + +## Revoking Credentials + +In certain situations, it may become necessary to revoke a credential that has been issued, for example, if the information is no longer valid or if the credential was issued in error. OCM supports the revocation of credentials, allowing issuers to invalidate a previously issued credential. This process ensures that the credential can no longer be used for verification purposes. + +To revoke a credential, a single request is made to the Credential Manager service. This request specifies the `credentialId` of the credential to be revoked. Here's how to initiate a credential revocation: + +```bash +curl -X POST "http://ocm-indy.xfsc.dev/v1/credentials/<credentialId>?tenantId=<issuerTenantId>" +``` + +Replace `<issuerTenantId>` with the identifier of the tenant (issuer) initiating the revocation. Replace `"credentialId"` with the actual ID of the credential you wish to revoke. This action invalidates the credential, ensuring it cannot be presented or verified in future transactions. It's important to note that the revocation process is irreversible, and once a credential is revoked, it cannot be reinstated. diff --git a/documentation/ocm-flow-overview.md b/documentation/ocm-flow-overview.md deleted file mode 100644 index d65446bfdfdf36bd9fc6babbb9f4af3b4bb339f7..0000000000000000000000000000000000000000 --- a/documentation/ocm-flow-overview.md +++ /dev/null @@ -1,347 +0,0 @@ -# OCM API flows - -## Create a connection with a PCM - --> under connection-manager - -1. Create an invitation url - -POST -{{baseUrl}}/v1/invitation-url?alias=trust - -- in the response copy - e.g. -> "invitationUrl": "https://example.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiI0ZDA2N2FlMi1kNTQ5LTRlYzQtYmU2OC00MzFmMzdkMjJlODUiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiNVl6U21xcjY5d0RFSzVvQWpzZFQ3UktjazJuaHdmS0phVVVneUVESEFuNWQiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9nYWlheC52ZXJlaWduLmNvbTo0NDMvb2NtL2RpZGNvbW0iLCJyb3V0aW5nS2V5cyI6W119", - or "invitationUrlShort" - -2. Convert the invitation URL to a QR code and scan with the PCM - -## Create a connection with another OCM - --> under connection-manager - -1. Create an invitation url - -POST -{{baseUrl}}/v1/invitation-url?alias=trust - -- in the response copy - e.g. -> "invitationUrl": "https://example.com:443/ocm/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiI0ZDA2N2FlMi1kNTQ5LTRlYzQtYmU2OC00MzFmMzdkMjJlODUiLCJsYWJlbCI6InNzaS1hYnN0cmFjdGlvbi1hZ2VudCIsInJlY2lwaWVudEtleXMiOlsiNVl6U21xcjY5d0RFSzVvQWpzZFQ3UktjazJuaHdmS0phVVVneUVESEFuNWQiXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9nYWlheC52ZXJlaWduLmNvbTo0NDMvb2NtL2RpZGNvbW0iLCJyb3V0aW5nS2V5cyI6W119", - -2. Accept connection on the other OCM - -POST -{{baseUrl}}/v1/accept-connection-invitation - -body: -{ -"invitationUrl": "https://example.com:443/ocm-provider/didcomm?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiJhNzE1OGFkZS1iMjBkLTQwYmQtODliNy1jM2RhMjg1NWU0ZDAiLCJsYWJlbCI6IkdYRlMtSW50ZWdyYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbIkNYYlViTTNEeEJ3SzNWTFptaXBWOEtDYmQyVmVXM1NDa3BOb01qblRSb1JiIl0sInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vaW50ZWdyYXRpb24uZ3hmcy5kZXY6NDQzL29jbS1wcm92aWRlci9kaWRjb21tIiwicm91dGluZ0tleXMiOltdfQ", -"autoAcceptConnection": true -} - -## Issue a credential to an already established connection - --> under attestation-manager - -1. create a schema (optional in case the desired schema already exists on the ledger) - -POST -{{baseUrl}}/v1/schemas - -body: -**make sure to create a unique name for it and choose whatever, however many attributes you want** - -``` -{ - "name": "BasicCredential-oct-3-2022", - "createdBy": "asdasdasd", - "version": "1.0.0", - "attributes": [ - "firstName", - "lastName" - ] -} -``` - -2. Create credential definition - -POST -{{baseUrl}}/v1/credentialDef - -body: -**make sure to use the schemaID from the previous response and create a unique name here as well** - -``` -{ - "schemaID": "the schema id from the response of 1.", - "name": "BasicCredential-oct-3-2022-credDef.1.0.2", - "isRevokable": false, - "isAutoIssue": false, - "expiryHours": "23", - "createdBy": "asdasdasfas" -} -``` - -3. Offer a credential - -POST -{{baseUrl}}/v1/create-offer-credential - -body: -**make sure to use here the connection id from ## Create a connection 2. response and the credential definition id from the previous response** -**make sure the names of the attributes here match the names of the attributes in the schema** - -``` -{ - "connectionId": "12926da1-916f-46d3-8f44-56df4d79c2c3", - "credentialDefinitionId": "7KuDTpQh3GJ7Gp6kErpWvM:3:CL:520446:BasicCredential-oct-3-2022-credDef.1.0.2", - "comment": "Issueacredential.1.0", - "attributes": [ - { - "name": "firstName", - "value": "Jon" - }, - { - "name": "lastName", - "value": "Doe" - } - ], - "autoAcceptCredential": "always" -} -``` - -## Accept a credential (OCM - OCM) - -**on the PCM, it is part of the GUI** - -**on the OCM, the procedure is the following:** - --> under attestation-manager - -1. Get all credentials and find the one of interest (unaccepted credential will be in **state: offer-received**) - -POST -{{baseUrl}}/v1/credential - -response example: - -``` -{ - "statusCode": 200, - "message": "Credential fetch successfully", - "data": { - "count": 2, - "records": [ - { - "id": "6a6ee15d-a68b-46af-ac9b-e07bc544dc3b", - "credentialId": "624a76fd-f8f7-4f92-b4f8-d7497ce70a04", - "credDefId": "8y8oycXjnQCRT2t3mRuzbP:3:CL:37720:LegalInformation-1.0.2", - "threadId": "9f95a52a-1387-40c7-a4b0-96d9d8d0b63b", - "state": "done", - "principalDid": "KGaeQVaF3FzjWTU6bJJ21Y", - "connectionId": "12cd39de-d792-410a-8db2-39140cfc3579", - "createdDate": "2023-02-22T13:28:58.149Z", - "updatedDate": "2023-02-22T13:34:48.467Z", - "expirationDate": null - }, - { - "id": "de74fafe-7a35-45c2-b872-2ea07ae0d952", - "credentialId": "5623fceb-3d40-4d99-a230-c142c646d5fe", - "credDefId": "8y8oycXjnQCRT2t3mRuzbP:3:CL:37720:LegalInformation-1.0.2", - "threadId": "fa5aab2c-4ecb-4b69-bc00-8b83de3444a1", - "state": "offer-received", - "principalDid": "KGaeQVaF3FzjWTU6bJJ21Y", - "connectionId": "12cd39de-d792-410a-8db2-39140cfc3579", - "createdDate": "2023-02-23T07:09:34.143Z", - "updatedDate": "2023-02-23T07:09:34.143Z", - "expirationDate": null - } - ] - } -} -``` - -2. accept credential offer - -POST -{{baseUrl}}/v1/accept-offer?credentialID={{copy-the-credentialId-from-the-previous-response}} - -## To send a proof request to someone in order to present claims for a custom issued credential - --> under proof manager - -POST -/v1/send-presentation-request - -**the connection id can be found in a connection record** -**the credential definition id can be found on attestation-manager -> GET {{baseUrl}}/v1/credentialDef** - -body: - -``` -{ - "comment": "Proof Presenation", - "attributes": [ - { - "schemaId": "", - "credentialDefId": "7KuDTpQh3GJ7Gp6kErpWvM:3:CL:520446:BasicCredential-oct-3-2022-credDef.1.0.2", - "attributeName": "lastName", - "value": "", - "condition": "" - } - ], - "connectionId": "a4c01f34-c292-4e8a-b59a-2036d31e4988" -} -``` - -## Accept a proof request - -**on the PCM it is done through the GUI** -**on the OCM follow this procedure:** - -1. Find the desired proof request id - -GET -{{baseUrl}}/v1/agent-proofs - -The proof request will be in **state: request-received** - -2. Accept the proof request - -POST -{{baseUrl}}/v1/accept-proof-request?proofRecordId={{proofId}} - -Response example: - -``` -{ - "statusCode": 200, - "message": "Request accepted successfully", - "data": { - "_tags": { - "threadId": "6b5c57b3-137f-4f52-87f5-bd086596503c", - "state": "request-received", - "connectionId": "653b8cdc-d919-4b65-b399-7bf17ce36ffc" - }, - "metadata": {}, - "id": "19c5269f-c3e5-4369-b8d0-87fe22accc9a", - "createdAt": "2023-03-10T10:56:07.498Z", - "requestMessage": { - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "@id": "6b5c57b3-137f-4f52-87f5-bd086596503c", - "comment": "Proof Presenation", - "request_presentations~attach": [ - { - "@id": "libindy-request-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJuYW1lIjoiUHJvb2YgUmVxdWVzdCIsInZlcnNpb24iOiJQcm9vZiBSZXF1ZXN0Iiwibm9uY2UiOiI5MTAwMDg3=" - } - } - ] - }, - "state": "presentation-sent", - "connectionId": "653b8cdc-d919-4b65-b399-7bf17ce36ffc", - "threadId": "6b5c57b3-137f-4f52-87f5-bd086596503c", - "presentationMessage": { - "@type": "https://didcomm.org/present-proof/1.0/presentation", - "@id": "c1089096-b834-4fe8-a51d-f3472b1b1dcd", - "presentations~attach": [ - { - "@id": "libindy-presentation-0", - "mime-type": "application/json", - "data": { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsicHJjZmlyc3RuYW1lIjoiNjgyMTE2NTZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19" - } - } - ], - "~thread": { - "thid": "6b5c57b3-137f-4f52-87f5-bd086596503c" - } - } - } -} -``` - -## Credential types can be used for automatically requesting proof on a specific credential during login when OCM and TSA are integrated with AA Services - -**with the following type: principalMemberCredential** - -By default, there will be no credential type on the OCM. An existing schema on the chosen ledger can be linked, or a new schema can be created and linked to this credential type. - -## In order to create a credential type: - --> under attestation manager - -POST -{{baseUrl}}/v1/credentialType - -body: - -``` -{ - "type": "principalMemberCredential", - "schemaId": "7KuDTpQh3GJ7Gp6kErpWvM:2:test_profileCredential-220722:1.0" -} -``` - -## In order to update schema type for credential type: - --> under attestation manager - -PATCH -/v1/updateSchemaIdByType?type={credentialType} - -Example: /v1/updateSchemaIdByType?type=principalMemberCredential - -body: - -``` -{ - "schemaId": "7KuDTpQh3GJ7Gp6kErpWvM:2:test_principalMemberCredential-060722:1.0" -} -``` - -## To check interactions with an existing connection - -GET -{{baseUrl}}/v1/connection-information?connectionId={{the-connectionId-you-are-looking-for}} - -example response: - -``` -{ - "statusCode": 200, - "message": "Connection information fetch successfully", - "data": { - "records": { - "issueCredentials": [ - { - "id": "6a6ee15d-a68b-46af-ac9b-e07bc544dc3b", - "credentialId": "624a76fd-f8f7-4f92-b4f8-d7497ce70a04", - "credDefId": "8y8oycXjnQCRT2t3mRuzbP:3:CL:37720:LegalInformation-1.0.2", - "threadId": "9f95a52a-1387-40c7-a4b0-96d9d8d0b63b", - "state": "done", - "principalDid": "KGaeQVaF3FzjWTU6bJJ21Y", - "connectionId": "12cd39de-d792-410a-8db2-39140cfc3579", - "createdDate": "2023-02-22T13:28:58.149Z", - "updatedDate": "2023-02-22T13:34:48.467Z", - "expirationDate": null - }, - { - "id": "de74fafe-7a35-45c2-b872-2ea07ae0d952", - "credentialId": "5623fceb-3d40-4d99-a230-c142c646d5fe", - "credDefId": "8y8oycXjnQCRT2t3mRuzbP:3:CL:37720:LegalInformation-1.0.2", - "threadId": "fa5aab2c-4ecb-4b69-bc00-8b83de3444a1", - "state": "offer-received", - "principalDid": "KGaeQVaF3FzjWTU6bJJ21Y", - "connectionId": "12cd39de-d792-410a-8db2-39140cfc3579", - "createdDate": "2023-02-23T07:09:34.143Z", - "updatedDate": "2023-02-23T07:09:34.143Z", - "expirationDate": null - } - ], - "presentProofs": [] - } - } -} -``` diff --git a/documentation/ocm-services.md b/documentation/ocm-services.md deleted file mode 100644 index ffbf1baea6057edae44cb8452b603ed84db6edd6..0000000000000000000000000000000000000000 --- a/documentation/ocm-services.md +++ /dev/null @@ -1,12 +0,0 @@ -# OCM ER Diagram - -```mermaid - flowchart LR - gateway[API Gateway] -->Connection - subgraph test - service1 --> service2 - subgraph subgraph - subgraph2-->subgraph1 - end - end -``` diff --git a/documentation/onboarding.md b/documentation/onboarding.md deleted file mode 100644 index 105df24b2fa668c4e1a63678829a028da001aa1f..0000000000000000000000000000000000000000 --- a/documentation/onboarding.md +++ /dev/null @@ -1,50 +0,0 @@ -# Onboarding Diagram - -```mermaid - flowchart LR - subgraph AA["Authentication & Authorization"] - g-reg["Registration"] - end - - subgraph gaiax[Gaiax] - TSA["Trust Services API"] - subgraph ocm - AISBL - Services-->g-db - g-reg-->Services - Services-- Request -->AISBL - AISBL-- callback -->Services - end - g-db[(Database)] - end - - subgraph ayanworks[Ayanworks] - aAdmin((Admin)) - aAdmin-->g-reg - a-ocm["OCM Services"]-- Request -->a-afj - a-afj["AFJ"]-- callback -->a-ocm - a-ocm-->a-db[(Database)] - AISBL-- "Credential Issue v2" -->a-afj - a-TSA["Trust Service API"] - end - - subgraph vereign[Vereign] - vAdmin((Admin)) - vAdmin-->g-reg - v-ocm["OCM Services"]-- Request -->v-afj - v-afj["AFJ"]-- callback -->v-ocm - v-ocm-->v-db[(Database)] - AISBL-- "Credential Issue v2" -->v-afj - v-TSA["Trust Service API"] - end - - subgraph pcm[PCM] - p-afj["Mobile Aries Agent"]-- "Registration connection" -->AISBL - p-afj-- "Subscription Connection" -->v-afj - end - - subgraph Certifier - cAriesAgent["Aries Agent"]-- eIDAS VC -->a-afj - cAriesAgent["Aries Agent"]-- eIDAS VC -->v-afj - end -``` diff --git a/documentation/out-of-band-sequence.md b/documentation/out-of-band-sequence.md deleted file mode 100644 index dc001887fd9d52efce4c4e6361d01c7183a39832..0000000000000000000000000000000000000000 --- a/documentation/out-of-band-sequence.md +++ /dev/null @@ -1,16 +0,0 @@ -```mermaid -sequenceDiagram -participant PCM User -participant PCM App -participant OCM Admin -participant OCM Proof Manager - par - OCM Admin ->> OCM Proof Manager: Calls the POST method send-out-of-band-presentation-request, with either schemaId or credentialDefinitionId and required attributes. - OCM Proof Manager ->> OCM Admin: Sends the URL generated of proof presentation request - OCM Admin->> OCM Admin: Receives the URL and converts it to QR code and displays the same. - PCM App ->> OCM Admin: Scans the QR code for Out of Band Proof Presentation. - PCM User ->> PCM App: The User accepts to share the requested attributes of specified credential. - PCM App ->> OCM Proof Manager: Sends the requested attributes, if proof verification is successful it sets isVerified as true and state as done in the database. - OCM Admin ->> OCM Proof Manager: Calls Get method find-by-presentation-id API, against the presentation-id of proof request, and confirms the status of isVerified and state. - end -``` diff --git a/documentation/principal-credential-schema.md b/documentation/principal-credential-schema.md deleted file mode 100644 index 163eb5e4203970ff8d9111069fc66928c38d2116..0000000000000000000000000000000000000000 --- a/documentation/principal-credential-schema.md +++ /dev/null @@ -1,11 +0,0 @@ -## Principal Credential Schema - -This schema is used to issue VC to Principal User at the time of registration. This VC will indicate respective principal user is part of Gaiax ecosystem. This VC will also be used every time to make respective connection as Trusted via Proof Verification of this schemaID - -Following attributes should be in schema (case sensitive) - -``` - 1. email // principalUser email address - 2. issuerDID // issuer OCM organization public DID - 3. subjectDID // holder pairwise DID -``` diff --git a/documentation/principal-user-registration-sequence.md b/documentation/principal-user-registration-sequence.md deleted file mode 100644 index 7b03adebd55dded1d375b5779ce8a36422009255..0000000000000000000000000000000000000000 --- a/documentation/principal-user-registration-sequence.md +++ /dev/null @@ -1,37 +0,0 @@ -```mermaid -sequenceDiagram -participant Playstore/Appstore -participant PCM User -participant PCM App -participant OCM Notification Manager(Federation) -participant Mediator -participant OCM Admin -participant OCM Connection Manager -participant OCM Principal Manager -participant OCM Attestation Manager - - par - User Device->>Playstore/Appstore: Downloads PCM App - PCM User ->> PCM App: Enters email - PCM App ->>OCM Notification Manager(Federation): sends email Address to notification/sendOTP(), for OTP generation - OCM Notification Manager(Federation) ->> PCM User: Sends OTP to Email address provided - PCM User->>PCM App: Enters OTP - PCM App ->>OCM Notification Manager(Federation): Sends OTP to notification/verifyOTP() - OCM Notification Manager(Federation)->>PCM App: On successful verification, returns success - PCM User ->> PCM App: Enters Pin and Biometric - PCM App ->> PCM App: Create Wallet, show mnemonic - PCM User->>PCM App: copies and saves mnemonic - end - par - PCM App->> Mediator: Sends DIDComm Connection - Mediator->>PCM App: On successful connection sends connected - end - par - OCM Admin ->> OCM Connection Manager: Uses invitationURL(), to generate new Invitation URL with parameter 'alias = member' - OCM Admin ->> OCM Admin: Converts URL to QR, and displays - PCM App ->> OCM Admin: Scans the QR code, and the connection between PCM and OCM gets completed and active - OCM Connection Manager ->> OCM Principal Manager: Request for issuance of Principal credential - OCM Principal Manager ->> OCM Attestation Manager: Requests Attestation Manager with Principal Credential CredDef to issue credential based on CredDef - OCM Attestation Manager ->> PCM App: Issues Credential to the individual and the credential gets stored in PCM App's wallet - end -``` diff --git a/documentation/proof-verification-sequence.md b/documentation/proof-verification-sequence.md deleted file mode 100644 index 6869f6ff3a430ceb663a1211f1ca5f188f228b82..0000000000000000000000000000000000000000 --- a/documentation/proof-verification-sequence.md +++ /dev/null @@ -1,14 +0,0 @@ -```mermaid -sequenceDiagram -participant PCM User -participant PCM App -participant OCM Admin -participant OCM Proof Manager - par - OCM Admin ->> OCM Proof Manager: Calls the POST method send-presentation-request, against the connectionID, with either schemaId or credentialDefinitionId and required attributes. - OCM Proof Manager ->> PCM App: Sends the Proof Presentation Request. - PCM User ->> PCM App: The User accepts to share the requested attributes of specified credential. - PCM App ->> OCM Proof Manager: Sends the requested attributes, if proof verification is successful it sets isVerified as true and state as done in the database. - OCM Admin ->> OCM Proof Manager: Calls Get method find-by-presentation-id API, against the presentation-id of proof request, and confirms the status of isVerified and state. - end -``` diff --git a/documentation/subscription-sequence.md b/documentation/subscription-sequence.md deleted file mode 100644 index a91186931fd4a2bd7abba94b9532f74127fca2a3..0000000000000000000000000000000000000000 --- a/documentation/subscription-sequence.md +++ /dev/null @@ -1,20 +0,0 @@ -```mermaid -sequenceDiagram -participant PCM App -participant OCM Admin -participant OCM Connection Manager -participant OCM Connection Manager Db -participant OCM Principal Manager -participant OCM Proof Manager - - par - OCM Admin ->> OCM Connection Manager: Uses invitationURL(), to generate new Invitation URL with parameter 'alias = subscriber' - OCM Admin ->> OCM Admin: Converts URL to QR, and displays - PCM App ->> OCM Admin: Scans the QR code, and the connection between PCM and OCM gets completed and active - OCM Connection Manager ->> OCM Principal Manager: Requests for Proof Verification on Principal credential, to turn connection from active to trusted - OCM Principal Manager ->> OCM Proof Manager: Requests Proof Verification on sendMembershipProofRequest() on Principal Credential schema - OCM Proof Manager ->> PCM App: Requests for proof verification from PCM App - PCM App ->> OCM Proof Manager: Responds with Proof Request. - OCM Proof Manager ->> OCM Connection Manager Db: Changes the status of Connection to Trusted from Completed if proof verification is successful - end -``` diff --git a/package.json b/package.json index 9129008b62209bab1fca7745c091dd6b2dfc666b..e1694387404659d7e8032b3ed4f04dd0bf527f33 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,12 @@ { "name": "ocm-engine", - "author": "Vereign AG", + "author": "Gaia-X", + "contributors": [ + "Berend Sliedrecht <berend@animo.id>", + "Konstantin Tsabolov <konstantin.tsabolov@spherity.com>" + ], "private": true, "scripts": { - "prisma:generate": "pnpm -r prisma:generate", - "schema:build": "pnpm -F schema-manager build", - "credential:build": "pnpm -F credential-manager build", - "connection:build": "pnpm -F connection-manager build", - "principal:build": "pnpm -F principal-manager build", - "proof:build": "pnpm -F proof-manager build", - "ssi:build": "pnpm -F ssi-abstraction build", "lint": "eslint --fix", "lint:all": "pnpm lint -- .", "format": "prettier --write",