Bug 1175682

Summary: Cannot clone repositories from Business Central over ssh:// protocol
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Alexandre Porcelli <porcelli>
Status: CLOSED EOL QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.1.0CC: alazarot, jlocker, kverlaen, lpetrovi
Target Milestone: ER5Keywords: Regression, Reopened, TestBlocker
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:42:40 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122594, 1128815    

Description Jiri Locker 2014-12-18 11:37:29 UTC
Description of problem:
Attempt to clone any repository managed by Business Central over SSH ends like this:

> $ git clone -v ssh://admin.0.1:8001/system
> Cloning into 'system'...
> Password authentication
> Password: 
> Invalid credentials.fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.

Although server log inidicates successful authentication:

> 12:25:05,201 INFO  [org.apache.sshd.server.session.ServerSession] (sshd-SshServer[45ebea8a]-nio2-thread-5) Server session created from /127.0.0.1:58070
> 12:25:05,202 INFO  [org.apache.sshd.server.session.ServerSession] (sshd-SshServer[45ebea8a]-nio2-thread-5) Kex: server->client aes128-ctr hmac-md5 none
> 12:25:05,202 INFO  [org.apache.sshd.server.session.ServerSession] (sshd-SshServer[45ebea8a]-nio2-thread-5) Kex: client->server aes128-ctr hmac-md5 none
> 12:25:07,132 INFO  [org.apache.sshd.server.session.ServerUserAuthService] (sshd-SshServer[45ebea8a]-nio2-thread-4) Session admin@/127.0.0.1:58070 authenticated
> 12:25:07,135 INFO  [org.apache.sshd.server.channel.ChannelSession] (sshd-SshServer[45ebea8a]-nio2-thread-5) Executing command: git-upload-pack '/system'


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

How reproducible:
-

Steps to Reproduce:
1. Launch Business Central deployed on EAP.
2. Run git clone -v ssh://<admin_user>@127.0.0.1:8001/system where admin_user is a user with admin role. (It may be neccessary to remove an old 127.0.0.1 host fingerprint from ~/.ssh/known_hosts and confirm the new fingerprint.)

Actual results:
Authentication phase fails on clinet, cloning does not start.

Expected results:
Repository should be cloned successfully.

Additional info:
Worked in ER2.

Comment 1 Jiri Locker 2014-12-18 11:45:11 UTC
Cloning using git:// protocol works (git clone git://127.0.0.1:9418/system).

Comment 2 Alexandre Porcelli 2014-12-23 19:58:47 UTC
It works for me, are you sure you have the expected roles?

Comment 3 Jiri Locker 2015-01-12 14:55:37 UTC
Yes, I have a user named 'admin' with password 'admin' and role 'admin'.

Java (EAP runtime):
  java.vendor = Oracle Corporation
  java.version = 1.7.0_71

git version 1.9.3

Any other information you would need? Please move the bug to MODIFIED if you believe it has been fixed, so that we can verify it in the next build. The problem may not manifest in community builds or may depend on certain environment. It exists in the product though and we need to investigate.

Comment 4 Alexandre Porcelli 2015-01-14 11:38:47 UTC
Fixed now, I couldn't reproduce before as my admin user on EAP was configured `wrongly` - here the fix:

(6.2.x) http://github.com/droolsjbpm/kie-wb-common/commit/7766ba998
(master) http://github.com/droolsjbpm/kie-wb-common/commit/85ce29770

Comment 5 Jiri Locker 2015-02-19 12:36:48 UTC
Fix verified. Users with any of admin, analyst or developer roles are able to clone repositories.