Skip to content
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

Okta Dep Update #28121

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin/credential/okta/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/cidrutil"
"github.com/hashicorp/vault/sdk/logical"
"github.com/okta/okta-sdk-golang/v2/okta"
"github.com/okta/okta-sdk-golang/v4/okta"
"github.com/patrickmn/go-cache"
)

Expand Down Expand Up @@ -129,7 +129,7 @@
var result authResult
rsp, err := shim.Do(authReq, &result)
if err != nil {
if oe, ok := err.(*okta.Error); ok {

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

impossible type assertion: err.(*okta.Error)

Check failure on line 132 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

impossible type assertion: err.(*okta.Error)
return nil, logical.ErrorResponse("Okta auth failed: %v (code=%v)", err, oe.ErrorCode), nil, nil
}
return nil, logical.ErrorResponse(fmt.Sprintf("Okta auth failed: %v", err)), nil, nil
Expand Down Expand Up @@ -370,7 +370,7 @@
return policies, oktaResponse, allGroups, nil
}

func (b *backend) getOktaGroups(ctx context.Context, client *okta.Client, user *okta.User) ([]string, error) {

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: okta.Client

Check failure on line 373 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: okta.Client
groups, resp, err := client.User.ListUserGroups(ctx, user.Id)
if err != nil {
return nil, err
Expand All @@ -386,7 +386,7 @@
return nil, err
}
for _, group := range nextGroups {
oktaGroups = append(oktaGroups, group.Profile.Name)

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append

Check failure on line 389 in builtin/credential/okta/backend.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

cannot use group.Profile.Name (variable of type *string) as string value in argument to append
}
}
if b.Logger().IsDebug() {
Expand Down
34 changes: 16 additions & 18 deletions builtin/credential/okta/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
"github.com/hashicorp/vault/sdk/helper/logging"
"github.com/hashicorp/vault/sdk/helper/policyutil"
"github.com/hashicorp/vault/sdk/logical"
"github.com/okta/okta-sdk-golang/v2/okta"
"github.com/okta/okta-sdk-golang/v2/okta/query"
"github.com/okta/okta-sdk-golang/v4/okta"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -115,15 +114,15 @@ func TestBackend_Config(t *testing.T) {

func createOktaGroups(t *testing.T, username string, token string, org string) []string {
orgURL := "https://" + org + "." + previewBaseURL
ctx, client, err := okta.NewClient(context.Background(), okta.WithOrgUrl(orgURL), okta.WithToken(token))
cfg, err := okta.NewConfiguration(okta.WithOrgUrl(orgURL), okta.WithToken(token))
require.Nil(t, err)
client := okta.NewAPIClient(cfg)
ctx := context.Background()

users, _, err := client.User.ListUsers(ctx, &query.Params{
Q: username,
})
users, _, err := client.UserAPI.ListUsers(ctx).Filter(username).Execute()
require.Nil(t, err)
require.Len(t, users, 1)
userID := users[0].Id
userID := users[0].GetId()
var groupIDs []string

// Verify that login's call to list the groups of the user logging in will page
Expand All @@ -133,38 +132,37 @@ func createOktaGroups(t *testing.T, username string, token string, org string) [
// only 200 results are returned for most orgs."
for i := 0; i < 201; i++ {
name := fmt.Sprintf("TestGroup%d", i)
groups, _, err := client.Group.ListGroups(ctx, &query.Params{
Q: name,
})
groups, _, err := client.GroupAPI.ListGroups(ctx).Filter(name).Execute()
require.Nil(t, err)

var groupID string
if len(groups) == 0 {
group, _, err := client.Group.CreateGroup(ctx, okta.Group{
group, _, err := client.GroupAPI.CreateGroup(ctx).Group(okta.Group{
Profile: &okta.GroupProfile{
Name: fmt.Sprintf("TestGroup%d", i),
Name: okta.PtrString(fmt.Sprintf("TestGroup%d", i)),
},
})
}).Execute()
require.Nil(t, err)
groupID = group.Id
groupID = group.GetId()
} else {
groupID = groups[0].Id
groupID = groups[0].GetId()
}
groupIDs = append(groupIDs, groupID)

_, err = client.Group.AddUserToGroup(ctx, groupID, userID)
_, err = client.GroupAPI.AssignUserToGroup(ctx, groupID, userID).Execute()
require.Nil(t, err)
}
return groupIDs
}

func deleteOktaGroups(t *testing.T, token string, org string, groupIDs []string) {
orgURL := "https://" + org + "." + previewBaseURL
ctx, client, err := okta.NewClient(context.Background(), okta.WithOrgUrl(orgURL), okta.WithToken(token))
cfg, err := okta.NewConfiguration(okta.WithOrgUrl(orgURL), okta.WithToken(token))
require.Nil(t, err)
client := okta.NewAPIClient(cfg)

for _, groupID := range groupIDs {
_, err := client.Group.DeleteGroup(ctx, groupID)
_, err := client.GroupAPI.DeleteGroup(context.Background(), groupID).Execute()
require.Nil(t, err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion builtin/credential/okta/path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/tokenutil"
"github.com/hashicorp/vault/sdk/logical"
oktanew "github.com/okta/okta-sdk-golang/v2/okta"
oktanew "github.com/okta/okta-sdk-golang/v4/okta"
)

const (
Expand Down Expand Up @@ -290,17 +290,17 @@
}

type oktaShim interface {
Client() (*oktanew.Client, context.Context)

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: oktanew.Client

Check failure on line 293 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: oktanew.Client
NewRequest(method string, url string, body interface{}) (*http.Request, error)
Do(req *http.Request, v interface{}) (interface{}, error)
}

type oktaShimNew struct {
client *oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: oktanew.Client

Check failure on line 299 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: oktanew.Client
ctx context.Context
}

func (new *oktaShimNew) Client() (*oktanew.Client, context.Context) {

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: oktanew.Client

Check failure on line 303 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: oktanew.Client
return new.client, new.ctx
}

Expand All @@ -319,7 +319,7 @@
client *oktaold.Client
}

func (new *oktaShimOld) Client() (*oktanew.Client, context.Context) {

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: oktanew.Client

Check failure on line 322 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: oktanew.Client
return nil, nil
}

Expand All @@ -344,7 +344,7 @@
}

if c.Token != "" {
ctx, client, err := oktanew.NewClient(ctx,

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: oktanew.NewClient

Check failure on line 347 in builtin/credential/okta/path_config.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: oktanew.NewClient
oktanew.WithOrgUrl("https://"+c.Org+"."+baseURL),
oktanew.WithToken(c.Token))
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions changelog/28121.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
auth/okta: update to okta sdk v4
```
9 changes: 8 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ require (
github.com/mitchellh/reflectwalk v1.0.2
github.com/ncw/swift v1.0.47
github.com/oklog/run v1.1.0
github.com/okta/okta-sdk-golang/v2 v2.20.0
github.com/okta/okta-sdk-golang/v4 v4.1.2
github.com/oracle/oci-go-sdk v24.3.0+incompatible
github.com/ory/dockertest v3.3.5+incompatible
github.com/ory/dockertest/v3 v3.10.0
Expand Down Expand Up @@ -232,8 +232,15 @@ require (
cel.dev/expr v0.15.0 // indirect
cloud.google.com/go/longrunning v0.6.0 // indirect
github.com/containerd/containerd v1.7.20 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/hashicorp/go-secure-stdlib/httputil v0.1.0 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx v1.2.29 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
Expand Down
21 changes: 19 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo=
github.com/denverdino/aliyungo v0.0.0-20170926055100-d3308649c661/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
Expand Down Expand Up @@ -1763,6 +1766,19 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A=
github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y=
github.com/lestrrat-go/blackmagic v1.0.2 h1:Cg2gVSc9h7sz9NOByczrbUvLopQmXrfFx//N+AkAr5k=
github.com/lestrrat-go/blackmagic v1.0.2/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU=
github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=
github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E=
github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=
github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4=
github.com/lestrrat-go/jwx v1.2.29 h1:QT0utmUJ4/12rmsVQrJ3u55bycPkKqGYuGT4tyRhxSQ=
github.com/lestrrat-go/jwx v1.2.29/go.mod h1:hU8k2l6WF0ncx20uQdOmik/Gjg6E3/wIRtXSNFeZuB8=
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU=
github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
Expand Down Expand Up @@ -1910,8 +1926,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/okta/okta-sdk-golang/v2 v2.20.0 h1:EDKM+uOPfihOMNwgHMdno+NAsIfyXkVnoFAYVPay0YU=
github.com/okta/okta-sdk-golang/v2 v2.20.0/go.mod h1:FMy5hN5G8Rd/VoS0XrfyPPhIfOVo78ZK7lvwiQRS2+U=
github.com/okta/okta-sdk-golang/v4 v4.1.2 h1:gSycAYWGrvYeXBW8HakMZnNu/ptMuTvTQ/zZ7lgmtPI=
github.com/okta/okta-sdk-golang/v4 v4.1.2/go.mod h1:01oiHDXvZQHlZo1Uw084VDYwXIqJe19z34b53PBZpUY=
github.com/olekukonko/tablewriter v0.0.0-20180130162743-b8a9be070da4/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down Expand Up @@ -2139,6 +2155,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.162 h1:8fDzz4GuVg4skjY2B0nMN7h6uN61EDVkuLyI2+qGHhI=
Expand Down
30 changes: 15 additions & 15 deletions vault/login_mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/vault/quotas"
"github.com/mitchellh/mapstructure"
"github.com/okta/okta-sdk-golang/v2/okta"
"github.com/okta/okta-sdk-golang/v2/okta/query"
"github.com/okta/okta-sdk-golang/v4/okta"
"github.com/patrickmn/go-cache"
otplib "github.com/pquerna/otp"
totplib "github.com/pquerna/otp/totp"
Expand Down Expand Up @@ -1990,7 +1989,7 @@
return err
}

ctx, client, err := okta.NewClient(ctx,
cfg, err := okta.NewConfiguration(
okta.WithToken(oktaConfig.APIToken),
okta.WithOrgUrl(orgURL.String()),
// Do not use cache or polling MFA will not refresh
Expand All @@ -1999,15 +1998,16 @@
if err != nil {
return fmt.Errorf("error creating client: %s", err)
}
client := okta.NewAPIClient(cfg)

filterField := "profile.login"
if oktaConfig.PrimaryEmail {
filterField = "profile.email"
}
filterQuery := fmt.Sprintf("%s eq %q", filterField, username)
filter := query.NewQueryParams(query.WithFilter(filterQuery))
// filter := query.NewQueryParams(query.WithFilter(filterQuery))

users, _, err := client.User.ListUsers(ctx, filter)
users, _, err := client.UserAPI.ListUsers(client.GetConfig().Context).Filter(filterQuery).Execute()
if err != nil {
return err
}
Expand All @@ -2020,7 +2020,7 @@

user := users[0]

factors, _, err := client.UserFactor.ListFactors(ctx, user.Id)
factors, _, err := client.UserFactorAPI.ListFactors(ctx, *user.Id).Execute()
if err != nil {
return err
}
Expand All @@ -2032,25 +2032,24 @@
var factorFound bool
var userFactor *okta.UserFactor
for _, factor := range factors {
if factor.IsUserFactorInstance() {
userFactor = factor.(*okta.UserFactor)
if userFactor.FactorType == "push" {
factorFound = true
break
}
f := factor.GetActualInstance()
userFactor = f.(*okta.UserFactor)
if *userFactor.FactorType == "push" {
factorFound = true
break
}
}

if !factorFound {
return fmt.Errorf("no push-type MFA factor found for user")
}

result, _, err := client.UserFactor.VerifyFactor(ctx, user.Id, userFactor.Id, okta.VerifyFactorRequest{}, userFactor, nil)
result, _, err := client.UserFactorAPI.VerifyFactor(ctx, user.GetId(), userFactor.GetId()).Execute()
if err != nil {
return err
}

if result.FactorResult != "WAITING" {
if result.GetFactorResult() != "WAITING" {
return fmt.Errorf("expected WAITING status for push status, got %q", result.FactorResult)
}

Expand All @@ -2073,13 +2072,14 @@
for {
// Okta provides an SDK method `GetFactorTransactionStatus` but does not provide the transaction id in
// the VerifyFactor respone. This code effectively reimplements that method.
rq := client.CloneRequestExecutor()
// client.UserFactorAPI.GetFactorTransactionStatus(client.GetConfig().Context, user.GetId(), userFactor.GetId())

req, err := rq.WithAccept("application/json").WithContentType("application/json").NewRequest("GET", url.String(), nil)

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: rq

Check failure on line 2077 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: rq
if err != nil {
return err
}
var result *okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (0)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (4)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (6)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests tagged with testonly / test-go (1)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (16)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (12)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (8)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (15)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (5)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (7)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (2)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (10)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (14)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (11)

undefined: okta.VerifyUserFactorResponse

Check failure on line 2081 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (1)

undefined: okta.VerifyUserFactorResponse
_, err = rq.Do(ctx, req, &result)

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (9)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (13)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (3)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: rq

Check failure on line 2082 in vault/login_mfa.go

View workflow job for this annotation

GitHub Actions / Run Go tests / test-go (0)

undefined: rq
if err != nil {
return err
}
Expand Down
Loading