On 30.07.21 15:20 , Sheshu Vadrevu wrote:
We are using apache mina sftp library to implement sftp server.
We need your help in understanding how we can support DUAL Authentication(both 
public key and password).

I noticed,

public interface ServerAuthenticationManager has
[...]
     String AUTH_METHODS = "auth-methods";

But I couldn’t find the right place to set this.

In sshd 2.7.0, this is CoreModuleProperties.AUTH_METHODS.

We need to set this flag on user to user basis.

Look at how and where it is used. You'll find ServerUserAuthService. From looking at that code: it does not out of the box support different settings per user.

If I had to do this, I'd install my own implementation of ServerUserAuthService (which would require having my own ServerUserAuthServiceFactory, too) and implement it to use the username from the SSH_MSG_USERAUTH_REQUEST to figure out which authentication mechanisms to allow or require.

HTH,

  Thomas



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

Reply via email to