Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Update AWS Go SDK To v1.25.35 #307

Merged

Conversation

Tensho
Copy link
Contributor

@Tensho Tensho commented Dec 14, 2020

I'd expect aws-okta tolerates STS regional endpoint feature. For some reason, this configuration setting doesn't work with the current AWS Go SDK version – v1.25.25. Empirically, I have established that AWS Go SDK v1.25.35 fixes this issue.

Sample Application

package main

import (
	"fmt"
	"os"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/endpoints"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/sts"
)

func main() {
	conf := &aws.Config{
		Region: aws.String("us-east-1"),
		STSRegionalEndpoint: endpoints.RegionalSTSEndpoint,
	}
	conf.WithLogLevel(aws.LogDebugWithHTTPBody)

	sess := session.Must(session.NewSession(conf))
	svc := sts.New(sess)

	_, err := svc.GetCallerIdentity(&sts.GetCallerIdentityInput{})
	if err != nil {
		fmt.Fprintf(os.Stderr,"STS GetCallerIdentity API call failed: %s", err)
	}
}

Expected Behaviour

aws-go-sdk: v1.25.35 - current

$ go run main.go
2020/12/14 16:35:22 DEBUG: Request sts/GetCallerIdentity Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: sts.us-east-1.amazonaws.com

Actual Behaviour

aws-go-sdk: v1.25.25 - v1.25.35

$ go run main.go
2020/12/14 16:35:22 DEBUG: Request sts/GetCallerIdentity Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: sts.amazonaws.com

Considerations

I've updated AWS Go SDK conservatively. We may bump aws-go-sdk to the latest version if there are no breaking changes present.

@Tensho Tensho force-pushed the fix-sts-regional-endpoint-support branch 2 times, most recently from e8e9b67 to 1846338 Compare December 14, 2020 15:10
Fixes STS regional endpoint support.
@Tensho Tensho force-pushed the fix-sts-regional-endpoint-support branch 2 times, most recently from 2132220 to a671dc5 Compare December 14, 2020 15:27
Copy link
Contributor

@nickatsegment nickatsegment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thank you.

@nickatsegment
Copy link
Contributor

There's no real good way to test this thoroughly without getting in front of people. Let's do it. If it breaks, I'll revert.

@nickatsegment nickatsegment merged commit 37d8632 into segmentio:master Dec 14, 2020
@Tensho Tensho deleted the fix-sts-regional-endpoint-support branch December 15, 2020 08:37
@Tensho
Copy link
Contributor Author

Tensho commented Dec 15, 2020

@nickatsegment Thank you for the quick response. Would you mind releasing this stuff to homebrew?

@nickatsegment
Copy link
Contributor

@Tensho that's up to the community :)

arohter added a commit to TiVo/aws-okta that referenced this pull request Feb 19, 2021
* Calculate OktaClient Content-Length correctly (segmentio#300)

Fixes: segmentio#298

* Update issue templates

* Fix cred process expiration (segmentio#303)

* Added Ubuntu 2020 (Focal) to Makefile.release (segmentio#304)

* disable github releases (currently broken) (segmentio#305)

* Update AWS Go SDK To v1.25.35 (segmentio#307)

Fixes STS regional endpoint support.

* Add STS Regional Endpoint Support To Other STS Clients (segmentio#308)

* Update keyring to v1.1.6 (segmentio#309)

Recent versions of kwallet have removed the old support for the kde4
compatible kwallet dbus interface. This means newer kde5 based
OS installs (e.g. kubuntu 20.04) can no longer use the kwallet backend
with aws-okta.

This was fixed upstream in the keyring lib back in 2019 but the
dependency hasn't been bumped since then.

Co-authored-by: Will Gardner <willg@rdner.io>
Co-authored-by: Nick Irvine <nick@segment.com>
Co-authored-by: Zoltán Reegn <zoltan.reegn@gmail.com>
Co-authored-by: Yossi Eliaz <zozo123@users.noreply.github.com>
Co-authored-by: Andrew Babichev <andrew.babichev@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants