forked from TrueCloudLab/frostfs-node
[#1255] node/session: Add encryption
Add `WithEncryption` option that passes ECDSA key to the persistent session storage. It uses 32 bytes from marshalled ECDSA key in ASN.1 DER from in AES-256 algorithm encryption in Galois/Counter Mode. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
a884ad56d9
commit
01ed366e99
6 changed files with 111 additions and 11 deletions
|
@ -33,7 +33,7 @@ func (s *TokenStore) Create(ctx context.Context, body *session.CreateRequestBody
|
|||
return nil, err
|
||||
}
|
||||
|
||||
value, err := packToken(body.GetExpiration(), &sk.PrivateKey)
|
||||
value, err := s.packToken(body.GetExpiration(), &sk.PrivateKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue