Skip to content

Conversation

@Sylfwood
Copy link
Contributor

@Sylfwood Sylfwood commented May 30, 2025

Added support for all these subtypes:

  • Credential/AccessCode
  • Credential/ApiKey
  • Credential/AzureServicePrincipal
  • Credential/ConnectionString
  • Credential/Default
  • Credential/PrivateKey

@Sylfwood Sylfwood temporarily deployed to test-application May 30, 2025 16:22 — with GitHub Actions Inactive
@rbstp rbstp requested a review from Copilot May 30, 2025 19:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the credentials entry implementation to support multiple subtypes by introducing a generic Entry model, dynamic JSON (un)marshalling, and a unified EntryCredentialService.

  • Introduce Entry with a factory-based JSON unmarshaller to handle various credential subtypes.
  • Migrate keyword parsing helpers into utils.go for reuse.
  • Replace the old EntryUserCredentialService with the new generic EntryCredentialService and bump version to 0.12.0.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
utils.go Adds keywordsToSlice and sliceToKeywords for parsing and formatting tag strings.
entries.go Defines generic Entry type, EntryData interface, factories, and JSON (un)marshalling logic.
entry_credential.go Implements EntryCredentialService supporting default and access-code subtypes.
authentication.go Updates client initialization to use the new Credential service.
VERSION Bumps package version from 0.11.0 to 0.12.0.
Comments suppressed due to low confidence (4)

utils.go:9

  • [nitpick] The variable name spacedTag is ambiguous; consider renaming it to something like inQuotes or insideQuote for clearer intent.
var spacedTag bool

utils.go:28

  • Consider adding unit tests for sliceToKeywords to verify correct quoting behavior for tags that contain spaces.
func sliceToKeywords(kw []string) string {

entry_credential.go:102

  • Typo in function name: Enpoint should be Endpoint to match the constant entryPublicEndpoint.
func entryPublicEnpointReplacer(vaultId string, entryId string) string {

entry_credential.go:107

  • Typo in function name: Enpoint should be Endpoint to match the constant entryBasePublicEndpoint.
func entryPublicBaseEnpointReplacer(vaultId string) string {

@Sylfwood Sylfwood temporarily deployed to test-application June 2, 2025 19:22 — with GitHub Actions Inactive
@Sylfwood Sylfwood requested a review from a team as a code owner June 2, 2025 19:31
@Sylfwood Sylfwood temporarily deployed to test-application June 2, 2025 19:31 — with GitHub Actions Inactive
@Sylfwood Sylfwood temporarily deployed to test-application June 2, 2025 19:35 — with GitHub Actions Inactive
@Sylfwood Sylfwood temporarily deployed to test-application June 2, 2025 19:41 — with GitHub Actions Inactive
@Sylfwood Sylfwood temporarily deployed to test-application June 3, 2025 13:54 — with GitHub Actions Inactive
@Sylfwood Sylfwood requested a review from rbstp June 3, 2025 14:45
Copy link
Contributor

@rbstp rbstp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Sylfwood Sylfwood merged commit d842443 into master Jun 3, 2025
1 check passed
@Sylfwood Sylfwood deleted the devops/secret branch June 3, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants