Skip to content

Commit 9a2a37a

Browse files
committed
enable spelling linters and fix spelling mistakes
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 23064ac commit 9a2a37a

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

pkg/agent/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func InitAgentCmdFlags(c *cobra.Command, cfg *AgentCmdFlags) {
350350
}
351351

352352
// TLSPKMode controls how to authenticate to TLSPK / Jetstack Secure. Only one
353-
// TLSPKMode may be provided if using using those backends.
353+
// TLSPKMode may be provided if using those backends.
354354
type TLSPKMode string
355355

356356
const (

pkg/agent/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ func Test_ValidateAndCombineConfig(t *testing.T) {
634634
assert.Equal(t, true, got.MachineHubMode)
635635
})
636636

637-
t.Run("machinehub + venafi-cloud-keypair-auth should work simultanously", func(t *testing.T) {
637+
t.Run("machinehub + venafi-cloud-keypair-auth should work simultaneously", func(t *testing.T) {
638638
t.Setenv("POD_NAMESPACE", "venafi")
639639
t.Setenv("KUBECONFIG", withFile(t, fakeKubeconfig))
640640
privKeyPath := withFile(t, fakePrivKeyPEM)

pkg/internal/cyberark/identity/advance_authentication_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
2424
MechanismID: successMechanismID,
2525
SessionID: successSessionID,
2626
TenantID: "foo",
27-
PersistantLogin: true,
27+
PersistentLogin: true,
2828
},
2929

3030
expectedError: nil,
@@ -37,7 +37,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
3737
MechanismID: successMechanismID,
3838
SessionID: successSessionID,
3939
TenantID: "foo",
40-
PersistantLogin: true,
40+
PersistentLogin: true,
4141
},
4242

4343
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -50,7 +50,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
5050
MechanismID: successMechanismID,
5151
SessionID: successSessionID,
5252
TenantID: "foo",
53-
PersistantLogin: true,
53+
PersistentLogin: true,
5454
},
5555

5656
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -63,7 +63,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
6363
MechanismID: "foo",
6464
SessionID: successSessionID,
6565
TenantID: "foo",
66-
PersistantLogin: true,
66+
PersistentLogin: true,
6767
},
6868

6969
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -76,20 +76,20 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
7676
MechanismID: successMechanismID,
7777
SessionID: "foo",
7878
TenantID: "foo",
79-
PersistantLogin: true,
79+
PersistentLogin: true,
8080
},
8181

8282
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
8383
},
84-
"persistant login not set": {
84+
"persistent login not set": {
8585
username: successUser,
8686
password: []byte(successPassword),
8787
advanceBody: advanceAuthenticationRequestBody{
8888
Action: ActionAnswer,
8989
MechanismID: successMechanismID,
9090
SessionID: successSessionID,
9191
TenantID: "foo",
92-
PersistantLogin: false,
92+
PersistentLogin: false,
9393
},
9494

9595
expectedError: fmt.Errorf("got unexpected status code 403 Forbidden from request to advance authentication in CyberArk Identity API"),

pkg/internal/cyberark/identity/identity.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ type advanceAuthenticationRequestBody struct {
156156
// get the Identity API URL, but we set it anyway to be explicit.
157157
TenantID string `json:"TenantId"`
158158

159-
// PersistantLogin is documented to "[indicate] whether the session should persist after the user
159+
// PersistentLogin is documented to "[indicate] whether the session should persist after the user
160160
// closes the browser"; for service-to-service auth which we're trying to do, we set this to true.
161-
PersistantLogin bool `json:"PersistantLogin"`
161+
PersistentLogin bool `json:"PersistentLogin"`
162162
}
163163

164164
// advanceAuthenticationResponseResult is the specific information returned for a successful AdvanceAuthentication call
@@ -370,7 +370,7 @@ func (c *Client) doStartAuthentication(ctx context.Context, username string) (ad
370370
response.MechanismID = mechanism.MechanismID
371371
response.SessionID = startAuthResponse.Result.SessionID
372372
response.TenantID = c.subdomain
373-
response.PersistantLogin = true
373+
response.PersistentLogin = true
374374

375375
return response, nil
376376
}

pkg/internal/cyberark/identity/mock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ func (mis *mockIdentityServer) handleAdvanceAuthentication(w http.ResponseWriter
189189
// Important: The actual server will return 200 OK even if the login fails.
190190
// Most failure responses should copy that.
191191

192-
if !advanceBody.PersistantLogin {
192+
if !advanceBody.PersistentLogin {
193193
// this is something we enforce but wouldn't actually be an error from
194194
// a real server, so we return a different error here
195195
w.WriteHeader(http.StatusForbidden)
196-
_, _ = w.Write([]byte(`expected PersistantLogin to be true`))
196+
_, _ = w.Write([]byte(`expected PersistentLogin to be true`))
197197
return
198198
}
199199

pkg/internal/cyberark/identity/start_authentication_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ func Test_IdentityStartAuthentication(t *testing.T) {
8888
t.Errorf("expected advanceAuthenticationRequestBody.Action to be %s but got %s", ActionAnswer, advanceBody.Action)
8989
}
9090

91-
if !advanceBody.PersistantLogin {
92-
t.Error("expected advanceAuthenticationRequestBody.PersistantLogin to be true but it wasn't")
91+
if !advanceBody.PersistentLogin {
92+
t.Error("expected advanceAuthenticationRequestBody.PersistentLogin to be true but it wasn't")
9393
}
9494

9595
})

0 commit comments

Comments
 (0)