Skip to content

Commit d555219

Browse files
authored
Merge pull request #1495 from smallstep/mariano/client-authentication
Do not require client authentication if not enabled
2 parents 48e8a11 + c8fd9a7 commit d555219

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3232

3333
### Changed
3434

35+
- Do not create an identity token if it's not enabled (smallstep/cli#1495).
36+
3537
### Deprecated
3638

3739
### Removed

command/ssh/ssh.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ func loginOnUnauthorized(ctx *cli.Context) (ca.RetryFunc, error) {
187187
return false
188188
}
189189

190+
// Check if client authentication is required.
191+
version, err := client.Version()
192+
if err != nil {
193+
return fail(err)
194+
}
195+
if !version.RequireClientAuthentication {
196+
return false
197+
}
198+
190199
// Generate OIDC token
191200
tok, err := flow.GenerateIdentityToken(ctx)
192201
if err != nil {

0 commit comments

Comments
 (0)