Skip to content

Commit bc6d4b1

Browse files
committed
fix(auth): Auth via AKV config using keyfactor-auth-client-go
Signed-off-by: spbsoluble <[email protected]>
1 parent 668f372 commit bc6d4b1

File tree

6 files changed

+223
-929
lines changed

6 files changed

+223
-929
lines changed

.github/workflows/keyfactor-bootstrap-workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,4 @@ jobs:
223223
token: ${{ secrets.V2BUILDTOKEN}}
224224
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
225225
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
226-
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
227-
GITHUB_TOKEN: ${{ secrets.V2BUILDTOKEN }}
226+
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}

cmd/helm_uo.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"log"
2222

23+
"github.com/Keyfactor/keyfactor-auth-client-go/auth_providers"
2324
"github.com/spf13/cobra"
2425
"github.com/spf13/pflag"
2526
"kfutil/pkg/cmdutil"
@@ -171,13 +172,13 @@ func (f *HelmUoFlags) ToOptions(cmd *cobra.Command, args []string) (*HelmUoOptio
171172
}
172173

173174
// Get the command config entry from global flags
174-
commandConfig, _ := authConfigFile(configFile, profile, "", noPrompt, false)
175+
commandConfig, _ := auth_providers.ReadConfigFromJSON(configFile)
175176

176177
// Get the hostname from the command config
177178
entry, ok := commandConfig.Servers[profile]
178179
if ok {
179-
if entry.Hostname != "" {
180-
options.CommandHostname = commandConfig.Servers[profile].Hostname
180+
if entry.Host != "" {
181+
options.CommandHostname = commandConfig.Servers[profile].Host
181182
}
182183
}
183184

0 commit comments

Comments
 (0)