Skip to content
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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.17.55
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.55.5
github.com/aws/aws-sdk-go-v2/service/iam v1.35.0
github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4
github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1
github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0
github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5
github.com/aws/aws-sdk-go-v2/service/sts v1.33.10
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 h1:xIjTizH74aMNQBjp9D5cvjRZmOYt
github.com/aws/aws-sdk-go-v2/service/iam v1.35.0/go.mod h1:IdHqqRLKgxYR4IY7Omd7SuV4SJzJ8seF+U5PW+mvtP4=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 h1:icyZwij1BqzyW5yZGcfHIftrPogK9LgiWt08B1IYyWQ=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4/go.mod h1:NPEyhoIDtRHby3oWpLFUdGrfbMwM8f/4u57VdtRdH8g=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1 h1:XzFSBprF2qH/HU3rj0sb19fMizHBdXzNdrKJ5BaFoKc=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1/go.mod h1:lVt7GOrew2aoiZQwbEYLNo12LZdonRJ3AWt6uUYp5PI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 h1:EP1ITDgYVPM2dL1bBBntJ7AW5yTjuWGz9XO+CZwpALU=
Expand Down
18 changes: 14 additions & 4 deletions pkg/connector/sso_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,20 @@ func (o *ssoUserResourceType) List(ctx context.Context, _ *v2.ResourceId, pt *pa
l := ctxzap.Extract(ctx)
rv := make([]*v2.Resource, 0, len(resp.Users))
for _, user := range resp.Users {
status, err := o.scimClient.getUserStatus(ctx, awsSdk.ToString(user.UserId))
if err != nil {
// getUserStatus returns UserTrait_Status_STATUS_UNSPECIFIED in error case, and we don't want to fail sync if we fail to get status for one user.
l.Debug("aws-connector: failed to get user status from scim", zap.Error(err), zap.String("user_id", awsSdk.ToString(user.UserId)))
// Check the UserStatus field from the Identity Store API first.
// Fall back to SCIM only if the status is still unspecified.
var status v2.UserTrait_Status_Status
switch user.UserStatus {
case awsIdentityStoreTypes.UserStatusEnabled:
status = v2.UserTrait_Status_STATUS_ENABLED
case awsIdentityStoreTypes.UserStatusDisabled:
status = v2.UserTrait_Status_STATUS_DISABLED
default:
status, err = o.scimClient.getUserStatus(ctx, awsSdk.ToString(user.UserId))
if err != nil {
// getUserStatus returns UserTrait_Status_STATUS_UNSPECIFIED in error case, and we don't want to fail sync if we fail to get status for one user.
l.Debug("aws-connector: failed to get user status from scim", zap.Error(err), zap.String("user_id", awsSdk.ToString(user.UserId)))
}
}
userARN := ssoUserToARN(o.region, awsSdk.ToString(o.identityInstance.IdentityStoreId), awsSdk.ToString(user.UserId))
annos := &v2.V1Identifier{
Expand Down
274 changes: 274 additions & 0 deletions vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading