assh/assh_userauth_server.h header reference

Description [link] 

This header file defines events which are reported to the application when the assh_service_userauth_server service is running. This service module is an implementation of the server side user authentication protocol.

This standard service described in rfc4252 is implemented as a pluggable service module for libassh.

See also assh/assh_userauth.h and User authentication methods.

Members [link] 

Types [link] 

Constant [link] 

Members detail [link] 

struct assh_event_userauth_server_hostbased_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 194.

This event is reported when the server-side user authentication service is running and the client has selected the hostbased method.

The host public key host_key must be searched in the list of authorized keys for the spcified hostname user on this server. The found field must be updated accordingly before calling the assh_event_done function.

See also ASSH_EVENT_USERAUTH_SERVER_HOSTBASED.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that the client wants to run. (ro)
struct assh_key_s *const host_key;The host public key transmitted by the client. (ro)
const struct assh_cbuffer_s hostname;The host name transmitted by the client. (ro)
const struct assh_cbuffer_s host_username;The host user name transmitted by the client. (ro)
assh_bool_t found;Used to acknowledge that the key is authorized. (rw)

struct assh_event_userauth_server_kbinfo_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 236.

This event is reported when the server-side user authentication service is running and the client has selected the keyboard interactive method.

Most fields are used to build the SSH_MSG_USERAUTH_INFO_REQUEST message that will be sent to the client. An array of prompt strings must be provided when the count field is set to a value greater than 0. The echos field is a bitmap which indicates user entered values that should be displayed.

The allocation of the array is not handled by the library. This allows passing a statically allocated array of prompts. It can be released after calling the assh_event_done function.

A keyboard responses event should follow, unless the client has selected a new method.

See also ASSH_EVENT_USERAUTH_SERVER_KBINFO.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that the client wants to run. (ro)
const struct assh_cbuffer_s sub;The sub-method name transmitted by the client. (ro)
struct assh_cbuffer_s name;Used to store the name transmitted to the client. (rw)
struct assh_cbuffer_s instruction;Used to store the instructions transmitted to the client. (rw)
uint32_t echos;Used to indicate the fields that must be echoed. (rw)
uint_fast8_t count;Used to indicate the number of fields. (rw)
const struct assh_cbuffer_s * prompts;Must point to an array of prompt strings. (rw)

struct assh_event_userauth_server_kbresponse_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 287.

This event is reported when the server-side user authentication service is running and the client has replied to a previous SSH_MSG_USERAUTH_INFO_REQUEST message by sending a SSH_MSG_USERAUTH_INFO_RESPONSE message.

The result field must be updated in order to make the authentication succeed or continue with an other info request.

The allocation of the responses array is handled by the library.

See also ASSH_EVENT_USERAUTH_SERVER_KBRESPONSE and ASSH_EVENT_USERAUTH_SERVER_KBINFO.

FieldDescription
const uint_fast8_t count;The number of fields. (ro)
const struct assh_cbuffer_s * responses;The array of responses transmitted by the client. (ro)
enum assh_event_userauth_server_kbstatus_e result;Used to decide what to do next. (rw)

enum assh_event_userauth_server_kbstatus_e [link] 

This enum is declared in assh/assh_userauth_server.h source file, line 264.

See also struct assh_event_userauth_server_kbresponse_s.

IdentifierDescription
ASSH_SERVER_KBSTATUS_FAILUREIndicates keyboard authentication failure.
ASSH_SERVER_KBSTATUS_SUCCESSIndicates keyboard authentication success.
ASSH_SERVER_KBSTATUS_CONTINUEIndicates that more fields queries must be transmitted.

struct assh_event_userauth_server_methods_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 71.

This event is reported when the server-side user authentication service is running and some authentication methods must be selected.

The failed field indicates the authentication method that just failed. It is zero when the event is reported for the first time.

Some implemented methods are initially selected as default. The number of authentication retries left can be checked and changed.

This event is not reported again if the failure is due to the client requesting a method which has not been selected.

A banner message will be sent if the banner buffer size is changed to a value greater than zero.

See also ASSH_EVENT_USERAUTH_SERVER_METHODS.

FieldDescription
const enum assh_userauth_methods_e failed;The last failed method. (ro)
enum assh_userauth_methods_e methods;The methods that will be proposed to the client. (rw)
uint_fast8_t retries;The number of allowed retries. (rw)
struct assh_cbuffer_s banner;The banner text may be stored here when used. (rw)
struct assh_cbuffer_s bnlang;The banner language tag. (rw)

struct assh_event_userauth_server_none_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 97.

This event is reported when the server-side user authentication service is running and the client has selected the none method.

The accept field must be updated before calling the assh_event_done function.

See also ASSH_EVENT_USERAUTH_SERVER_NONE.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that the client wants to run. (ro)
assh_bool_t accept;Accept login without credential when true. (rw)

struct assh_event_userauth_server_password_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 160.

This event is reported when the server-side user authentication service is running and the client has selected the password method.

The user name and password pair must be checked and the success field must be updated accordingly before calling the assh_event_done function.

The client requests a password change when the size of the new_password buffer is not 0. The server can require this behavior for the next password event by setting the pwchange field. In this case the prompt and lang fields may also be updated.

See also ASSH_EVENT_USERAUTH_SERVER_PASSWORD.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that the client wants to run. (ro)
const struct assh_cbuffer_s password;The current password transmitted by the client. (ro)
const struct assh_cbuffer_s new_password;The new password transmitted by the client. (ro)
struct assh_cbuffer_s change_prompt;A prompt string for the password change request. (rw)
struct assh_cbuffer_s change_lang;The prompt language tag. (rw)
enum assh_event_userauth_server_pwstatus_s result;Used to acknowledge that the password is correct. (rw)

enum assh_event_userauth_server_pwstatus_s [link] 

This enum is declared in assh/assh_userauth_server.h source file, line 135.

See also struct assh_event_userauth_server_password_s.

IdentifierDescription
ASSH_SERVER_PWSTATUS_FAILUREIndicates password authentication failure.
ASSH_SERVER_PWSTATUS_SUCCESSIndicates password authentication success.
ASSH_SERVER_PWSTATUS_CHANGEIndicates that a password change request must be transmitted.

struct assh_event_userauth_server_success_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 310.

This event is reported when an user authentication request is successful. The method field indicates which method has been used successfully.

The methods field is initially set to zero but can be updated in order to report a partial success to the client and continue the authentication process.

The sign_safety field indicates the lowest safety factor value of user key signature seen at this point.

See also ASSH_EVENT_USERAUTH_SERVER_SUCCESS.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that will be started. (ro)
const enum assh_userauth_methods_e method;Indicates the successfull authentication method. (ro)
enum assh_userauth_methods_e methods;May be updated to continue with multi-factor authentication. (rw)
const assh_safety_t sign_safety:8;The safety factor of authentication signatures. (ro)

union assh_event_userauth_server_u [link] 

struct assh_event_userauth_server_userkey_s [link] 

This struct is declared in assh/assh_userauth_server.h source file, line 119.

This event is reported when the server-side user authentication service is running and the client has selected the user public key method.

The user public key pub_key must be searched in the list of authorized keys for the user on this server. The found field must be updated accordingly before calling the assh_event_done function.

See also ASSH_EVENT_USERAUTH_SERVER_USERKEY.

FieldDescription
const struct assh_cbuffer_s username;The user name transmitted by the client. (ro)
const struct assh_service_s *const service;A pointer to the service that the client wants to run. (ro)
struct assh_key_s *const pub_key;The user public key provided by the client. (ro)
assh_bool_t found;Acknowledge that the key is authorized when true. (rw)

const struct assh_service_s assh_service_userauth_server [link] 

This constant is declared in assh/assh_userauth_server.h source file, line 342.

This constant implements the standard server side ssh-userauth service.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:30:45 2020 using MkDoc