Bug 1450217 - The credentials for Automate Git Repository wasn't updating the correct authentications type
Summary: The credentials for Automate Git Repository wasn't updating the correct authe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.7.3
Assignee: mkanoor
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On: 1445522
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 21:14 UTC by Satoe Imaishi
Modified: 2017-06-28 15:02 UTC (History)
9 users (show)

Fixed In Version: 5.7.3.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1445522
Environment:
Last Closed: 2017-06-28 15:02:38 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1601 0 normal SHIPPED_LIVE Important: CFME 5.7.3 security, bug fix and enhancement update 2017-06-28 18:51:52 UTC

Comment 2 CFME Bot 2017-05-11 21:21:14 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/388a8199d5a2cfb1335d8fb2d0f02027470d96f8

commit 388a8199d5a2cfb1335d8fb2d0f02027470d96f8
Author:     Martin Povolny <mpovolny@redhat.com>
AuthorDate: Wed Apr 26 08:52:34 2017 +0200
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Thu May 11 17:17:51 2017 -0400

    Merge pull request #1157 from mkanoor/set_default_type_for_auth
    
    Incorrect authentication_type being used
    (cherry picked from commit 7d6d8c94029f5ac45275559713788e473280be22)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1450217

 app/services/git_repository_service.rb       | 2 +-
 spec/services/git_repository_service_spec.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 3 Milan Falešník 2017-06-12 13:00:46 UTC
Reproducer steps are unclear, I am trying to reproduce the erroneous behaviour on 5.7.2.1 and from the description of the bug I cannot figure out what should I look for since when I import a github repo without credentials via rake and then I try to do the same repo in the UI but I specify bad credentials, it just simply works.

Comment 4 mkanoor 2017-06-14 16:15:26 UTC
This requires creating the credential from 2 different sources
(1) rake command
(2) UI

The UI wasn't setting the same authtype as the rake command.

If you check the credential count you should see only one for the GitRepository.
Without this fix in you would have seen 2.

From a rails console, if you have a single GitRepository you can run this command

GitRepository.first.authentications.collect(&:authtype)

Without the fix the result would be ["default", "values"]

With the fix it should be just ["default"]

In an existing environment where you have run this previously we won't delete the "values" authentication type, it would sit around we won't use it.

Comment 5 Milan Falešník 2017-06-16 09:29:03 UTC
I can see only the ["default"] in 5.7.3.1 when using both rake and UI import.

Comment 7 errata-xmlrpc 2017-06-28 15:02:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1601


Note You need to log in before you can comment on or make changes to this bug.