Skip to content

Commit

Permalink
add comment on signer cache lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
nklaassen committed Jan 24, 2025
1 parent a4e56e9 commit 913b93b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/vnet/client_application_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ type clientApplicationService struct {

appProvider appProvider

// mu protects appSignerCache
mu sync.Mutex
// appSignerCache caches the crypto.Signer for each certificate issued by
// ReissueAppCert so that SignForApp can later use that signer.
//
// Signers are never deleted from the map. When the cert expires, the local
// proxy in the admin process will detect the cert expiry and call
// ReissueAppCert, which will overwrite the signer for the app with a new
// one.
appSignerCache map[appKey]crypto.Signer
}

Expand Down

0 comments on commit 913b93b

Please sign in to comment.