def auth_keyboard_interactive(self, packet): if hasattr(self, '_pamDeferred'): self.transport.sendDisconnect( transport.DISCONNECT_PROTOCOL_ERROR, "only one keyboard interactive attempt at a time") return failure.Failure(error.IgnoreAuthentication()) c = credentials.PluggableAuthenticationModules(self.user, self._pamConv) return self.portal.login(c, None, interfaces.IConchUser)
def _ebCheckKey(self, reason, packet): """ Called back if the user did not sent a signature. If reason is error.ValidPublicKey then this key is valid for the user to authenticate with. Send MSG_USERAUTH_PK_OK. """ reason.trap(error.ValidPublicKey) # if we make it here, it means that the publickey is valid self.transport.sendPacket(MSG_USERAUTH_PK_OK, packet) return failure.Failure(error.IgnoreAuthentication())
def auth_keyboard_interactive(self, packet): """ Keyboard interactive authentication. No payload. We create a PluggableAuthenticationModules credential and authenticate with our portal. """ if self._pamDeferred is not None: self.transport.sendDisconnect( transport.DISCONNECT_PROTOCOL_ERROR, "only one keyboard interactive attempt at a time") return defer.fail(error.IgnoreAuthentication()) c = credentials.PluggableAuthenticationModules(self.user, self._pamConv) return self.portal.login(c, None, interfaces.IConchUser)
def auth_keyboard_interactive(self, packet): """ Keyboard interactive authentication. No payload. We create a PluggableAuthenticationModules credential and authenticate with our portal. Overridden to pass src_ip to credentials.PluggableAuthenticationModulesIP """ if self._pamDeferred is not None: self.transport.sendDisconnect(DISCONNECT_PROTOCOL_ERROR, "only one keyboard interactive attempt at a time") return defer.fail(error.IgnoreAuthentication()) src_ip = self.transport.transport.getPeer().host c = credentials.PluggableAuthenticationModulesIP(self.user, self._pamConv, src_ip) return self.portal.login(c, src_ip, IConchUser).addErrback(self._ebPassword)
def _ebCheckKey(self, reason, packet): reason.trap(error.ValidPublicKey) # if we make it here, it means that the publickey is valid self.transport.sendPacket(MSG_USERAUTH_PK_OK, packet) return failure.Failure(error.IgnoreAuthentication())