-
Notifications
You must be signed in to change notification settings - Fork 95
feat(secretserver): use official secretserver library #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
23f577f to
0d0c416
Compare
|
Hm, I don't get the lint issue. The file is formatted using the vs code golang extension. |
There was a problem hiding this 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_TOKEN→TSS_TOKEN,SECRETSERVER_URL→TSS_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 |
| if field, ok := secret.Field(fieldName); ok { | ||
| return field, nil | ||
| } else { | ||
| return "", fmt.Errorf("cannot find field %s in secret %s", fieldName, secretID) | ||
| } |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
09a65a2 to
9847351
Compare
| "strconv" | ||
| "strings" | ||
|
|
||
| "github.com/helmfile/vals/pkg/api" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and a blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a9c53c2 to
197c554
Compare
| return httpjson.New(l, provider), nil | ||
| case "scaleway": | ||
| return scaleway.New(l, provider), nil | ||
| case "secretserver": |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
197c554 to
752ec95
Compare
Signed-off-by: Dargel, Philipp <philipp.dargel@governikus.de>
752ec95 to
fbc43b7
Compare
I discovered that the vendor provides an official library. So I replaced the raw http implementation with that.
Additional changes:
tssin code and environment variables.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.