[ 
https://issues.apache.org/jira/browse/SSHD-1254?focusedWorklogId=745344&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745344
 ]

ASF GitHub Bot logged work on SSHD-1254:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Mar/22 18:27
            Start Date: 21/Mar/22 18:27
    Worklog Time Spent: 10m 
      Work Description: lgoldstein commented on a change in pull request #213:
URL: https://github.com/apache/mina-sshd/pull/213#discussion_r831419997



##########
File path: 
sshd-core/src/main/java/org/apache/sshd/client/auth/pubkey/UserAuthPublicKey.java
##########
@@ -321,10 +331,19 @@ protected boolean processAuthDataRequest(ClientSession 
session, String service,
                                                                              + 
ByteArrayBuffer.DEFAULT_SIZE + Long.SIZE);
         buffer.putString(username);
         buffer.putString(service);
-        buffer.putString(name);
+        Integer hostBoundPubKeyVersion = 
session.getAttribute(DefaultClientKexExtensionHandler.HOSTBOUND_AUTHENTICATION);
+        boolean doHostBoundAuth = hostBoundPubKeyVersion != null && 
hostBoundPubKeyVersion.intValue() == 0;
+        if (doHostBoundAuth) {
+            buffer.putString(HostBoundPubkeyAuthentication.AUTH_NAME);
+        } else {
+            buffer.putString(name);
+        }
         buffer.putBoolean(true);
         buffer.putString(algo);
         buffer.putPublicKey(pubKey);
+        if (doHostBoundAuth) {

Review comment:
       I think the log message should include the correctly used algorithm name 
if *doHostBoundAuth* is *true*




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 745344)
    Time Spent: 0.5h  (was: 20m)

> Support host-based pubkey authentication in the client
> ------------------------------------------------------
>
>                 Key: SSHD-1254
>                 URL: https://issues.apache.org/jira/browse/SSHD-1254
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Thomas Wolf
>            Assignee: Thomas Wolf
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a variation of the normal pubkey authentication that also includes 
> the server's public host key in the SSH_MSG_USERAUTH_REQUEST message.
> See
>  * [https://www.openssh.com/agent-restrict.html#authverify]
>  * [https://github.com/openssh/openssh-portable/blob/807be686/PROTOCOL#L347]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to