Skip to content

Commit

Permalink
style: apply megalinter fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
  • Loading branch information
yshyn-iohk committed May 7, 2024
1 parent f0616b1 commit 9cac565
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion docs/docusaurus/credentials/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To do this, make a `POST` request to the [`/issue-credentials/credential-offers`
The Cloud Agent must be able to dereference the specified URL (i.e. fetch the VC schema content from it), in order to validate the provided claims against it.
When not specified, the claims fields is not validated and can be any valid JSON object.
Please refer to the [Create VC schema](../schemas/create.md) doc for details on how to create a VC schema.
5. `credentialFormat`: The format of the credential that will be issued - `JWT` in this case. When not specified, the default value is `JWT`.
5. `credentialFormat`: The format of the credential that will be issued - `JWT` in this case. When not specified, the default value is `JWT`.


:::note
Expand Down
26 changes: 13 additions & 13 deletions docs/docusaurus/credentials/present-proof.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The protocol provides endpoints for a Verifier to request new proof presentation

The present proof protocol has two roles:

1. Verifier: A subject requesting a proof presentation by sending a request presentation message, then verifying the presentation.
2. Holder/Prover: A [subject](/docs/concepts/glossary#subject) that receives a [proof presentation](/docs/concepts/glossary#proof-presentation) request, prepares a proof, and sends it to the verifier by sending a proof presentation message.
1. Verifier: A subject requesting a proof presentation by sending a request presentation message, then verifying the presentation.
2. Holder/Prover: A [subject](/docs/concepts/glossary#subject) that receives a [proof presentation](/docs/concepts/glossary#proof-presentation) request, prepares a proof, and sends it to the verifier by sending a proof presentation message.

## Prerequisites

Expand All @@ -37,12 +37,12 @@ The protocol consists of the following main parts:

## Endpoints

| Endpoint | Method | Description | Role |
| --- | --- | --- | --- |
| [`/present-proof/presentations`](/agent-api/#tag/Present-Proof/operation/requestPresentation) | POST | Creates and sends a new proof presentation request. | Verifier |
| [`/present-proof/presentations`](/agent-api/#tag/Present-Proof/operation/getAllPresentation) | GET | Retrieves the collection of all the existing presentation proof records - sent or received. | Verifier, Holder/Prover |
| [`/present-proof/presentations/{id}`](/agent-api/#tag/Present-Proof/operation/getPresentation) | GET | Retrieves a specific presentation proof record by `id`. | Verifier, Holder/Prover |
| [`/present-proof/presentations/{id}`](/agent-api/#tag/Present-Proof/operation/updatePresentation) | PATCH | Updates an existing presentation proof record to, e.g., accept the request on the Holder/Prover side or accept the presentation on the Verifier side. | Verifier, Holder/Prover |
| Endpoint | Method | Description | Role |
|---------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|
| [`/present-proof/presentations`](/agent-api/#tag/Present-Proof/operation/requestPresentation) | POST | Creates and sends a new proof presentation request. | Verifier |
| [`/present-proof/presentations`](/agent-api/#tag/Present-Proof/operation/getAllPresentation) | GET | Retrieves the collection of all the existing presentation proof records - sent or received. | Verifier, Holder/Prover |
| [`/present-proof/presentations/{id}`](/agent-api/#tag/Present-Proof/operation/getPresentation) | GET | Retrieves a specific presentation proof record by `id`. | Verifier, Holder/Prover |
| [`/present-proof/presentations/{id}`](/agent-api/#tag/Present-Proof/operation/updatePresentation) | PATCH | Updates an existing presentation proof record to, e.g., accept the request on the Holder/Prover side or accept the presentation on the Verifier side. | Verifier, Holder/Prover |

:::info
For more detailed information, please, check the full [Cloud Agent API](/agent-api).
Expand All @@ -67,7 +67,7 @@ To do this, he makes a `POST` request to the [`/present-proof/presentations`](/a
curl -X 'POST' 'http://localhost:8070/cloud-agent/present-proof/presentations' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "apikey: $API_KEY" \
-H "apikey: $API_KEY" \
-d '{
"connectionId": "872ddfa9-4115-46c2-8a1b-22c24c7431d7",
"proofs":[],
Expand All @@ -85,7 +85,7 @@ curl -X 'POST' 'http://localhost:8070/cloud-agent/present-proof/presentations' \
curl -X 'POST' 'http://localhost:8070/cloud-agent/present-proof/presentations' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "apikey: $API_KEY" \
-H "apikey: $API_KEY" \
-d '{
"connectionId": "872ddfa9-4115-46c2-8a1b-22c24c7431d7",
"anoncredPresentationRequest": {
Expand Down Expand Up @@ -134,7 +134,7 @@ The Verifier can retrieve the list of presentation records by making a `GET` req
```bash
curl -X 'GET' 'http://localhost:8070/cloud-agent/present-proof/presentations' \
-H 'accept: application/json' \
-H "apikey: $API_KEY"
-H "apikey: $API_KEY"
```

### Accept presentation proof received from the Holder/prover
Expand Down Expand Up @@ -224,7 +224,7 @@ curl -X 'PATCH' 'http://localhost:8090/cloud-agent/present-proof/presentations/{
The Holder/Prover will have to provide the following information:
1. `presentationId`: The unique identifier of the presentation record to accept.
2. `anoncredPresentationRequest`: A list of credential unique identifier with the attribute and predicate the credential is answering for.

The record state is updated to `PresentationPending` and processed by the Holder/Prover Cloud Agent. The agent will automatically generate the proof presentation, change the state to `PresentationGenerated`, and will eventually send it to the Verifier Agent, and change the state to `PresentationSent`.

```mermaid
Expand All @@ -240,7 +240,7 @@ stateDiagram-v2

## Sequence diagram

The following diagram shows the end-to-end flow for a verifier to request and verify a proof presentation from a Holder/prover.
The following diagram shows the end-to-end flow for a verifier to request and verify a proof presentation from a Holder/prover.

### JWT Present Proof Flow Diagram
![](present-proof-flow.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/credentials/revocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Status list credential integrity can be verified using the embedded proof of typ

## Revocation

Only issuers of a credential can revoke a credential.
Only issuers of a credential can revoke a credential.

*Get the list of credentials*
```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Throughout all code examples in tutorials, the following conventions are in use:
```shell
export API_KEY=<API Key value>
```
Alternatively, replace `$API_KEY` with your key in the CURL commands supplied throughout this tutorial. :::
Alternatively, replace `$API_KEY` with your key in the CURL commands supplied throughout this tutorial. :::


12 changes: 6 additions & 6 deletions docs/docusaurus/multitenancy/admin-authz-ext-iam.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ Despite UMA permissions configured for the user, the agent strictly maintains a
## Endpoints

### Agent endpoints
| Endpoint | Description | Role |
|--------------------------------------------|-------------------------------------|---------------|
| `GET /wallets` | List the wallets on the Cloud Agent | Administrator |
| Endpoint | Description | Role |
|----------------|-------------------------------------|---------------|
| `GET /wallets` | List the wallets on the Cloud Agent | Administrator |

### Keycloak endpoints
| Endpoint | Description | Role |
|------------------------------------------------------|-------------------------------|--------------|
| `POST /realms/{realm}/protocol/openid-connect/token` | Issue a new JWT token | Administrator|
| Endpoint | Description | Role |
|------------------------------------------------------|-----------------------|---------------|
| `POST /realms/{realm}/protocol/openid-connect/token` | Issue a new JWT token | Administrator |

## Keycloak Administrator interactions

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/schemas/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ For the above fields, the JSON Schema definition must be:
The fields `$id` and `$schema` must correspond values that describe

- the identity of the given JSON Schema as a **correctly formatted URL** `https://example.com/driving-license-1.0.0` and
- the meta schema fixed to `https://json-schema.org/draft/2020-12/schema` which is the only supported value
- the meta schema fixed to `https://json-schema.org/draft/2020-12/schema` which is the only supported value

All the claims are listed under the `properties` object with corresponding `type`s and `format`s according to JSON
Specification.
Expand Down
4 changes: 2 additions & 2 deletions docs/docusaurus/schemas/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ The JSON Schema changes must be defined as follows:
2. In the client, create a new PUT request to the `/cloud-agent/schema-registry/schemas/{id}` endpoint, where `id` is a
locally unique credential schema id, formatted as a URL.

Note that the value of the `author` field must match the short form of a PRISM DID that has been created using the same agent. An unpublished DID is sufficient. Please refer to the [Create DID](../dids/create.md) documentation page for more details on how to create a PRISM DID.
Note that the value of the `author` field must match the short form of a PRISM DID that has been created using the same agent. An unpublished DID is sufficient. Please refer to the [Create DID](../dids/create.md) documentation page for more details on how to create a PRISM DID.

In the request body, create a JSON object:

```json
{
"name": "driving-license",
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/local/run-e2e-tests-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "--------------------------------------"
echo "Starting multitenant using local/run.sh"
echo "--------------------------------------"

${SCRIPT_DIR}/run.sh -p 8080 -n multitenant -w
"${SCRIPT_DIR}"/run.sh -p 8080 -n multitenant -w

export AGENT_AUTH_REQUIRED=true
export AGENT_AUTH_HEADER=apikey
Expand Down Expand Up @@ -47,6 +47,6 @@ curl --location 'http://localhost:8080/cloud-agent/events/webhooks' \
}'

(
cd ${SCRIPT_DIR}/../../tests/integration-tests/
cd "${SCRIPT_DIR}"/../../tests/integration-tests/
./gradlew test reports
)
8 changes: 4 additions & 4 deletions infrastructure/multi/run-e2e-tests-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ echo "--------------------------------------"
echo "Starting issuer using local/run.sh"
echo "--------------------------------------"

${SCRIPT_DIR}/../local/run.sh -p 8080 -n issuer -w
"${SCRIPT_DIR}"/../local/run.sh -p 8080 -n issuer -w

echo "--------------------------------------"
echo "Starting holder using local/run.sh"
echo "--------------------------------------"

${SCRIPT_DIR}/../local/run.sh -p 8090 -n holder -w
"${SCRIPT_DIR}"/../local/run.sh -p 8090 -n holder -w

echo "--------------------------------------"
echo "Starting verifier using local/run.sh"
echo "--------------------------------------"

${SCRIPT_DIR}/../local/run.sh -p 8100 -n verifier -w
"${SCRIPT_DIR}"/../local/run.sh -p 8100 -n verifier -w

echo "--------------------------------------"
echo "Run e2e tests"
echo "--------------------------------------"

(
cd ${SCRIPT_DIR}/../../tests/integration-tests/
cd "${SCRIPT_DIR}"/../../tests/integration-tests/
./gradlew test reports
)
8 changes: 4 additions & 4 deletions infrastructure/multi/run-e2e-tests-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ echo "--------------------------------------"
echo "Run e2e tests"
echo "--------------------------------------"

export ACME_AGENT_URL=https://agent-df56h.atalaprism.io/prism-agent
export BOB_AGENT_URL=https://agent-kj46b.atalaprism.io/prism-agent
export MALLORY_AGENT_URL=https://agent-sd98k.atalaprism.io/prism-agent
export ACME_AGENT_URL=https://agent-df56h.atalaprism.io/cloud-agent
export BOB_AGENT_URL=https://agent-kj46b.atalaprism.io/cloud-agent
export MALLORY_AGENT_URL=https://agent-sd98k.atalaprism.io/cloud-agent

(cd ${SCRIPT_DIR}/../../tests/e2e-tests/; AGENT_AUTH_REQUIRED=true ./gradlew test reports)
(cd "${SCRIPT_DIR}"/../../tests/e2e-tests/; AGENT_AUTH_REQUIRED=true ./gradlew test reports)
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ echo "--------------------------------------"
echo "Starting stack using docker compose"
echo "--------------------------------------"

PORT=${PORT} docker compose -f ${SCRIPT_DIR}/docker-compose.yml \
--env-file ${ENV_FILE} up -d --wait
PORT=${PORT} docker compose -f "${SCRIPT_DIR}"/docker-compose.yml \
--env-file "${ENV_FILE}" up -d --wait

export AGENT_AUTH_REQUIRED=true
export ACME_AGENT_URL=http://localhost:${PORT}/issuer/cloud-agent
Expand All @@ -27,6 +27,6 @@ export FABER_AGENT_URL=http://localhost:${PORT}/holder/cloud-agent
export FABER_AUTH_KEY=default

(
cd ${SCRIPT_DIR}/../../tests/e2e-tests/
cd "${SCRIPT_DIR}"/../../tests/e2e-tests/
./gradlew test reports
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ echo "--------------------------------------"
echo "Starting stack using docker compose"
echo "--------------------------------------"

PORT=${PORT} docker compose -f ${SCRIPT_DIR}/docker-compose.yml \
--env-file ${ENV_FILE} up -d --wait
PORT=${PORT} docker compose -f "${SCRIPT_DIR}"/docker-compose.yml \
--env-file "${ENV_FILE}" up -d --wait

export ISSUER_AGENT_URL=http://localhost:${PORT}/issuer/cloud-agent
export ISSUER_AGENT_API_KEY=default
Expand All @@ -28,17 +28,17 @@ echo "Run perf tests"
echo "--------------------------------------"

(
export K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write
export K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
cd ${SCRIPT_DIR}/../../tests/performance-tests/agent-performance-tests-k6
yarn install
yarn webpack
k6 run -e SCENARIO_LABEL=st-create-prism-did-smoke dist/create-prism-did-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-offer-smoke dist/credential-offer-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-definition-smoke dist/credential-definition-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-schema-smoke dist/credential-schema-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-did-publishing-smoke dist/did-publishing-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-connection-flow-smoke dist/connection-flow-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-issuance-flow-smoke dist/issuance-flow-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-present-proof-flow-smoke dist/present-proof-flow-test.js -o experimental-prometheus-rw
export K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write
export K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
cd "${SCRIPT_DIR}"/../../tests/performance-tests/agent-performance-tests-k6
yarn install
yarn webpack
k6 run -e SCENARIO_LABEL=st-create-prism-did-smoke dist/create-prism-did-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-offer-smoke dist/credential-offer-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-definition-smoke dist/credential-definition-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-credential-schema-smoke dist/credential-schema-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-did-publishing-smoke dist/did-publishing-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-connection-flow-smoke dist/connection-flow-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-issuance-flow-smoke dist/issuance-flow-test.js -o experimental-prometheus-rw
k6 run -e SCENARIO_LABEL=st-present-proof-flow-smoke dist/present-proof-flow-test.js -o experimental-prometheus-rw
)

0 comments on commit 9cac565

Please sign in to comment.