Skip to content

add security considerations - #84

Open
ZhengShenghan wants to merge 1 commit into
agent-network-protocol:mainfrom
ZhengShenghan:docs/security-considerations
Open

add security considerations#84
ZhengShenghan wants to merge 1 commit into
agent-network-protocol:mainfrom
ZhengShenghan:docs/security-considerations

Conversation

@ZhengShenghan

@ZhengShenghan ZhengShenghan commented Jun 26, 2026

Copy link
Copy Markdown

Related Issue

Related to #78 and informed by the protocol/application boundary discussed in #79.

Description

This PR adds cross-cutting security implementation guidance at docs/security-considerations.md and links it from README.md and docs/links.md.

The document is explicitly informational and non-normative. It complements the individual ANP specifications and Profiles; it does not define new protocol requirements or replace their normative security requirements.

The guidance covers:

  • separation of DID-based authentication from application/resource authorization
  • credential, key, access-token revocation, and replay-protection lifecycle guidance
  • multi-instance and service-restart assumptions for replay state
  • security event hooks for applications and runtimes
  • verification and isolation of negotiated protocol artifacts and local handlers
  • preservation of identity, protocol, and authorization context across bridges
  • transport-specific error behavior and additional considerations for ANP-10 payment scenarios

PR Type

  • Documentation
  • Feature
  • Bugfix
  • Refactor
  • Test

Breaking Changes

  • Yes
  • No

Checklist

  • Rebased onto the latest main
  • Relevant documentation and internal links updated
  • Related issues linked
  • Documentation diff and internal security-guidance links verified

@chgaowei

chgaowei commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Thank you very much for your contribution to ANP. We really appreciate your effort in analyzing the security aspects of the protocol and preparing a dedicated Security Considerations document.

This PR addresses an important topic. It is necessary to clearly define the security boundaries between identity, authentication, authorization, application logic, and runtime responsibilities. The clarification that authentication does not automatically imply authorization is especially valuable.

After reviewing this PR, I think the overall direction is good and this document is worth adding to ANP. However, there are several points that need to be adjusted before merging:

  1. Please rebase the PR on the latest main branch.

    The current branch is behind the latest changes, and some document structures have changed. Please update the branch first and resolve any conflicts.

  2. The filename 10-security-considerations.md needs to be changed.

    ANP-10 is already used by the Agent Payment Protocol, so this name may cause confusion.

    We suggest moving it to something like:
    docs/security-considerations.md

  3. Please clarify the status of this document.

We suggest positioning it as a:

  • Security guidance
  • Implementation guidance

document rather than a new protocol specification.

  1. The current document should further clarify two points from Issue Clarify security responsibilities for consent, auditability, credential revocation, and replay protection #78:
  • Access token revocation semantics

    • For example, whether revocation should take effect immediately or mainly rely on token expiration.
  • Replay protection assumptions

    • Including different deployment scenarios such as multi-instance deployments and service restart situations.
  1. The section about generated protocol handlers should be updated according to the latest ANP-06 design.

The current ANP-06 no longer focuses on remote code generation or code exchange. It would be better to focus on:

  • Protocol artifact verification;
  • Digest/signature verification;
  • Treating external artifacts or generated code as untrusted;
  • Sandbox and least-privilege execution.
  1. Some security statements should distinguish between HTTP-specific behavior and general ANP behavior.

For example:

  • 401 Unauthorized and 403 Forbidden error semantics apply to HTTP bindings;
  • Other transports should follow their corresponding Profile-specific error model.
  1. Since ANP now includes the Agent Payment Protocol (ANP-10), please consider adding a reference that payment-related scenarios require additional security considerations.

These may include:

  • Authorization;
  • Transaction integrity;
  • Replay protection;
  • User confirmation.

Thank you again for this valuable contribution. The overall direction of this PR is correct. After these adjustments, I believe this Security Considerations document will become an important part of the ANP documentation set.

@ZhengShenghan
ZhengShenghan force-pushed the docs/security-considerations branch from 733983b to ce0cc65 Compare August 10, 2026 15:33
@ZhengShenghan

Copy link
Copy Markdown
Author

@chgaowei Thank you for the detailed review. I have updated the PR point by point:

  1. Rebased the branch onto the latest main and resolved the README structure conflict.
  2. Moved the document from 10-security-considerations.md to docs/security-considerations.md, updated both inbound links, and placed it under Implementation Guidance in docs/links.md.
  3. Added an explicit informational, non-normative status and scope block. The document now states that normative requirements remain in the individual ANP specifications and Profiles.
  4. Expanded access-token revocation semantics to distinguish expiration-only, best-effort early revocation, and online validation. Expanded replay-protection guidance for atomic cache operations, multi-instance coordination, failover, restart recovery, timestamp skew, and nonce-retention duration.
  5. Reworked the ANP-06 section around current semantic negotiation and protocol artifacts. It now covers trusted digest binding, publisher/signature policy, artifact validation, untrusted local generation/loading, sandboxing, and least privilege without treating remote code exchange as an ANP-06 mechanism.
  6. Scoped 401 Unauthorized and 403 Forbidden to HTTP bindings and directed other transports to their Profile-specific error models.
  7. Added a focused ANP-10 payment reference covering authorization scope, transaction integrity, replay protection, and explicit user confirmation.

I also verified that no references to the old filename remain, the new internal links resolve, the guidance contains no uppercase RFC requirement keywords, and git diff --check passes.

@whyseu

whyseu commented Aug 15, 2026

Copy link
Copy Markdown

Approved.

@yagi2018
yagi2018 requested a review from chgaowei August 15, 2026 13:56
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.

3 participants