Aries Agent Test Harness Enhancement Project

July 27, 2022

Current events IDLab services Industry news

Animo, Aries Agent Test Harness, Cloud, Hyperledger Aries, Interac, Verifiable Credentials

An IDLab project sponsored by Interac

What is Hyperledger Aries?

The Hyperledger Aries project is a set of open-source software components aimed at enabling the use of verifiable credentials (VCs). Hyperledger Aries Cloud Agent-Python (ACA-Py) is both the forerunner and reference implementation. However, it is not the only implementation. There are several implementations available and they are likely to continue to increase as VCs mature. 

The problem is, it is not a guarantee that implementations can talk to each other, even though they are meant to be compatible by design. The intended compatibility always needs to be thoroughly tested. Otherwise, as an example, a person with a VC through one implementation may not be able to use their VC with a verifier operating on another implementation. Herein lies the importance of testing, which is the focus of the Aries Agent Test Harness (AATH) Enhancement Project.

To enable interoperability in the Aries VC ecosystem, a number of standards are defined in the form of Request for Comments (RFC).  These RFCs are grouped into Aries Interop Profiles (AIP). These profiles, in turn, define which group of RFCs an agent has to conform to, in order to be labelled AIP compliant. While designs or implementations might conform on paper, when the implementation is put to the test of interacting with other implementations, it may not always work. This could be due to implementation bugs or inconsistent interpretations of the RFCs. Early detection of these gaps was, and continues to be required to help achieve general ecosystem interoperability.

Hence, the AATH Project was started in November 2019 as a simple agent proxy. However, it evolved to become a behavior-driven test framework, used regularly by community developers and integrators.

Now that several implementations of Aries RFCs exist, in multiple languages, the AATH enables various ways of testing them, from simple regression tests used by the Aries community developers, to the regularly published interoperability results.

Being able to easily test an Aries-compatible agent with the AATH allows for the early discovery of bugs, and more significantly, interoperability problems such as inconsistent interpretations of the RFCs, design or implementation choices. This is a boon to any development team and project.

The Aries Agent Test Harness enhancement project approach

Right now, two AIP profiles are defined: AIP 1.0 and 2.0. AIP v2.0 builds on the success of AIP v1.0 by introducing more robust and enhanced features. Once participants started implementing these new features into their agents, it became obvious that the AATH also needed to be enhanced to support the community; to root out any ambiguity from the RFCs; and to demonstrate those new capabilities across multiple implementations. However, support for AIP 2.0 was not fully implemented into the AATH.

This is where the IDLab, supported by Interac, saw a need to help the community by enhancing the AATH from the AIP 2.0 point of view.

At this stage of the AATH Enhancement Project, two factors helped define its broad content:

  • The gap between AIP 2.0 constituent RFCs and the current implementation of the AATH tests
  • Requirements from Interac with respect to AIP 2.0

This content was essentially expressed in terms of Aries RFCs and protocols, which were only partially tested, or not tested at all, or for which a reference implementation may not exist yet.

Discussion with the Aries community experts, and the agreed-upon duration of the project narrowed down the feature set to define the planned project content. Experts from the Animo company were brought in to implement the project.

Lessons learned

The implementation of the AATH Enhancement Project went mostly as planned. However, digging into the code led to a few important realisations.

The AATH project might not seem that big, with about 13,000 lines of code. However, its complexity lies in its architecture and that it aims to launch and verify real digital ID use cases with real agent and mobile wallet interactions. Hence, it exercises a lot more code than 13,000 lines, because of the combinatorial explosion of testing seven implementations – and counting –  against each other. This is multiplied by the increasing complexity of test cases and available protocols.

Thus, adding and complementing features required settling some technical debts, not only to streamline the implementation of the project at hand, but for future implementers as well. In other words, some work was required to make sure that adding more test cases will not exponentially increase the complexity.

Moreover, some AIP 2.0 tests were not implemented, for a good reason: corresponding features were missing from most agents’ implementations. Therefore, the scope of the project codebase had to be extended outside of the AATH to encompass at least ACA-Py and Aries Framework JavaScript, which is the JavaScript counterpart of ACA-Py. For other Aries agent implementations that could not be directly enhanced, issues were recorded so that the community could pick up relevant features.

Technical expertise had to be sought with the Aries architects and maintainers within the community, because some implementations were deviating, or even contradicting some RFCs. Corrections had to be implemented either in the code, or the RFCs themselves when they did not match the actual reality of implementations.

Next steps 

This project was praised by the community because it made great advances for AIP 2.0 implementations, but the full implementation of AIP 2.0 is not complete yet. Advancements in AIP 2.0 will necessarily inform future improvement projects for the AATH.

Another feature gap that was underlined during the project review was mobile wallet testing. As digital identity adoption is growing, particularly in Canada, mobile wallets – also called mobile agents – are increasingly coming into focus. VCs for organisations and people cannot function without access to digital wallets, either on smart devices or computers. Right now, a small portion of the AATH is devoted to mobile device testing, which certainly could be improved.

That's what they say ;-)

“At Desjardins Group, we firmly believe that digital identity is of great importance to our members and clients. That’s why we’re proud to partner with Canada’s Digital Identity Lab, a key player committed to finding secure solutions that work together harmoniously so we can build a strong digital identity framework for all Canadians, businesses and governments.”

Mathieu Desrosiers, Director, Everyday Banking, Payments and Digital Identity at Desjardins Group