17. Security, Privacy, and Abuse Prevention
This chapter explains how the security boundaries of OpenAgenet (OAN) cover resource control, node authorization, root-platform publication, discovery results, governance state, invocation endpoints, and users’ local identities. An attacker may send public requests, submit forged or low-quality resources, issue repeated requests, observe public DIDs and VCs, or operate a compromised node. Security controls must state the protected object, attack preconditions, control point, failure result, verification evidence, and recovery action. The trustworthiness of discovery results does not imply the security of the business endpoint.
Security requirements uniformly use the following decision chain. The tables and checklists in the subsequent sections should all be traceable to this chain:
Attack preconditions -> Protected object -> Verification or control point -> Failure result -> Audit evidence -> Recovery action
| Security object | Primary attack surface | Primary control point | Signals that must not be misinterpreted as security |
|---|---|---|---|
| Resource control | DID copying, document forgery, signature replay | Control key, challenge, version, and signature | Identical DID string, HTTP 200 |
| Node authorization | Node impersonation, privilege escalation, expired authorization | Node DID, authorization VC, and governance state | Network reachability, historical success |
| Publication and distribution | ResourcePackage tampering, forged publication status | Hash, Root proof, and batch validation | Registration acceptance, cache hit |
| Discovery and invocation | Index poisoning, malicious endpoint, SSRF | Source, lifecycle, endpoint policy, and pre-invocation validation | High ranking, semantic relevance |
| Availability and privacy | Flooding, resource exhaustion, credential leakage | Quotas, isolation, redaction, and least privilege | Success of a single health endpoint |
17.1 Threat Model and Trust Assumptions
The threat model treats the resource provider, Registrar node, Root platform, content distribution platform, Discovery node, off-chain trust indexer, browser, and invocation endpoint separately. The resource-control private key is held by the controlling party, governance keys are used only for governance actions, and the indexer is a read-side projection of on-chain facts. The protocol cannot automatically repair a leaked key, a fully compromised host, or a vulnerability in a business endpoint.
Trust assumptions should be recorded separately by component and material:
| Component or material | Trust boundary | Direct impact after compromise | Facts that must still be re-verified by other components |
|---|---|---|---|
| Resource-control private key | Held by the resource controller | Control of the resource may be transferred or abused | Node authorization, governance state, and publication result |
| Registrar node | Trusted only within its authorized domain | May receive, alter, or reject requests | Control proof, ResourcePackage hash, and root-platform publication |
| Root platform | Responsible for root verification, publication, and governance integration | Publication status or Root proof may be affected | Resource control and external governance facts |
| Discovery node | Provides query and index views | Results may be missing, stale, or poisoned | Source authorization, version, and Root proof |
| Off-chain trust indexer | Provides a read-side projection of on-chain governance facts | State may be delayed or queries may be incorrect | Original on-chain facts and synchronization sequence |
| Business endpoint | Not an OAN security trust root | The business invocation itself may be attacked | Protocol, authentication, and business policy of the caller |
17.1.1 Resource-Control Threats
Resource-control threats include copying a public DID, DID Document, and VC to impersonate the controller, or using a new document to overwrite the same DID. The control points are the verification method, control challenge, signature, and version relationship. An incorrect public key, incorrect challenge, forged signature, or overwrite by an old version must be rejected.
17.1.2 Node-Trust Threats
Node-trust threats include an unauthorized node impersonating a Registrar node, an authorized node exceeding its privileges, and continued operation after suspension or revocation. The control points are the node DID, node authorization VC, governance events, authorized domain, and capability scope. Network reachability or historical success cannot replace current authorization.
17.1.3 Data-Poisoning and Abuse Threats
Data poisoning includes batches of fake resources, duplicate DIDs, low-quality descriptions, malicious tags, false endpoints, and forged ranking signals. Control points include control proofs, idempotency rules, lifecycle, independent root-platform verification, tag boundaries, review, and rate limiting. Rejection records should distinguish specific reasons.
17.1.4 Availability Threats
Availability threats include registration flooding, complex semantic queries, oversized ResourcePackages, concurrent synchronization, database lock contention, and unavailable external dependencies. Control points are size limits, timeouts, concurrency quotas, pagination, query degradation, queue isolation, and backoff. Retries must not be unlimited.
17.1.5 Invocation-Endpoint Security Threats
Invocation-endpoint threats include malicious URLs, internal-network callbacks, insecure protocols, redirect bypasses, and compromised endpoints. Control points are protocol, domain, resolved address, port, redirect, and authentication validation. When validation fails, high-risk access must be blocked and the redacted reason recorded.
17.2 Resource Impersonation and DID Control Protection
The control relationship of a resource DID is established by the public key and control proof in the DID Document. A public DID, DID Document, registration VC, or Root proof cannot independently grant update authority. An update to the same DID must use the original control relationship or a control-transfer process permitted by the method; it must not be accepted merely because a new document is internally self-consistent.
The resource-control relationship can be checked item by item as follows:
| Check item | Validation | Failure handling |
|---|---|---|
| DID and document | The DID declared by the document matches the resource DID in the request | Reject the request and do not enter the publication process |
| Public-key relationship | The verification method matches the control relationship | Mark the control relationship invalid |
| Signature challenge | The signature covers the current request, version, or challenge | Reject old signatures and signatures from another request |
| Version chain | The update declares the preceding version, digest, and control relationship | Do not allow an old version to overwrite the current record |
| State constraints | The resource has not been suspended, revoked, or restricted from updating | Reject or suspend according to governance state |
“A signature with a valid format” alone is insufficient to prove control. The verifier must confirm that the signing public key is declared by the target DID Document and that the signature covers this specific operation.
17.3 Protection Against Forged Registration and Unauthorized Updates
Registration and update requests separately validate the source, node authorization, control proof, document hash, metadata hash, ResourcePackage hash, version, and idempotency state. An old version, old nonce, or incorrect hash must not overwrite the current record. Tests cover missing proofs, invalid signatures, invalid versions, incorrect hashes, and duplicate submissions.
Rejection conditions for registration and updates should be distinguishable to clients:
| Situation | Control failure point | Permitted result |
|---|---|---|
| Missing control proof | Resource control has not been established | Reject the registration or update |
| Invalid node authorization | The request source is not eligible for access | Reject and record the authorization reason |
| Invalid version or preceding version | The update chain is discontinuous | Reject the overwrite without changing the current version |
| Inconsistent hash | The document, metadata, or ResourcePackage has been tampered with | Reject publication |
| Retry of a valid request already processed | The idempotency key or request ID already exists | Return a stable result without producing a duplicate side effect |
17.4 Malicious or Compromised Registrar Nodes
The Root platform must not trust only the conclusion forwarded by a Registrar node. It should re-verify the node identity, authorization, control proof, DID Document, ResourcePackage, and request signature. If the node exceeds its authority or the materials have been altered, publication is rejected. A Registrar node’s historical record does not automatically become a root-platform publication fact.
17.5 Malicious or Compromised Discovery Nodes
Callers should verify the source of the discovery response, the identity of the query node, index version, resource DID, DID Document, version, Root proof, lifecycle, authorized domain, and governance state. High relevance or HTTP success cannot replace verification. If a Discovery node is compromised, its authorization can be revoked and its index can be stopped from being used.
17.6 Root-Platform Compromise and Key Protection
A compromised Root platform may alter materials pending publication, forge Root proof, block propagation, or expose configuration. Publication keys and databases should be isolated, with least privilege, controlled signing, hashes, auditing, backup validation, and node resynchronization. Recovery must not change resource-control private keys or on-chain facts.
17.7 Spam Registration and Resource-Catalog Poisoning
Catalog-poisoning governance focuses on resource authenticity, availability, and semantic quality. The registration entry retains the control proof and subject, the Root platform independently verifies and isolates suspicious resources, and Discovery nodes filter by lifecycle, governance state, and publication evidence. Cleanup must distinguish rejection, suspension, revocation, and node-authorization revocation.
Spam-registration governance should not rely on a single score. Before processing, it should combine the control proof, resource type, tag namespace, endpoint verifiability, duplication, source node, and governance state. After processing, it should record the action and propagation scope.
- [ ] Apply multidimensional rate limits by subject, node, interface, and time window to batch requests.
- [ ] Distinguish network retries, idempotent submissions, and actual version updates for duplicate DIDs.
- [ ] Preserve the distinctions among normative tags, aliases, and inferred matches for low-quality or malicious tags.
- [ ] Distinguish suspension, revocation, taking offline, and node-authorization revocation for published resources.
- [ ] After cleanup, verify convergence of the Root platform, content distribution platform, and Discovery nodes.
17.7.1 Fake Resource Registration
Fake registrations are identified by signals such as missing control proofs, inconsistent DID Documents, unverifiable endpoints, or forged metadata, and are rejected before entering publication. Public errors must not echo private keys or complete signature materials.
17.7.2 Duplicate Registration and Version Poisoning
Duplicate registration may be a network retry, an update to the same DID, or a malicious submission. The system distinguishes these cases using the resource DID, version, document and ResourcePackage hashes, and request ID. A duplicate valid request returns a stable result, while a real update follows control and version rules.
17.7.3 Semantic-Tag Poisoning
Tag poisoning includes occupying popular tags, disguising non-normative tags as normative tags, cross-type mismatches, and misleading keywords. Registration validates tag IDs, vocabulary versions, type relationships, and namespaces. Discovery distinguishes normative tags, aliases, original text, and semantically inferred matches.
17.7.4 Rate Limiting, Review, and Cleanup
Rate limiting, review, and cleanup are applied by source, subject, node DID, resource DID, interface, and risk level, while retaining the reason, operator, and impact scope. After cleanup, convergence of the Root platform, content distribution platform, and discovery index should be verified.
17.8 Denial of Service and Resource Exhaustion
Registration, discovery, synchronization, health, and governance queries are configured with separate resource budgets. Limits apply to request bodies, batches, decompression expansion, query depth, concurrency, database connections, and external-call time. A semantic backend failure may fall back to a constrained path, but must not relax trusted filtering. Degradation must be marked as incomplete or unconfirmed.
Resource budgets should be isolated by path so that high-cost discovery queries do not bring down registration and health checks:
| Path | Primary budget | Action on excess | Security baseline |
|---|---|---|---|
| Registration | Request body, signature-verification count, concurrency, and external-dependency time | Rate-limit, queue, or reject | Do not skip control proof |
| Discovery | Query length, page size, candidate count, and execution time | Truncate, cache, or degrade | Do not bypass governance filtering |
| Node synchronization | Batch size, cursor, parallelism, and retry count | Back off, pause, or reset cursor | Do not repeatedly advance a processed sequence |
| Database/index | Connections, locks, disk, and index growth | Isolate, alert, or enter protective read-only mode | Prioritize verified data that has already been accepted |
17.8.1 Registration-Interface Attacks
Registration attacks include high-frequency submissions, oversized JSON, duplicate DIDs, expensive signature verification, and dependency calls. The entry point first performs size, rate, idempotency, and format checks, and then performs high-cost validation. Failed requests must not trigger continuous publication retries.
17.8.2 Discovery-Query Attacks
Discovery attacks include unbounded broad queries, complex semantic retrieval, duplicate queries, and result amplification. Limit input length, page size, candidate count, execution time, and concurrency, and use stable cursors and caching. Degradation must not bypass governance filtering.
17.8.3 Inter-Node Synchronization Pressure
Synchronization pressure includes large batches, cursor replay, excessive parallelism, retry storms, and unavailable distribution. The synchronizing party uses batch and concurrency limits, exponential backoff, and cursor idempotency. A duplicate batch must not be written or advance state again.
17.8.4 Database and Index Resource Exhaustion
Database and index exhaustion includes connection-pool depletion, locks, disk exhaustion, and index bloat. Field and batch limits, index maintenance, timeouts, isolated queues, retention policies, and capacity alerts should be provided. When resources are insufficient, valid data and health queries should be protected first.
17.9 Replay, Duplicate Submission, and Expired Publication
Replay protection distinguishes requests, registrations, publications, synchronization batches, and old caches. Request IDs, nonces, time windows, and signatures prevent a request from being accepted again. DID, version, preceding version, and hashes determine business updates, while cursors and batch sequences ensure idempotent synchronization.
The decision order for replay and duplicate submissions should prioritize idempotency and handle state updates cautiously:
17.10 Endpoint Abuse and Unsafe Resource Invocation
Before invocation, check the endpoint protocol, certificate, domain, resolved address, authentication, version, lifecycle, governance state, and publication evidence. Where necessary, negotiate business permissions, sign requests, and validate responses. OAN does not guarantee that a business endpoint is free of vulnerabilities or malicious behavior.
Before using discovery results, the caller should complete at least the following checks:
- [ ] The resource DID, DID Document, public key, and version digest are consistent.
- [ ] The Root proof, lifecycle, and governance state remain verifiable.
- [ ] The endpoint protocol, domain, certificate, resolved address, port, and redirects comply with local policy.
- [ ] The authentication, authorized domain, request signature, and response validation required for invocation are defined.
- [ ] The freshness and source of the Discovery node’s result are not mistaken for a guarantee of the business service.
17.11 Sensitive Metadata and Credential Exposure
Private keys, Local Identity backups, internal endpoints, database paths, administrative tokens, unpublished resources, complete signature originals, and log fields that can be associated with individuals are sensitive information. Public interfaces must not return Local Identity backups. Server logs require allowlisting, redaction, and access control.
| Information category | May appear in a public response | Log handling | Action after failure |
|---|---|---|---|
| DID, version, and public metadata | According to the resource disclosure policy | May be recorded with a retained correlation ID | Process discovery or publication according to state |
| Registration VC and Root proof | According to the disclosure policy | Record digest and status; the complete sensitive material need not be recorded | Reject use if validation fails |
| Private key and Local Identity backup | No | Must not be recorded | Immediately block and investigate the leakage path |
| Administrative token, database path, and internal endpoint | No | Record only after redaction or allowlisting | Rotate credentials and limit the exposure surface |
| Complete signature original and personally correlated logs | Normally should not be public | Redact, minimize, and restrict access | Delete unnecessary copies and review access |
17.12 Logging, Auditing, and Incident Response
Security logs correlate the request ID, resource DID, node DID, version, event or cursor, source, result, error code, and time, and distinguish on-chain evidence, service logs, and manual records. Log-write permissions should be restricted. Alerts should locate isolation, revocation, rate limiting, compensation, and recovery verification actions.
Incident response should retain the minimum evidence that remains correlatable:
request_id / resource_did / node_did / version / event_or_cursor
source / result / error_code / observed_at / operator_action
17.13 Security Requirements for Third-Party Nodes
Third-party nodes protect their own hosts, node private keys, authorization VCs, configurations, databases, dependencies, and ports, and connect through the node DID, DID Document, node authorization, and request signature. In an abnormal situation, authorization may be suspended or revoked. A resource provider must not be required to surrender a subject or resource-control private key.
Before a third-party node connects, an auditable minimum inspection record should be created containing the node DID, DID Document, node authorization VC, authorized domain, validity period, public endpoint, software version, key custody method, and revocation contact. A resource provider submits only the resource control proof and should not surrender a subject or resource-control private key.
17.14 Endpoint Validation, Callback Security, and SSRF Considerations
Before reading or invoking an endpoint, callback, or synchronization address, validate the protocol, host, port, resolved address, redirect, and authentication. Private, loopback, link-local, and cloud-metadata addresses are blocked according to policy. DNS rebinding must be prevented between resolution and connection. Rejection reasons must be auditable without exposing topology.
SSRF protection should cover four points: before resolution, after resolution, before connection, and after each redirect. Checking a URL only at the string level is not sufficient. When rejecting a request, record the policy-match category and request ID, but do not echo internal addresses, network topology, or resolution details.
| Stage | Required checks | Failure result |
|---|---|---|
| Before resolution | Scheme, host, port, credentials, and encoding | Reject invalid URL |
| After resolution | IPv4/IPv6, loopback, private, link-local, and cloud-metadata addresses | Reject restricted address |
| Before connection | Actual connection target, certificate, timeout, and policy | Fail closed |
| After redirect | Protocol, host, resolved address, and port at every hop | Reject out-of-policy redirect |
17.14.1 Endpoint Format and Protocol Validation
Allow only supported protocols and permitted port ranges. Reject endpoints with a missing host, invalid encoding, embedded credentials, or an incompatible type. HTTPS certificates and host names are validated according to risk. HTTP in a development environment must not become the default public security configuration.
17.14.2 Internal and Loopback Address Restrictions
Before every connection, check IPv4, IPv6, loopback, private, link-local, reserved, and cloud-metadata addresses. Use standard resolution and network policies rather than relying only on a string blacklist.
17.14.3 Callback Request Security
Bind callbacks to a one-time request ID, source context, and target. Limit methods, request headers, response size, and timeout. A callback must not change authorization or governance state. Failed retries must be limited.
17.14.4 Redirect and DNS-Resolution Risks
DNS resolution results, connection targets, and the redirect chain are evaluated as one decision. Revalidate after a redirect to a different host, protocol, or restricted address. Timeouts, certificate changes, or inconsistent resolution should fail closed.
17.15 Package and Dependency Supply-Chain Integrity
Source code, Cargo/npm dependencies, lock files, build artifacts, and ResourcePackages form the supply-chain boundary. Builds use locked dependencies, controlled sources, hash or signature verification, and traceable commits. ResourcePackages are hashed again before entering the Root platform or a Discovery node.
Supply-chain verification covers the “source-lock-build-artifact-deployment” chain:
- Check the source commit, dependency lock files, and controlled package sources.
- Build Rust, TypeScript, and community Skill artifacts in a reproducible or controlled environment.
- Save a digest or signature for binaries, npm packages, ResourcePackages, and distribution materials.
- Compare artifact digests before deployment, and record the version and rollback materials after deployment.
- If a dependency or artifact is abnormal, stop publication, preserve evidence, and rebuild.
17.16 Availability Objectives and Graceful Degradation
Security state and availability are expressed separately. An old snapshot may support a read-only result with a freshness marker, but must not approve registration, publication, authorization, or high-risk invocation. Dependency failure, index lag, unknown governance state, and resource exhaustion should have different states and recovery actions.
| State | Content that may be returned | Actions that must be prohibited | Facts that must be marked |
|---|---|---|---|
| Normal and fresh | Current query, state, and proof | No additional restriction | Source and time |
| Old snapshot available | Read-only result with freshness | Registration, publication, authorization, and high-risk invocation | Snapshot time and lag |
| Index lagging | Confirmed partial facts | Treating unsynchronized data as nonexistent or current | Current sequence and target sequence |
| Governance unknown | Limited query or error state | Approving invocation through an unknown state | Reason for unknown state |
| Dependency unavailable | Health error or restricted cache | Unlimited retries or relaxed trusted filtering | Dependency and recovery state |
The acceptance focus for graceful degradation is not merely that “the page still has content.” Users and callers must be able to see the freshness, source, and uncertainty of the content, and old data must not automatically execute registration, publication, authorization, or high-risk business invocation.
References
| Source | Type | Link |
|---|---|---|
oan-protocol-common |
Code repository: signatures, hashes, credentials, and secure request structures | https://github.com/wolfbrother/oan-protocol-common |
oan-root-services |
Code repository: root-platform verification, publication, and node authorization | https://github.com/OpenAgenet/oan-root-services |
oan-registrar-node |
Code repository: registration entry point, control proofs, and abuse controls | https://github.com/OpenAgenet/oan-registrar-node |
oan-discovery-node |
Code repository: queries, indexing, and result security boundaries | https://github.com/OpenAgenet/oan-discovery-node |
oan-trust-indexer |
Code repository: governance state and revocation-state projections | https://github.com/OpenAgenet/oan-trust-indexer |
| OAN Yellow Paper | arXiv yellow paper: security, privacy, and trust boundaries | https://arxiv.org/abs/2606.03163 |