fix: bearer token encryption (#1524)

* fix: bearer token encryption

* remove some todos
This commit is contained in:
Livio Amstutz
2021-04-06 08:31:18 +02:00
committed by GitHub
parent 18aec74222
commit 27fcf4739d
9 changed files with 26 additions and 21 deletions

View File

@@ -131,7 +131,8 @@ func (k *KeyRepository) refreshSigningKey(ctx context.Context, key *model.KeyVie
}
signingKey, err := model.SigningKeyFromKeyView(key, k.KeyAlgorithm)
if err != nil {
return false, err
logging.Log("EVENT-HJd92").WithError(err).Error("signing key cannot be decrypted -> immediate refresh")
return k.refreshSigningKey(ctx, nil, keyCh, algorithm)
}
k.currentKeyID = signingKey.ID
k.currentKeyExpiration = key.Expiry

View File

@@ -107,7 +107,8 @@ func Start(conf Config, authZ authz.Config, systemDefaults sd.SystemDefaults, co
IAMID: systemDefaults.IamID,
},
eventstore.TokenRepo{
View: view,
View: view,
Eventstore: es,
},
eventstore.KeyRepository{
View: view,