OpenSSL::Cipher::CipherError: Unable to read encrypted data after gdk reset-data --fast
Overview
Users of gdk reset-data --fast are unable to read encrypted columns:
/home/ubuntu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/encryptor-3.0.0/lib/encryptor.rb:98:in `final': OpenSSL::Cipher::CipherError
from /home/ubuntu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/encryptor-3.0.0/lib/encryptor.rb:98:in `crypt'
from /home/ubuntu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/encryptor-3.0.0/lib/encryptor.rb:49:in `decrypt'
This is because the downloaded package only includes SQL dump and is missing gitlab/config/secrets.yml.
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate (optional)
gdk reset-data --fast- Access encrypted column via Rails console
Ci::Runner.all.map(&:token)
OpenSSL::Cipher::CipherError:
from /home/peter/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/encryptor-3.0.0/lib/encryptor.rb:98:in `final'
Proposal (optional)
Bundle gitlab/config/secrets.yml as per of gdk_preseeded_db package used by gdk reset-data --fast.
Environment (optional)
- Operating system name:
<!-- output of `uname -a` command --> - Architecture:
<!-- output of `arch` or `uname -m` command --> - The contents of your
gdk.yml(if any) - Ruby version:
<!-- output of `ruby --version` command --> - GDK version:
<!-- output of `git rev-parse --short HEAD` command -->
Edited by Kev Kloss