Skip to content

[codex] Document undocumented Passport properties#157

Draft
SirAndrosBot wants to merge 1 commit into
masterfrom
codex/issue-112-ngc-cache-origin
Draft

[codex] Document undocumented Passport properties#157
SirAndrosBot wants to merge 1 commit into
masterfrom
codex/issue-112-ngc-cache-origin

Conversation

@SirAndrosBot

Copy link
Copy Markdown
Collaborator

What changed

  • Added a Development note explaining that the persistent Windows Hello implementation first uses NgcCacheType and falls back to NgcCacheTypeProperty.
  • Documented that neither Passport KSP-specific property name is publicly documented by Microsoft and must not be assumed to be a stable API.
  • Added a nearby source comment so maintainers see the compatibility risk before modifying the NCrypt property handling.
  • Renamed the internal ..._DEPRECATED constant to ..._FALLBACK; the repository only proves fallback order, not official deprecation.

Why

Issue #112 asks where NgcCacheType came from and whether its use is based on public documentation, binary inspection, experimentation, private Microsoft guidance, or direct contact.

Repository history can establish when the names entered the project but not how they were discovered:

  • commit dd0022dd introduced NgcCacheType during the persistent-key implementation;
  • commit e4630992 added NgcCacheTypeProperty as the second spelling tried when the first operation fails;
  • neither commit nor the associated repository discussion records the discovery source or cites Microsoft guidance.

Microsoft documents that NCrypt providers may accept custom property identifiers, but these two identifiers do not appear in Microsoft's public property-identifier documentation. The project therefore cannot honestly claim official support, official deprecation, or known Windows-version compatibility. Preserving that uncertainty in the repository is safer for maintainers and downstream implementers than leaving the source looking like a documented API example.

Behavior and compatibility

Runtime behavior is unchanged. The provider still tries NgcCacheType first and NgcCacheTypeProperty only if the first get/set operation throws. The code remains C# 5 and .NET Framework 4.0 compatible.

Review

An independent review caught two overstatements in the initial patch:

  • absence from the public identifier list does not put custom properties outside the NCrypt API contract;
  • repository history does not prove that the fallback name is officially deprecated or tied to specific Windows versions.

The final wording now says only what the public documentation, source, and history establish. The follow-up review found no remaining actionable issues.

Validation

  • Release/MONO rebuild of src/KeePassWinHello.csproj
  • FrameworkPathOverride=C:\Windows\Microsoft.NET\Framework\v4.0.30319
  • ReferencePath=C:\proj\KeePassWinHello\lib
  • 0 warnings, 0 errors
  • git diff --check

No Windows Hello or Credential Manager keys were created, deleted, or changed during validation.

Closes #112

@sonarqubecloud

Copy link
Copy Markdown

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.

[Question] From where NgcCacheType comes from

2 participants