Skip to content

Added Architecture & Data model.#7

Closed
croadfeldt wants to merge 49 commits into
dcm-project:mainfrom
croadfeldt:main
Closed

Added Architecture & Data model.#7
croadfeldt wants to merge 49 commits into
dcm-project:mainfrom
croadfeldt:main

Conversation

@croadfeldt
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @croadfeldt, your pull request is larger than the review limit of 150000 diff characters

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…, layers, sovereignty controls.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…e model, posture groups, compliance domain groups

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…ability.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…h level, concurrent rehydration, discovered state retention.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
… deployment bootstrap info.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…alidat, policy review, governance, grouping, relationship role validation, information providers.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…tion, commit log capacity, system initiated records, distributed hash chains.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…on metadata, operational analysis.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…nty pre-filter, audit provenance, universal groups, information providers.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
@@ -0,0 +1,645 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly that this is suppose to be an k8s operator that is a service provider?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was looking into the feasibility for f pulling in K8S operators as providers. It's not complete or vetted as an implementation yet though. I should make a section on topics like that.

Comment on lines +134 to +137
OperationCreate Operation = "CREATE"
OperationRead Operation = "READ"
OperationUpdate Operation = "UPDATE"
OperationDelete Operation = "DELETE"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we define here imperative operations, if it's k8s operator, which is declarative?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. This is incomplete, I need to mark it as such and we should talk through this idea further.

// Returns the DCM-assigned provider UUID on success.
Register(ctx context.Context, reg ProviderRegistration) (string, error)

// ReportStatus sends a realized state payload to DCM.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is called just once, or every time there is a change? "realized state" might be strange name here, should it be just current state or something?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

// ReportStatus sends a realized state payload to DCM.
ReportStatus(ctx context.Context, resourceID string, status RealizedState) error

// ReportEvent sends a lifecycle event to DCM.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is difference between reporting status and event?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

// ConfirmDecommission acknowledges a decommission request from DCM.
// Required for Level 3.
ConfirmDecommission(ctx context.Context, resourceID string, confirmation DecommissionConfirmation) error
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about some health report, or is it meant to be part of capacity report?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack


// ConfirmDecommission acknowledges a decommission request from DCM.
// Required for Level 3.
ConfirmDecommission(ctx context.Context, resourceID string, confirmation DecommissionConfirmation) error
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there must be a separate call for this? Why it can't be part of ReportEvent?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

```go
// SDK is the primary interface for the DCM Operator SDK.
// Operator developers interact with DCM through this interface.
type SDK interface {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this interface, why we need it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack


---

## 10. Open Questions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really didn't figure out, while reading the spec, what is the CR this operator reconciles? It's not defined anywhere and it's main communication point and spec between from DCM to operator.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

Comment thread content/docs/architecture/overview.md Outdated

DCM is **not a provisioning tool**. It is the management plane that sits above
provisioning tools, governing what gets requested, approved, built, owned, and
decommissioned. Provisioning tools (Ansible, Terraform, Kubernetes operators)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, are we suppose use Ansible, Terraform and K8s operators as provisioners?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those can be tools used, yes. DCM is not prescriptive in what tools are used to effect the change, it may come with some though to bootstrap usage or as examples of how to build providers.

Many providers and provisioning tools exist already, the goal is to reuse feasible tooling and encourage the adoption of the DCM provider interface.

…s vs unique processing responsibilities.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…curity is top priority and extensible.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…ocumentation / specs.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…andling depedencies better, health endpoints.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
intent-store/
└── a1b2c3d4-tenant-uuid/
└── Compute/
└── VirtualMachine/
Copy link
Copy Markdown
Contributor

@machacekondra machacekondra Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you define intent.yaml per resource, how do you define the dependencies of the intent, then? Would be awesome to change this example to work with three tier app + DNS + IP(DHCP/static), requiring single VM is too simple use case, that don't really show how everything works together.

…cy run applied.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>

## 2. Data Classification

Data classification is a **first-class field-level metadata property** in the DCM data model. Every field in every payload carries a `data_classification` value. This classification is the primary axis of the authorization matrix and is the key input to sovereignty and compliance enforcement.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we want to verify this and which component should be responsible for processing data_classification?


**Classification is declared in three places:**
- **Resource Type Specification** — default classification per field for all instances of that type
- **Data Layer** — classification applied across a domain (e.g., an org layer that marks all cost_center fields as `confidential`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we map it to org structure like cost_center?


### 3.1 What Accreditation Is

An **Accreditation** is a formal, versioned, time-bounded attestation that a DCM component — a Service Provider, a Policy Provider, a Storage Provider, a Notification Provider, or a DCM deployment itself — satisfies the requirements of a specific compliance framework. Accreditations are issued by an **Accreditor** and registered with DCM as first-class artifacts.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide flow diagram for accreditation. it is not clear to me how it should work

### 3.4 Accreditation Lifecycle

```
Accreditation submitted (via API or GitOps PR)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do should we handle gitops? for now we only have an api.

---


> **Architecture Update:** Section 4 of this document (Data/Capability Authorization Matrix) has been superseded by the **Unified Governance Matrix** ([doc 27](27-governance-matrix.md)). The governance matrix provides a more powerful, unified model that replaces the standalone matrix described here. The accreditation model (Sections 2-3) and zero trust interaction model (Section 5) remain current and are consumed by the governance matrix as inputs.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is work in progress, feel free to remove obsolete parts. No need for such updates

Comment thread content/docs/architecture/data-model/auth-providers.md
1. **Authentication** — is this identity who they claim to be?
2. **Authorization** — what is this identity permitted to do?

Every authentication mode DCM supports — static API key, local users, GitHub OAuth, LDAP, FreeIPA, Active Directory, OIDC, mTLS — is an Auth Provider implementation. The built-in Auth Provider ships with DCM and requires zero external configuration, enabling immediate home lab and evaluation use. External Auth Providers are registered artifacts, versioned, GitOps-managed, and audited.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to decide what we want to support


### 4.1 Built-In Auth Provider (zero configuration)

Ships with DCM. Always registered. Cannot be deregistered — only deprioritized.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always registered means to me that this could be deployment config


---

## 6. Credential Provider
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the use case for credential provider? can we have a user flow?


## 1. The Core Model

### 1.1 What an Authority Tier Is
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the use case for this?

→ New Data triggers new Events → repeat
```

See [Foundational Abstractions](data-model/foundations/) for the complete model.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the link to the fondations document is broken

Comment on lines +332 to +335
- **[Foundational Abstractions](data-model/foundations/)** — Data, Provider, Policy — read this first
- **[Unified Provider Contract](data-model/provider-contract/)** — base contract + 11 typed extensions
- **[Unified Policy Contract](data-model/policy-contract/)** — base contract + 7 output schemas
- **[Federated Contribution Model](data-model/federated-contribution-model/)** — who contributes what and how
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

links broken, (Capabilities Matrix as well) I think all links should be reviewed

Comment on lines +51 to +52
Event (Data state change)
→ Policy Engine evaluates all matching Policies
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, if a policy changes, it means that all existing and previously executed requests have to go through that flow again?
Isn't the scope too broad here? Should it be limited to a specific set of data change (like incoming requests)?

| **Resource Entity** | A realized infrastructure resource; the primary managed thing | Realized Store |
| **Process Entity** | An ephemeral execution (job, playbook, pipeline) | Realized Store |
| **Composite Entity** | A Meta Provider composition of Resource Entities | Realized Store |
| **Intent State** | Consumer's raw declaration before processing | Intent Store (GitOps) |
Copy link
Copy Markdown

@gabriel-farache gabriel-farache Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we store every intent in Git instead of a DB? Does the intent == the offering of DCM (our current catalog item) or is it the request sent to DCM to create/provision a resource?

If it's the 1st, then makes sense to persist it in Git but based on my understanding it's not the case. (I understand that the state is based on providers PoV, not DCM as the "requested state" is after the policies were evaluated)
Otherwise, storing the intent in the DB would be enough, no? Is there a need for community (by community I mean several people) reviews for each request

| **Service Provider** | Realizes infrastructure resources | DCM → Provider → DCM |
| **Information Provider** | Serves authoritative external data | DCM queries → Provider responds |
| **Storage Provider** | Persists DCM state | DCM reads/writes ↔ Provider |
| **Meta Provider** | Composes multiple providers | DCM → Meta → Children → DCM |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it means that only the Children talk to DCM? Shouldn't this falls on the Meta only? In case there is any translation to do from the children? Or is the meta just a boilerplate?

| **Meta Provider** | Composes multiple providers | DCM → Meta → Children → DCM |
| **Policy Provider** | Evaluates policies externally | DCM sends payload → Provider decides |
| **Credential Provider** | Manages secrets and credentials | DCM requests → Provider issues |
| **Auth Provider** | Authenticates identities | DCM verifies → Provider confirms |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can/should this provider be used by other providers as well?

- **Enforcement level** — hard (cannot be overridden) or soft (can be tightened by more-specific policies)
- **Domain precedence** — policies at more-specific domains win within their concern type; system > platform > tenant > resource_type > entity
- **Lifecycle** — every Policy follows the standard artifact lifecycle (developing → proposed → active → deprecated → retired)
- **Shadow mode** — proposed Policies execute against real traffic without applying results; safe validation before activation
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is a specific type of policy that does some pre-flight validations? What is the point of evaluating without applying? Is it not duplication as the policy will be evaluated later?
Or is the GateKeeper or Validation applied anyway?

| **Governance Matrix Rule** | Any cross-boundary interaction | `ALLOW / DENY / ALLOW_WITH_CONDITIONS / STRIP_FIELD / REDACT / AUDIT_ONLY` |
| **Lifecycle Policy** | Relationship events | `action` on the related entity (save, destroy, notify, cascade) |

**The unified Policy base contract** is defined in [B-policy-contract.md](B-policy-contract.md). All seven Policy types implement this base contract. What varies is the output schema.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

@gabriel-farache gabriel-farache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the data models files duplicated between architecture/data-model/ and data-model/?

Copy link
Copy Markdown

@jenniferubah jenniferubah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@croadfeldt , I see there are two different folders for the data model. And the contents looks similar. For example, the concept of four-states are in both:
data-model under doc folder and data-model under architecture folder
Not sure if it is intentional and if yes, what are difference?


- component_id: dns-primary
resource_type: DNS.Record
provided_by: self # This Meta Provider handles DNS
Copy link
Copy Markdown

@jenniferubah jenniferubah Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unclear about the concept of provided_by: self field. With this field set to "self", it seems this particular consituent (dns-primary) already has a provider before it reaches policy? Is it supposed to by-pass policy which should handle the selection of provider each consituent? Or why pass this consituent in the payload at all since it already has its provider?


| Classification | Failure effect |
|----------------|---------------|
| `required` | DCM halts the compound request; triggers Recovery Policy; unrealized constituents are not dispatched |
Copy link
Copy Markdown

@jenniferubah jenniferubah Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure effect on a required would also mean a rollback/deletion of other successfully dispatches required/partial/optional consistuents, right?

| Classification | Failure effect |
|----------------|---------------|
| `required` | DCM halts the compound request; triggers Recovery Policy; unrealized constituents are not dispatched |
| `partial` | DCM notes the failure; compound service continues; final status may be `DEGRADED` |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit unclear about the final status, why do we set it to DEGRADED and not sure a user would know what this implies? Also, why not just required and optional that way DCM knows to either apply recovery policy or not. I'm not sure about the partial aspect.


The compound service definition is the Meta Provider's primary contribution to DCM. It is declared at registration and stored in the Resource Type Registry as a compound Resource Type Specification.

### 2.1 Constituent Declaration
Copy link
Copy Markdown
Contributor

@machacekondra machacekondra Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this can't work. Just please try add here simple example. three tier app + DNS. Vm - backend is using VM2 database, and one using DHCP, one static IP, and both then are defined in DNS. To me this is imposible to define with this meta-provider specification. You here only define one thing depend on the other explicitly, this must be IMHO implicit based on the requirment of specific attribute. Otherwise it will be maintenence nightmare.

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
…project, added some details on who,what,why,etc..

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
croadfeldt added a commit to croadfeldt/dcm-project.github.io that referenced this pull request Apr 1, 2026
… 15 specs, 4 OpenAPI)

Addresses all PR dcm-project#7 review comments:
- Eliminated duplicate data-model directories
- Fixed all broken cross-references
- Removed 116 duplicate files
- Updated provider count (12), policy count (8), classification enum (8)
- Synced all OpenAPI YAMLs with canonical schemas
croadfeldt added a commit to croadfeldt/dcm-project.github.io that referenced this pull request Apr 1, 2026
… 15 specs, 4 OpenAPI)

Addresses all PR dcm-project#7 review comments:
- Eliminated duplicate data-model directories
- Fixed all broken cross-references
- Removed 116 duplicate files
- Updated provider count (12), policy count (8), classification enum (8)
- Synced all OpenAPI YAMLs with canonical schemas

Signed-off-by: Chris Roadfeldt <chris@roadfeldt.com>
@croadfeldt
Copy link
Copy Markdown
Author

Superceded by PR #8

@croadfeldt croadfeldt closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants