Skip to content

Commit

Permalink
simplify fix_auth tests
Browse files Browse the repository at this point in the history
There is an issue in the way that encryption keys work.
You can sometimes decrypt a string that has been encoded with a different passkey.
You will get the wrong value out, but the system thinks that it succeeded.

Even though the odds of this are very low, since we run managiq so many times, we
run across it as a sporadic test failure.

This is an issue and we're removing the offending tests.
This functionality is tested in the `manageiq-password` gem.
  • Loading branch information
kbrock committed Sep 27, 2024
1 parent de72e9e commit a5440c5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions spec/tools/fix_auth/auth_model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@
expect { subject.fix_passwords(bad, options) }.to raise_error(ManageIQ::Password::PasswordError)
end

it "should replace for bad encryption" do
subject.fix_passwords(bad, options.merge(:invalid => "other"))
expect(bad.password).to be_encrypted("other")
end

context "with the rare case where recryption succeeds but returns garbage" do
# NOTE: This legacy key only returns garbage specifically with the
# built-in v2_key.dev and the plaintext string "password", which is
Expand Down

0 comments on commit a5440c5

Please sign in to comment.