From 4c31f19c9cf0e18c9db708f9f4eddd97471c973e Mon Sep 17 00:00:00 2001 From: "glm-5.2" Date: Sun, 28 Jun 2026 21:30:10 +0000 Subject: [PATCH] tasks: mark core/peer-entry-model and core/credential-store-trait complete --- tasks/core/credential-store-trait.md | 4 ++-- tasks/core/peer-entry-model.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/core/credential-store-trait.md b/tasks/core/credential-store-trait.md index 9fe48aa..805aca9 100644 --- a/tasks/core/credential-store-trait.md +++ b/tasks/core/credential-store-trait.md @@ -1,7 +1,7 @@ --- id: core/credential-store-trait name: Add CredentialStore trait, InMemoryCredentialStore, EncryptedData mirror, and StoreError (ADR-031/035) -status: pending +status: completed depends_on: [] scope: narrow risk: low @@ -141,4 +141,4 @@ Re-export `CredentialStore`, `InMemoryCredentialStore`, `EncryptedData`, and ## Summary -> To be filled on completion \ No newline at end of file +Added `store` module to alknet-core with: `CredentialStore` trait (sync `get`, async `put`/`delete` via #[async_trait], no `list`), `InMemoryCredentialStore` default adapter (`new()`/`with_entries()`, async put/delete with no .await points, RwLock-backed), `EncryptedData` core mirror (4 fields: key_version/salt/iv/data, derives Serialize/Deserialize/Clone/Debug), and `StoreError` enum (3 variants, #[non_exhaustive], thiserror::Error). Re-exported all four from lib.rs. No vault dependency added (core-owned mirror per ADR-018). 9 unit tests covering get/put/delete round-trip, missing-provider None, put-replaces, with_entries seeding, EncryptedData serde round-trip (empty + non-empty salt), and StoreError Display for all variants. 119 total tests pass, clippy clean. \ No newline at end of file diff --git a/tasks/core/peer-entry-model.md b/tasks/core/peer-entry-model.md index 8797135..daca41f 100644 --- a/tasks/core/peer-entry-model.md +++ b/tasks/core/peer-entry-model.md @@ -1,7 +1,7 @@ --- id: core/peer-entry-model name: Add PeerEntry struct and replace AuthPolicy.authorized_fingerprints with peers (ADR-030) -status: pending +status: completed depends_on: [] scope: moderate risk: medium @@ -172,4 +172,4 @@ validation method or assertion that duplicate `peer_id` values in ## Summary -> To be filled on completion \ No newline at end of file +Implemented PeerEntry struct (7 fields) in config.rs, replaced `AuthPolicy.authorized_fingerprints: HashSet` with `peers: Vec`. Added `resolve_identity_from_token` (PeerEntry.auth_token_hash → fall through to resolve_api_key) and updated `resolve_identity_from_fingerprint` to resolve via PeerEntry returning `Identity.id = peer_id` (stable). Added `validate_peer_ids()` returning `DuplicatePeerId` error. Migrated all auth.rs/config.rs tests to PeerEntry model with new unit tests covering fingerprint resolution (known/unknown/disabled), token resolution (matching/non-matching/fall-through), multi-fingerprint peers, resource population on both paths, and duplicate peer_id detection. Also fixed a pre-existing test compile bug in endpoint.rs (StaticConfig.iroh_relay field reference not gated behind #[cfg(feature = "iroh")]). 110 tests pass, clippy clean, fmt clean. \ No newline at end of file