Skip to content

Conversation

@pd-gov
Copy link
Contributor

@pd-gov pd-gov commented Dec 29, 2025

I discovered that the vendor provides an official library. So I replaced the raw http implementation with that.

Additional changes:

The changes are tested against an on-prem instance. The library also allows easier use with their cloud offering. Support is implemented but could not be tested.

@pd-gov
Copy link
Contributor Author

pd-gov commented Dec 29, 2025

Hm, I don't get the lint issue. The file is formatted using the vs code golang extension.

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 pull request modernizes the SecretServer provider by migrating from a raw HTTP API implementation to the official Delinea TSS SDK (github.com/DelineaXPM/tss-sdk-go/v3). The provider identifier is changed from "secretserver" to "tss" to align with the SDK naming conventions and External Secrets Operator implementation.

Key Changes:

  • Replaced custom HTTP client implementation with the official Delinea TSS SDK v3.0.1
  • Changed provider identifier from "secretserver" to "tss" with corresponding environment variable updates (e.g., SECRETSERVER_TOKENTSS_TOKEN, SECRETSERVER_URLTSS_SERVER_URL)
  • Enhanced secret lookup capability to support both numeric IDs and secret names, aligning with External Secrets Operator patterns

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vals.go Updated provider constant from "secretserver" to "tss" and simplified provider initialization to return error directly
pkg/stringprovider/stringprovider.go Updated case statement from "secretserver" to "tss" to match new provider identifier
pkg/providers/secretserver/secretserver.go Complete rewrite using official SDK: replaced ~100 lines of HTTP client code with ~20 lines using the TSS SDK, added support for name-based secret lookup
go.mod Added dependency on github.com/DelineaXPM/tss-sdk-go/v3 v3.0.1
go.sum Added checksums for the new TSS SDK dependency
README.md Updated documentation with new TSS_* environment variables, improved configuration examples for both on-prem and cloud deployments, and added limitations section

Comment on lines +50 to 55
if field, ok := secret.Field(fieldName); ok {
return field, nil
} else {
return "", fmt.Errorf("cannot find field %s in secret %s", fieldName, secretID)
}
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The else branch is unnecessary after a return statement. The code can be simplified by removing the else and unindenting the error return, which improves readability and follows Go best practices.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

@pd-gov pd-gov force-pushed the feature/secretserver branch 2 times, most recently from 09a65a2 to 9847351 Compare January 2, 2026 09:22
"strconv"
"strings"

"github.com/helmfile/vals/pkg/api"
Copy link
Member

Choose a reason for hiding this comment

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

and a blank line.

Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov pd-gov force-pushed the feature/secretserver branch 3 times, most recently from a9c53c2 to 197c554 Compare January 2, 2026 09:44
return httpjson.New(l, provider), nil
case "scaleway":
return scaleway.New(l, provider), nil
case "secretserver":
Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov why change secretserver to tss? this is a beaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to align the naming scheme with that used by the vendor. I though this was Okay, since the Provider was introduced just a few days ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yxxhero I can change it back if you prefere

Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov maybe we can add alias. like : case "tss" "secretserver"

Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov Or add some notes?

Copy link
Contributor Author

@pd-gov pd-gov Jan 2, 2026

Choose a reason for hiding this comment

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

@yxxhero What do you mean by adding notes? In the readme?

My assumption was, that no one was actually using the secretserver provider yet, since I added it just before Christmas. To bad there already is a release containing the longer name.

Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov you are right. so we can use new name. I will add the changes in the release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yxxhero The current version contains your proposed aliases. Should I keep that in for backwards compatibility?

Copy link
Member

Choose a reason for hiding this comment

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

@pd-gov Using new name is ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yxxhero Okay, I removed the alias again.

@pd-gov pd-gov force-pushed the feature/secretserver branch from 197c554 to 752ec95 Compare January 2, 2026 14:35
Signed-off-by: Dargel, Philipp <philipp.dargel@governikus.de>
@pd-gov pd-gov force-pushed the feature/secretserver branch from 752ec95 to fbc43b7 Compare January 2, 2026 14:50
@yxxhero yxxhero merged commit 6914dae into helmfile:main Jan 3, 2026
5 checks passed
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