ACA-Py (Adaptive Cloud Agent - Python)

repository·main·Indexed 19 days ago

https://github.com/openwallet-foundation/acapy

A production-ready SSI agent and protocol engine for building decentralized identity applications, such as credential issuers, holders, and verifiers, in non-mobile environments. Version 1.6.1 supports custom protocol implementations via plugins, multi-tenancy with OAuth2 resource server integration (e.g., Keycloak), and managed wallet configurations.

Tokens
113K
Snippets
257
Records
488
Agent score
63%

What's inside ACA-Py

  1. Overview of ACA-Py (Adaptive Cloud Agent - Python)

    main

    ACA-Py is a production-ready, open-source self-sovereign identity (SSI) agent designed for non-mobile decentralized trust services. It is used to build verifiable credential (VC) issuers, holders, and verifiers.

    Key Characteristics:

    • Deployment: Runs on servers (cloud, enterprise, IoT) and is not intended for mobile devices.
    • Integration Model: You build a business logic "controller" in any language that communicates with ACA-Py via HTTP requests and receives webhook notifications. You do not need to know Python to use it.
    • Protocol Support: Supports Aries Interop Profile (AIP) 2.0, including protocols for issuing, verifying, and holding credentials.
    • Credential Formats: Supports [AnonCreds] and the [W3C Standard Verifiable Credential Data Model] (using JSON-LD with Data Integrity Proofs and BBS+ Signatures).
  2. Understand the WebVH and AnonCreds Workshop

    main

    This workshop provides a hands-on guide to issuing, receiving, holding, requesting, presenting, and verifying AnonCreds Verifiable Credentials using the WebVH (Web Verifiable History) DID method.

    It is structured into two parts:

    1. WebVH Basics: A non-technical sequence of labs covering the credential lifecycle.
    2. OpenAPI (Swagger) Integration: A technical track for automating credential issuance and verification using REST APIs.

    Important Sandbox Warning: If using the provided Traction Sandbox, note that the environment is reset on the 1st and 15th of each month, and all work will be deleted. Always save your Wallet ID and Wallet Key securely in a password manager, as they cannot be recovered.

  3. Miscellaneous ACA-Py Features

    main

    ACA-Py includes several advanced features:

    • Plugins: A growing set of extensions for various functionalities.
    • Multi-Tenancy: Supports multiple tenants. For management, see the Multi-tenant Documentation or use Traction for an Administrative/Tenant UI.
    • SD-JWTs: Supports signing and verifying SD-JWTs.
    • Persistence of Mediated Messages: Supports persistent queues using Redis or Kafka via plugins. Without these, messages are stored in an in-memory queue (subject to loss on sudden termination).
    • Connection-less Protocols:
      • AIP 1.0: Supported for issue credential and present proof.
      • AIP 2.0 (OOB): Supported for present proof.
    • Multi Indy Ledger Support: Automatic detection of multiple ledgers.
  4. Locate ACA-Py documentation sources

    main

    ACA-Py documentation is split into two main sources:

    1. ACA-Py User Documentation: Hosted at aca-py.org. This is the primary site for end-users.
    2. ACA-Py Source Code Internals: Hosted on ReadTheDocs at https://aries-cloud-agent-python.readthedocs.io. This contains technical documentation for the source code internals.

    To update the ReadTheDocs documentation, refer to the UpdateRTD.md file in this repository.

  5. What is Multi-Tenancy in ACA-Py?

    main

    ACA-Py supports multi-tenant scenarios where a single, scalable instance of ACA-Py and one database instance can manage separate secure storage (private keys, DIDs, credentials, etc.) for many different actors.

    Use Cases:

    • Issuer-as-a-Service: An enterprise hosting multiple VC issuers, each with unique identifiers, on one ACA-Py instance.
    • Cloud Wallets: Providing a wallet service for many holders (people or organizations) who cannot use mobile devices.
  6. What is Kanon Storage?

    main

    Kanon Storage is a normalized data storage approach for ACA-Py that complements the existing Askar Aries solution. While Askar handles field-level encryption and secure storage, Kanon Storage is designed for large-scale, server-side deployments by providing support for enterprise-grade database providers (like PostgreSQL) and cloud-native encryption.

    Key characteristics include:

    • Hybrid Architecture: Works alongside Askar; the kanon-anoncreds profile uses Askar for Key Management only.
    • Database Flexibility: Supports multiple providers and leverages vendor-provided encryption (at rest and field-level).
    • WQL Support: Uses an enhanced Wallet Query Language (WQL) to translate JSON queries into database-specific statements for Generic (key-value), Document (e.g., MongoDB), or Normalized table structures.
    • Schema Management: Supports 'Normalized' (linked to specific schema files for tables/indexes) and 'Generic' (key-value pair) configurations.
  7. What is ACA-Py and what does an agent do?

    main

    ACA-Py (Adaptive Cloud Agent - Python) is an interoperable toolkit for creating, transmitting, and storing verifiable digital credentials. It provides infrastructure for decentralized, peer-to-peer interactions, including secure storage, key management, and communication protocols.

    An ACA-Py agent performs the following core functions:

    • Connection Establishment: Enables connections with other DIDComm-based agents using DIDComm encryption envelopes.
    • Message Exchange: Executes message protocols between connected agents using DIDComm and other supported protocols.
    • Event Notification: Sends notifications regarding protocol events to a controller.
    • API Exposure: Provides an API that allows a controller to respond to and direct the handling of protocol events.
  8. What is WebVH (Web Verifiable History)?

    main

    WebVH is a DID method that allows issuers to publish AnonCreds objects (such as schemas, credential definitions, and revocation registries) as Attested Resources on a web server.

    Unlike blockchain-based ledgers, WebVH uses HTTP-based resolution. It maintains cryptographic integrity through digital signatures (Data Integrity Proofs) and uses witness services for attestation instead of blockchain consensus. This makes it easier to deploy on standard web infrastructure while preserving the privacy features of the AnonCreds protocol.

  9. What is a Mediator Service in ACA-Py?

    main

    ACA-Py can be configured as a DIDComm mediator. In this role, the agent receives, stores, and forwards messages to DIDComm agents that lack an addressable Internet endpoint (such as mobile wallets).

    Startup options allow ACA-Py to coordinate its mediation role using core DIDComm protocols.

  10. How to use ACA-Py with a custom controller

    main

    To build a solution with ACA-Py, you implement a business logic "controller". The controller interacts with the ACA-Py instance using a request/response pattern:

    1. Outgoing: The controller sends HTTP requests to ACA-Py to trigger actions.
    2. Incoming: ACA-Py sends webhook notifications to the controller to report status changes or events.

    This abstraction allows developers to focus on high-level business logic using standard web technologies instead of low-level cryptography or Trust over IP protocols.

  11. How mediation and DIDComm message forwarding work

    main

    Mediation allows an agent to receive messages indirectly via a third party. This is useful for clients that are not always online or are behind firewalls.

    Key Concepts

    • Mediator: An agent that forwards messages to a client over a DIDComm connection.
    • Mediation Client (or Mediated Agent): The agent(s) that the mediator is configured to forward messages to.
    • DIDComm Message Forwarding: Messages are encrypted once for the final recipient, then wrapped in a 'forward message' encrypted specifically for the mediator.
    • Mediation Request: A message from a client to a mediator requesting that it start forwarding messages.
    • Keylist: A list of public keys maintained by the mediated agent and shared with the mediator. The mediator uses this list to determine which connection a forward message should be sent to.
    • Mediation Connection: The connection between the mediator and the mediated agent. Requests for mediation are handled on a per-connection basis.
    • Default Mediator: A specific mediator that is automatically used for every newly created DIDComm connection if no other mediator is specified.