PreviousNext

Default Client Authentication Steps

Once a client has inherited or created a validated identity, the only step required is to call rpc_binding_set_auth_info( ). The client must supply a server principal name as an argument to this call.

Clients can inquire for the principal identity of a server by calling rpc_mgmt_inq_server_princ_name( ). If the client does not care about the principal identity of the server, the returned value can be supplied to rpc_binding_set_auth_info( ) without further ado. If the client will only accept certain server identities, then it needs to check the returned value against the acceptable ones.

The list of acceptable values must be obtained and maintained by the client by some means of its own choosing: for example, a principal name could be obtained from an environment variable. The only security issue here is that the client must be sure that the list of acceptable values is a legitimate one. For example, it must not be stored in such a way that a false server can modify it.

The task of maintaining a list of acceptable principal names can be simplified somewhat by having all acceptable principals belong to a single group that is maintained by some trusted authority, such as a system administrator. The client then needs to maintain only the name of the group, rather than the whole list of principal names. To be sure that the server is authentic, the client need only check the principal name returned by rpc_mgmt_inq_server_princ_name( ) against the group by calling sec_rgy_pgo_is_member( ).

The following code fragment demonstrates this scheme.

More:

The is_valid_principal Routine