Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Enable ARM-based ACA-Py artifacts by default by removing BBS+ Signatures as a default inclusion #3127

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ RUN curl -sSL https://install.python-poetry.org | python3 - \

COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false \
&& poetry install --no-root --no-interaction --all-extras \
&& poetry install --no-root --no-interaction -E "askar didcommv2" \
&& rm -rf /root/.cache/pypoetry
2 changes: 1 addition & 1 deletion .github/actions/run-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
TEST_SCOPE:
description: "Set of flags that defines the test scope"
required: false
default: "-t @PR"
default: "-t @PR -t ~@BBS"
IN_LEDGER_URL:
description: "URL to the von network ledger browser"
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
if: (steps.check_if_release.outputs.is_release == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
uses: ./.github/actions/run-integration-tests
with:
TEST_SCOPE: "-t @Release"
TEST_SCOPE: "-t @Release -t ~@BBS"
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
platforms: ${{ env.PLATFORMS }}

- name: Build and Push extended Image to ghcr.io
uses: docker/build-push-action@v5
with:
push: true
context: .
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: main
build-args: |
python_version=${{ matrix.python-version }}
acapy_name=aries-cloudagent-bbs
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
acapy_reqs=[askar,bbs,didcommv2]
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
platforms: ${{ env.PLATFORMS }}

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down
182 changes: 131 additions & 51 deletions demo/features/0453-issue-credential.feature

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions demo/features/0454-present-proof.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,25 @@ Feature: RFC 0454 Aries agent present proof
| Faber | verifier | <Acme_capabilities> |
| Bob | prover | <Bob_capabilities> |
And "<issuer>" and "Bob" have an existing connection
And "Bob" has an issued json-ld <Schema_name> credential <Credential_data> from "<issuer>"
And "Bob" has an issued json-ld <Schema_name> credential <Credential_data> from "<issuer>" with <Key_type> and <Sig_type>
And "Faber" and "Bob" have an existing connection
When "Faber" sends a request for json-ld proof presentation <Proof_request> to "Bob"
When "Faber" sends a request for json-ld proof presentation <Proof_request> to "Bob" with <Sig_type>
Then "Faber" has the proof verified

@PR @Release @WalletType_Askar
@PR @Release @WalletType_Askar @BBS
Examples:
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request |
| Acme | --public-did --cred-type json-ld | | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 |
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request | Key_type | Sig_type |
| Acme | --public-did --cred-type json-ld | | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 | bls12381g2 | BbsBlsSignature2020 |

@Release @WalletType_Askar
@Release @WalletType_Askar @BBS
Examples:
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request |
| Faber | --public-did --cred-type json-ld --did-exchange | --did-exchange | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 |
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request | Key_type | Sig_type |
| Faber | --public-did --cred-type json-ld --did-exchange | --did-exchange | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 | bls12381g2 | BbsBlsSignature2020 |

@PR @Release @WalletType_Askar_AnonCreds
@PR @Release @WalletType_Askar_AnonCreds @BBS
Examples:
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request |
| Faber | --public-did --cred-type json-ld --wallet-type askar-anoncreds | --wallet-type askar-anoncreds | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 |
| issuer | Acme_capabilities | Bob_capabilities | Schema_name | Credential_data | Proof_request | Key_type | Sig_type |
| Faber | --public-did --cred-type json-ld --wallet-type askar-anoncreds | --wallet-type askar-anoncreds | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 | bls12381g2 | BbsBlsSignature2020 |


@T002-RFC0454
Expand Down
49 changes: 24 additions & 25 deletions demo/features/steps/0453-issue-credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from behave import given, then, when
from runners.support.agent import (
DID_METHOD_KEY,
KEY_TYPE_BLS,
SIG_TYPE_BLS,
)


Expand Down Expand Up @@ -352,12 +350,12 @@ def step_impl(context, holder):
assert False


@given('"{issuer}" is ready to issue a json-ld credential for {schema_name}')
def step_impl(context, issuer, schema_name):
@given('"{issuer}" is ready to issue a json-ld credential for {schema_name} with {key_type}')
def step_impl(context, issuer, schema_name, key_type):
# create a "did:key" to use as issuer
agent = context.active_agents[issuer]

data = {"method": DID_METHOD_KEY, "options": {"key_type": KEY_TYPE_BLS}}
data = {"method": DID_METHOD_KEY, "options": {"key_type": key_type}}
new_did = agent_container_POST(
agent["agent"],
"/wallet/did/create",
Expand All @@ -368,12 +366,12 @@ def step_impl(context, issuer, schema_name):
pass


@given('"{holder}" is ready to receive a json-ld credential')
def step_impl(context, holder):
@given('"{holder}" is ready to receive a json-ld credential with {key_type}')
def step_impl(context, holder, key_type):
# create a "did:key" to use as holder identity
agent = context.active_agents[holder]

data = {"method": DID_METHOD_KEY, "options": {"key_type": KEY_TYPE_BLS}}
data = {"method": DID_METHOD_KEY, "options": {"key_type": key_type}}
new_did = agent_container_POST(
agent["agent"],
"/wallet/did/create",
Expand All @@ -385,8 +383,8 @@ def step_impl(context, holder):
pass


@when('"{issuer}" offers "{holder}" a json-ld credential with data {credential_data}')
def step_impl(context, issuer, holder, credential_data):
@when('"{issuer}" offers "{holder}" a json-ld credential with data {credential_data} and {sig_type}')
def step_impl(context, issuer, holder, credential_data, sig_type):
# initiate a cred exchange with a json-ld credential
agent = context.active_agents[issuer]
holder_agent = context.active_agents[holder]
Expand Down Expand Up @@ -418,7 +416,7 @@ def step_impl(context, issuer, holder, credential_data):
"birthDate": "1958-07-17",
},
},
"options": {"proofType": SIG_TYPE_BLS},
"options": {"proofType": sig_type},
}
},
}
Expand All @@ -434,9 +432,9 @@ def step_impl(context, issuer, holder, credential_data):


@when(
'"{issuer}" offers and deletes "{holder}" a json-ld credential with data {credential_data}'
'"{issuer}" offers and deletes "{holder}" a json-ld credential with data {credential_data} and {sig_type}'
)
def step_impl(context, issuer, holder, credential_data):
def step_impl(context, issuer, holder, credential_data, sig_type):
# initiate a cred exchange with a json-ld credential
agent = context.active_agents[issuer]
holder_agent = context.active_agents[holder]
Expand Down Expand Up @@ -481,7 +479,7 @@ def step_impl(context, issuer, holder, credential_data):
"birthDate": "1958-07-17",
},
},
"options": {"proofType": SIG_TYPE_BLS},
"options": {"proofType": sig_type},
}
},
}
Expand Down Expand Up @@ -531,9 +529,9 @@ def step_impl(context, issuer):


@when(
'"{holder}" requests a json-ld credential with data {credential_data} from "{issuer}"'
'"{holder}" requests a json-ld credential with data {credential_data} from "{issuer}" with {sig_type}'
)
def step_impl(context, issuer, holder, credential_data):
def step_impl(context, issuer, holder, credential_data, sig_type):
issuer_agent = context.active_agents[issuer]
holder_agent = context.active_agents[holder]
data = {
Expand Down Expand Up @@ -564,7 +562,7 @@ def step_impl(context, issuer, holder, credential_data):
"birthDate": "1958-07-17",
},
},
"options": {"proofType": SIG_TYPE_BLS},
"options": {"proofType": sig_type},
}
},
}
Expand All @@ -578,9 +576,9 @@ def step_impl(context, issuer, holder, credential_data):


@when(
'"{issuer}" offers "{holder}" an anoncreds credential with data {credential_data}'
'"{issuer}" offers "{holder}" an anoncreds credential with data {credential_data} with {sig_type}'
)
def step_impl(context, issuer, holder, credential_data):
def step_impl(context, issuer, holder, credential_data, sig_type):
# initiate a cred exchange with an anoncreds credential
agent = context.active_agents[issuer]
holder_agent = context.active_agents[holder]
Expand Down Expand Up @@ -612,7 +610,7 @@ def step_impl(context, issuer, holder, credential_data):
"birthDate": "1958-07-17",
},
},
"options": {"proofType": SIG_TYPE_BLS},
"options": {"proofType": sig_type},
}
},
}
Expand Down Expand Up @@ -646,26 +644,27 @@ def step_impl(context, holder):


@given(
'"{holder}" has an issued json-ld {schema_name} credential {credential_data} from "{issuer}"'
'"{holder}" has an issued json-ld {schema_name} credential {credential_data} from "{issuer}" with {key_type} and {sig_type}'
)
def step_impl(context, holder, schema_name, credential_data, issuer):
def step_impl(context, holder, schema_name, credential_data, issuer, key_type, sig_type):
context.execute_steps(
'''
Given "'''
+ issuer
+ """" is ready to issue a json-ld credential for """
+ schema_name
+ schema_name + " with " + key_type
+ '''
And "'''
+ holder
+ """" is ready to receive a json-ld credential """
+ """" is ready to receive a json-ld credential with """
+ key_type
+ '''
When "'''
+ issuer
+ '''" offers "'''
+ holder
+ """" a json-ld credential with data """
+ credential_data
+ credential_data + " and " + sig_type
+ '''
Then "'''
+ holder
Expand Down
23 changes: 4 additions & 19 deletions demo/features/steps/0454-present-proof.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
from behave import given, when, then
import json
from time import sleep
import time
from behave import when, then

from bdd_support.agent_backchannel_client import (
read_proof_req_data,
read_presentation_data,
aries_container_request_proof,
aries_container_verify_proof,
agent_container_POST,
async_sleep,
)
from runners.agent_container import AgentContainer
from runners.support.agent import (
CRED_FORMAT_INDY,
CRED_FORMAT_JSON_LD,
DID_METHOD_SOV,
DID_METHOD_KEY,
KEY_TYPE_ED255,
KEY_TYPE_BLS,
SIG_TYPE_BLS,
)


# This step is defined in another feature file
# Given "Acme" and "Bob" have an existing connection
Expand Down Expand Up @@ -105,9 +90,9 @@ def step_impl(context, verifier):


@when(
'"{verifier}" sends a request for json-ld proof presentation {request_for_proof} to "{prover}"'
'"{verifier}" sends a request for json-ld proof presentation {request_for_proof} to "{prover}" with {sig_type}'
)
def step_impl(context, verifier, request_for_proof, prover):
def step_impl(context, verifier, request_for_proof, prover, sig_type):
agent = context.active_agents[verifier]
prover_agent = context.active_agents[prover]

Expand All @@ -122,7 +107,7 @@ def step_impl(context, verifier, request_for_proof, prover):
},
"presentation_definition": {
"id": "32f54163-7166-48f1-93d8-ff217bdb0654",
"format": {"ldp_vp": {"proof_type": [SIG_TYPE_BLS]}},
"format": {"ldp_vp": {"proof_type": [sig_type]}},
"input_descriptors": [
{
"id": "citizenship_input_1",
Expand Down
Loading
Loading