Skip to content

Commit 5c42f96

Browse files
committed
prevent JWT from being logged
1 parent bc1d72e commit 5c42f96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

path_login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ func (b *backend) loginWithJWT(ctx context.Context, req *logical.Request, token,
293293
Policies: jwtMappings.Policies,
294294
Metadata: map[string]string{
295295
"username": subject.(string),
296-
"jwt": token,
297296
"roles": fmt.Sprintf("%v", claims),
298297
},
299298
LeaseOptions: logical.LeaseOptions{
@@ -304,6 +303,7 @@ func (b *backend) loginWithJWT(ctx context.Context, req *logical.Request, token,
304303
Name: subject.(string),
305304
},
306305
},
306+
Data: map[string]interface{}{"jwt": token},
307307
}
308308
listSlice := jwtMappings.ClaimsList(config.RoleClaim)
309309
for _, item := range listSlice {
@@ -557,4 +557,4 @@ func (b *backend) verifyTrustee(ctx context.Context, rawToken string, trustees [
557557
return claims, claims.Valid()
558558
}
559559
return nil, fmt.Errorf("Error verifying token")
560-
}
560+
}

0 commit comments

Comments
 (0)