Skip to content

Merge back into reysic’s project#28

Open
alta01 wants to merge 10 commits intoreysic:mainfrom
alta01:main
Open

Merge back into reysic’s project#28
alta01 wants to merge 10 commits intoreysic:mainfrom
alta01:main

Conversation

@alta01
Copy link
Copy Markdown

@alta01 alta01 commented Apr 10, 2026

Summary

This PR brings alta01/AzureKeyVaultExplorer up to date against reysic/AzureKeyVaultExplorer:main, contributing 9 commits (52 files changed, +1738 / −795 lines) across four areas: a .NET 10 migration, Azure SDK Track-2 migration, developer/UX quick wins, and a set of CI/ClickOnce stability fixes.


1. .NET 10 + CI / ClickOnce Migration

  • Upgraded GitHub Actions workflow to .NET SDK 10.0 and actions/checkout@v4
  • Updated ClickOnce publish profile (ClickOnceProfile.pubxml) to target .NET 10 with correct framework/path settings
  • Enhanced release.ps1 to validate MSBuild version and handle .NET 10 ClickOnce publishing edge cases
  • Cleaned up t4.targets T4 template build process for improved performance
  • Pinned setup-dotnet SDK in CI to match VS/MSBuild resolver behavior
  • Used MSBuild /restore publish with RuntimeIdentifier so runtime packs resolve correctly in CI
  • Updated gh-pages root redirect to point to VaultExplorer.application and corrected README install link to the manifest

2. Azure SDK Track-2 Migration

Removes three deprecated NuGet packages:

  • Microsoft.Azure.KeyVault v3.0.5
  • Microsoft.Azure.Management.KeyVault v3.1.0
  • Microsoft.Rest.ClientRuntime v2.3.24

Replaces with actively maintained Track-2 packages:

  • Azure.Security.KeyVault.Secrets v4.7.0
  • Azure.Security.KeyVault.Certificates v4.7.0
  • Azure.ResourceManager.KeyVault v1.2.0
  • Azure.Identity v1.13.0 (for ArmClient credential bridge)

New infrastructure files:

  • Vault/Library/ObjectIdentifier.cs — local Name/Identifier/Version/Vault record
  • Vault/Library/VaultAccessTokenCredential.cs — MSAL → TokenCredential bridge
  • Vault/Explorer/Dialogs/Subscriptions/StaticTokenCredential.cs — static ARM token
  • Vault/Explorer/Model/Files/Secrets/SecretFileData.cs — JSON-serializable secret DTO
  • Vault/Explorer/Model/Files/Secrets/CertificateFileData.cs — JSON-serializable cert DTO

Key changes:

  • VaultKeyValueClient replaces KeyVaultClientEx; holds SecretClient + CertificateClient
  • Vault.cs: all methods updated for new SDK types and AsyncPageable iteration
  • GetCertificatePolicyAsync added (policy no longer embedded in GetCertificateAsync)
  • Management plane: ArmClient + StaticTokenCredential replaces KeyVaultManagementClient
  • All model/dialog/list files updated for SecretProperties, CertificateProperties, KeyVaultSecret, KeyVaultCertificate, CertificatePolicy flat-structure types
  • RequestFailedException replaces CloudException/KeyVaultErrorException
  • CertificatePolicyAction replaces ActionType enum in lifetime actions
  • Follow-up fix: replaced invalid string[] cast in AccessPolicyEntryItem with correctly typed Array.Empty<T>() calls

3. Developer Workflow & UX Quick Wins

New copy formats in the Share toolbar dropdown and right-click context menu:

  • D1 Copy as env var (NAME=value)
  • D2 Copy as Docker --env
  • D3 Copy as Kubernetes Secret YAML
  • D4 Copy name only (Ctrl+Shift+N)

UX improvements:

  • U2 Last-used vault alias remembered across sessions (LastUsedVaultAlias setting), restored on startup
  • U3+U6 Status bar shows vault alias prefix and expiring-secret count; window title gains | N expiring badge
  • U4 Show/Hide toggle in SecretDialog masks value with asterisks; TextChanged handler guarded to avoid corrupting PropertyObject.Value
  • U5 "Expires" list column renamed to "Expires in" to match the relative-time format already produced by Utils.ExpirationToString

4. ClickOnce / Auth / Onboarding Fixes

  • Ignore non-vault activation URLs at startup; update fork activation constants
  • Show tenant display name alongside tenant ID in the tenant selector
  • Defer onboarding MessageBox to the Shown event so the form renders before any prompt appears
  • Wrap Vaults.GetAsync in try/catch so a failed vault detail fetch shows a clear error without crashing or permanently disabling the OK button
  • Add MinimumSize to SubscriptionsManagerDialog to prevent button clipping on resize
  • Restore tenant selection in subscription flow, re-auth on tenant change, and block saving vault config without a signed-in account context

Other

  • Added AGENTS.md documenting project layout, conventions, and key files
  • Re-pointed all GitHub/Pages URLs from alta01 to reysic across Globals.cs, ClickOnceProfile.pubxml, README.md, and release.md
  • Refactored certificate loading in CertificateDialog and CertificateValueObject to use X509CertificateLoader

alta01 and others added 10 commits March 17, 2026 13:06
- Updated GitHub Actions workflow to use .NET SDK 10.0 and actions/checkout@v4.
- Enhanced release script to validate MSBuild version and ensure compatibility with .NET 10 ClickOnce publishing.
- Revised README.md to reflect new repository ownership and installation links.
- Improved error handling and user prompts in the SubscriptionsManagerDialog for better onboarding experience.
- Refactored certificate loading logic in CertificateDialog and CertificateValueObject to utilize X509CertificateLoader.
- Updated ClickOnce publish profile to target .NET 10 and adjusted paths accordingly.
- Cleaned up T4 template build process in t4.targets for improved performance.
- Added new features and improvements to the application, including better tenant selection and subscription handling.
Reintroduce tenant selection in subscription flow, re-auth on tenant change, and prevent saving vault config without a signed-in account context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use MSBuild /restore publish with RuntimeIdentifier to ensure runtime packs are resolved during ClickOnce release, and pin setup-dotnet SDK to match VS/MSBuild resolver behavior in GitHub Actions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ensure release updates gh-pages root redirect to local VaultExplorer.application and point README install link directly to the manifest.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ignore non-vault activation URLs at startup, update fork activation constants, and show tenant display name with tenant id in selector.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d AGENTS.md

- Replace all alta01 GitHub/Pages URLs with reysic across Globals.cs,
  ClickOnceProfile.pubxml, README.md, and release.md
- Rename "Alta01 Updates" README section to "Recent Updates"
- SubscriptionsManagerDialog: defer onboarding MessageBox to Shown event
  so the form renders fully before any prompt appears
- SubscriptionsManagerDialog: wrap Vaults.GetAsync in try-catch so a
  failed vault detail fetch shows a clear error and leaves the dialog
  open (previously an unhandled exception could leave the OK button
  permanently disabled or crash the form)
- SubscriptionsManagerDialog.Designer: add MinimumSize to prevent the
  form from being resized small enough to clip the OK/Cancel buttons
- Add AGENTS.md explaining project layout, conventions, and key files

https://claude.ai/code/session_01XZMMdq42h652d3PnEC8jZf
D1 Copy as env var (NAME=value), D2 Copy as Docker --env, D3 Copy as
Kubernetes Secret YAML, D4 Copy name only (Ctrl+Shift+N) — all added to
the Share toolbar dropdown and the right-click context menu.

U2 Remember last-used vault alias across sessions (LastUsedVaultAlias
setting), restored automatically on startup via RestoreLastVault().

U3+U6 Status bar now shows vault alias prefix and expiring item count;
window title gains a "| N expiring" badge when secrets are about to expire.

U4 Show/Hide toggle button in SecretDialog masks the value with asterisks;
TextChanged handler guarded so PropertyObject.Value is not corrupted.

U5 "Expires" list column renamed to "Expires in" to reflect the relative
time format already produced by Utils.ExpirationToString.

https://claude.ai/code/session_01XZMMdq42h652d3PnEC8jZf
Removes all three deprecated NuGet packages:
- Microsoft.Azure.KeyVault v3.0.5
- Microsoft.Azure.Management.KeyVault v3.1.0
- Microsoft.Rest.ClientRuntime v2.3.24

Replaces with actively maintained Azure SDK Track-2 packages:
- Azure.Security.KeyVault.Secrets v4.7.0
- Azure.Security.KeyVault.Certificates v4.7.0
- Azure.ResourceManager.KeyVault v1.2.0
- Azure.Identity v1.13.0 (for ArmClient credential bridge)

New infrastructure files:
- Vault/Library/ObjectIdentifier.cs — local Name/Identifier/Version/Vault record
- Vault/Library/VaultAccessTokenCredential.cs — MSAL → TokenCredential bridge
- Vault/Explorer/Dialogs/Subscriptions/StaticTokenCredential.cs — static ARM token
- Vault/Explorer/Model/Files/Secrets/SecretFileData.cs — JSON-serializable secret DTO
- Vault/Explorer/Model/Files/Secrets/CertificateFileData.cs — JSON-serializable cert DTO

Key changes:
- VaultKeyValueClient replaces KeyVaultClientEx; holds SecretClient + CertificateClient
- Vault.cs: all methods updated for new SDK types and AsyncPageable iteration
- New GetCertificatePolicyAsync added (policy no longer embedded in GetCertificateAsync)
- Management plane: ArmClient + StaticTokenCredential replaces KeyVaultManagementClient
- SubscriptionsManagerDialog: uses GetKeyVaultsAsync with await foreach
- All model/dialog/list files updated for SecretProperties, CertificateProperties,
  KeyVaultSecret, KeyVaultCertificate, CertificatePolicy flat-structure types
- RequestFailedException replaces CloudException/KeyVaultErrorException
- CertificatePolicyAction replaces ActionType enum in lifetime actions

https://claude.ai/code/session_01XZMMdq42h652d3PnEC8jZf
…icyEntryItem

The null-coalescing fallback used a string[] EmptyList cast to
IList<IdentityAccessKeyPermission/SecretPermission/CertificatePermission>
which would fail at compile time. Replace with Array.Empty<T>() of the
correct typed permission types for each property.

https://claude.ai/code/session_01XZMMdq42h652d3PnEC8jZf
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.

2 participants