Bug 1331689

Summary: hammer command is not able to authenticate using the IPA user account.
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.8CC: anerurka, bbuckingham, bkearney, daniele, kshirsal, mgazdik, mtenheuv, plassen
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-14 12:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ranjan Kumar 2016-04-29 09:23:01 UTC
Description of problem: To integrate IPA with Red Hat Satellite v 6.1, followed the instruction of "User Guide" section/chapter 20.2 at https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.1/html/User_Guide/sect-Red_Hat_Satellite-User_Guide-Configuring_External_Authentication-Using_Identity_Management.html.
         
After integration of Satellite with an IPA. The IPA account user is able to login through the Satellite User interface, but the same user is not able to execute hammer commands. It fails with error "Invalid username or password"

Version-Release number of selected component (if applicable): 6.1.8

How reproducible: Always

Actual results: It fails with an error  "Invalid username or password"

Expected results: It should allow IPA user to execute hammer command

Comment 1 Peter F. Lassen 2016-05-27 09:22:52 UTC
Have the same problem :

[ERROR 2016-05-27 11:18:39 Exception] Invalid username or password
Invalid username or password
[ERROR 2016-05-27 11:18:39 Exception]

RestClient::Unauthorized (401 Unauthorized):
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    /usr/share/ruby/net/http.rb:852:in `start'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
    /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `call_client'
    /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:210:in `http_call'
    /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:160:in `call'
    /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/resource.rb:14:in `call'
    /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:185:in `send_request'
    /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:271:in `send_request'
    /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:303:in `retrieve_all'
    /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:287:in `execute'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.11/bin/hammer:108:in `<top (required)>'
    /bin/hammer:23:in `load'
    /bin/hammer:23:in `<main>'

Comment 2 Peter F. Lassen 2016-05-27 09:41:01 UTC
(In reply to Peter F. Lassen from comment #1)
> Have the same problem :
> 
> [ERROR 2016-05-27 11:18:39 Exception] Invalid username or password
> Invalid username or password
> [ERROR 2016-05-27 11:18:39 Exception]
> 
> RestClient::Unauthorized (401 Unauthorized):
>    
> /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:
> 48:in `return!'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
> `process_result'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in
> `block in transmit'
>     /usr/share/ruby/net/http.rb:852:in `start'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in
> `transmit'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in
> `execute'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in
> `execute'
>     /usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in
> `get'
>    
> /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:
> in `call_client'
>    
> /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:210:
> in `http_call'
>    
> /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:160:
> in `call'
>    
> /usr/share/gems/gems/apipie-bindings-0.0.11/lib/apipie_bindings/resource.rb:
> 14:in `call'
>    
> /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/apipie/command.rb:43:
> in `send_request'
>    
> /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/
> commands.rb:185:in `send_request'
>    
> /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/
> commands.rb:271:in `send_request'
>    
> /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/
> commands.rb:303:in `retrieve_all'
>    
> /usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/
> commands.rb:287:in `execute'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
>    
> /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in
> `run'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in
> `execute'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
>    
> /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in
> `run'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in
> `execute'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
>    
> /usr/share/gems/gems/hammer_cli-0.1.4.11/lib/hammer_cli/abstract.rb:23:in
> `run'
>     /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
>     /usr/share/gems/gems/hammer_cli-0.1.4.11/bin/hammer:108:in `<top
> (required)>'
>     /bin/hammer:23:in `load'
>     /bin/hammer:23:in `<main>'

Sorry not relevant, did use the password from the IPA and not the satellite server :-)

Comment 6 Bryan Kearney 2016-07-26 18:58:49 UTC
Moving 6.2 bugs out to sat-backlog.