SSH

Authorized Keys on a Windows Network Drive

Tectia Server supports storing domain users' authorized keys (and authorization files) on a network drive.

Because the user's network drives are restored only after the user has been fully authenticated, the path to the authorized keys directory must be specified in UNC format, for example:

\\server.my-company.com\dfs\authorized_keys

Tectia Server is accessing the network drive from a thread impersonating the user who is logging on. The impersonation token is obtained via Microsoft Kerberos extension Service for User to Self (S4U2self)[1]. Therefore, the computer domain account is acting on behalf of the user.

To enable access to network resources this way, the following requirements must be met:

Example configuration:

<authentication-methods login-grace-time="600">
  <authentication name="Default-Authentication" action="allow" password-cache="no">
    <auth-publickey 
      authorized-keys-directory="\\server.my-company.com\dfs\authorized_keys\%U" 
      require-dns-match="no" />
    <auth-password failure-delay="2" max-tries="3" />
    <auth-gssapi allow-ticket-forwarding="no" />
    <auth-keyboard-interactive failure-delay="2" max-tries="3">
      <submethod-password />
    </auth-keyboard-interactive>
  </authentication>
</authentication-methods>


[1] S4U2self is an extension that allows a service to obtain a Kerberos service ticket to itself. The service ticket contains the user's groups and can therefore be used in authorization decisions.