Test that proper KAS cookie encryptor is used
From MR comment !104504 (comment 1291503509) by @rutgerwessels
:
These specs test the encryption/decryption symmetry. I think we should also test the implementation here. If I replace the implementation by weak encryption (Base64 for example), the specs will also pass.
But I think that will lead to extracting the private
encryptor
into aGitlab::Kas::UserAccess::Encryptor
so that can be part of a follow up
The goal here is to test that the KAS cookie is encrypted using the encryptor we expect it to.
Implementation Details
- Extract private encryptor from
lib/gitlab/kas/user_access.rb
to a separate module - Use that encryptor in
lib/gitlab/kas/user_access.rb
- Test encryptor in separate spec
- Test that this encryptor is used in
lib/gitlab/kas/user_access.rb