Skip to content

Commit

Permalink
fix(auth): Auth via AKV config using keyfactor-auth-client-go
Browse files Browse the repository at this point in the history
Signed-off-by: spbsoluble <1661003+spbsoluble@users.noreply.github.com>
  • Loading branch information
spbsoluble committed Nov 18, 2024
1 parent 668f372 commit bc6d4b1
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 929 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/keyfactor-bootstrap-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,4 @@ jobs:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.V2BUILDTOKEN }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
7 changes: 4 additions & 3 deletions cmd/helm_uo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"log"

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

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

// Get the hostname from the command config
entry, ok := commandConfig.Servers[profile]
if ok {
if entry.Hostname != "" {
options.CommandHostname = commandConfig.Servers[profile].Hostname
if entry.Host != "" {
options.CommandHostname = commandConfig.Servers[profile].Host
}
}

Expand Down
Loading

0 comments on commit bc6d4b1

Please sign in to comment.