> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/platform/platform-services/consent-management/design.md).

# Design

This section specifies the design of the Consent Manager (CM). It is **API-first** — the contract is documented before any UI — and is organised so you can read it top to bottom.

| Page                                                                                                                                                   | What it covers                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| [Architecture](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/architecture.md)                                 | Components, the PDP/PEP model, registry integration, end-to-end sequence diagrams, information flow.                              |
| [Data model](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/data-model.md)                                     | Canonical entities and the JSON-LD documents — consent object, auth context, artefact, receipt — plus partner and policy records. |
| [Verification & enforcement](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/verification-and-enforcement.md)   | The **primary** flow: a partner embeds a signed consent object, the CM validates it and returns the effective fields.             |
| [Partner onboarding & policy](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/partner-onboarding-and-policy.md) | How partners are registered, how their keys and policies are managed, and how policy is evaluated.                                |
| [Consent lifecycle](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/consent-lifecycle.md)                       | The **secondary** flow: originating consent (request → authenticate → approve → artefact → receipt), revocation, and expiry.      |
| [Security & trust](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/security-and-trust.md)                       | Signing and key management, ID-token validation, replay protection, and the threat model.                                         |
| [Standards & best practices](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/design/standards-and-best-practices.md)   | Alignment with Kantara/ISO 27560, GDPR, DEPA/AA, and DCI/OIDC — and the gaps we deliberately close.                               |

The full HTTP contract lives under [API Reference](https://github.com/OpenG2P/openg2p-documentation/blob/latest/consent-management/api/README.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openg2p.org/platform/platform-services/consent-management/design.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
