Skip to content

Commit 18f9505

Browse files
authored
Add Duo MFA to Okta IdP client (#68)
* Add Duo MFA to Okta IdP client * Add a "waiting for push mfa" prompt for Duo MFA with Okta client * Update versions for dependencies Update go module dependency versions Update go linter version Update circleci orb versions Fix new linter findings
1 parent d75c86f commit 18f9505

File tree

14 files changed

+448
-115
lines changed

14 files changed

+448
-115
lines changed

.circleci/config.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
version: 2.1
55

66
orbs:
7-
go: circleci/go@1.5.0
8-
aws-cli: circleci/aws-cli@1.3.2
9-
ruby: circleci/ruby@1.1.2
10-
windows: circleci/windows@2.4.0
7+
go: circleci/go@1.7.0
8+
aws-cli: circleci/aws-cli@1.4.1
9+
ruby: circleci/ruby@1.2.0
10+
windows: circleci/windows@2.4.1
1111

1212
jobs:
1313
lint:
1414
docker:
15-
- image: "golangci/golangci-lint:v1.37"
15+
- image: "golangci/golangci-lint:v1.41"
1616

1717
steps:
1818
- checkout
@@ -124,6 +124,7 @@ jobs:
124124

125125
environment:
126126
AWS_SHARED_CREDENTIALS_FILE: build/aws_credentials
127+
AWS_DEFAULT_REGION: us-east-1
127128

128129
steps:
129130
- run: mkdir -p build

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $(BUILDDIR)/%:
6464
# docker run --rm -e VER=$(VER) -v ${PWD}:/build --entrypoint /build/scripts/package.sh debian:stretch
6565

6666
lint:
67-
docker run --rm -v $${PWD}:/app -w /app -t golangci/golangci-lint:v1.37 golangci-lint run -v
67+
docker run --rm -v $${PWD}:/app -w /app -t golangci/golangci-lint:v1.41 golangci-lint run -v
6868

6969
clean:
7070
rm -f $(EXE) $(EXE)-*-*-* $(EXE)*.rpm $(EXE)*.deb $(EXE)*.exe

cli/ssm_cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func execSsmPlugin(cfg aws.Config, in *ssm.StartSessionInput) error {
106106
}
107107

108108
var ep aws.Endpoint
109-
ep, err = cfg.EndpointResolver.ResolveEndpoint(ssm.ServiceID, cfg.Region)
109+
ep, err = cfg.EndpointResolverWithOptions.ResolveEndpoint(ssm.ServiceID, cfg.Region)
110110
if err != nil {
111111
return err
112112
}

client/external/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (r *httpRequest) withBody(body io.Reader) *httpRequest {
5555
r.ContentLength = int64(t.Len())
5656
rc = io.NopCloser(t)
5757
case io.ReadCloser:
58-
rc = t.(io.ReadCloser)
58+
rc = t
5959
default:
6060
rc = io.NopCloser(t)
6161
}

client/external/http_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func Test_withBody(t *testing.T) {
100100
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
101101
r.withBody(nil)
102102

103-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength > -1 {
103+
if r.ContentLength > -1 {
104104
t.Error("invalid body")
105105
}
106106
})
@@ -111,7 +111,7 @@ func Test_withBody(t *testing.T) {
111111
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
112112
r.withBody(b)
113113

114-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength != int64(b.Len()) {
114+
if r.ContentLength != int64(b.Len()) {
115115
t.Error("invalid body")
116116
}
117117
})
@@ -122,7 +122,7 @@ func Test_withBody(t *testing.T) {
122122
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
123123
r.withBody(b)
124124

125-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength != int64(b.Len()) {
125+
if r.ContentLength != int64(b.Len()) {
126126
t.Error("invalid body")
127127
}
128128
})
@@ -133,7 +133,7 @@ func Test_withBody(t *testing.T) {
133133
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
134134
r.withBody(b)
135135

136-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength != int64(b.Len()) {
136+
if r.ContentLength != int64(b.Len()) {
137137
t.Error("invalid body")
138138
}
139139
})
@@ -144,7 +144,7 @@ func Test_withBody(t *testing.T) {
144144
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
145145
r.withBody(b)
146146

147-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength > -1 {
147+
if r.ContentLength > -1 {
148148
t.Error("invalid body")
149149
}
150150
})
@@ -155,7 +155,7 @@ func Test_withBody(t *testing.T) {
155155
r, _ := newHttpRequest(context.Background(), http.MethodPost, "http://localhost")
156156
r.withBody(b)
157157

158-
if _, ok := r.Body.(io.ReadCloser); !ok || r.ContentLength > -1 {
158+
if r.ContentLength > -1 {
159159
t.Error("invalid body")
160160
}
161161
})

0 commit comments

Comments
 (0)