Blame doc/plugindev/hostrealm.rst

Packit fd8b60
.. _hostrealm_plugin:
Packit fd8b60
Packit fd8b60
Host-to-realm interface (hostrealm)
Packit fd8b60
===================================
Packit fd8b60
Packit fd8b60
The host-to-realm interface was first introduced in release 1.12.  It
Packit fd8b60
allows modules to control the local mapping of hostnames to realm
Packit fd8b60
names as well as the default realm.  For a detailed description of the
Packit fd8b60
hostrealm interface, see the header file
Packit fd8b60
``<krb5/hostrealm_plugin.h>``.
Packit fd8b60
Packit fd8b60
Although the mapping methods in the hostrealm interface return a list
Packit fd8b60
of one or more realms, only the first realm in the list is currently
Packit fd8b60
used by callers.  Callers may begin using later responses in the
Packit fd8b60
future.
Packit fd8b60
Packit fd8b60
Any mapping method may return KRB5_PLUGIN_NO_HANDLE to defer
Packit fd8b60
processing to a later module.
Packit fd8b60
Packit fd8b60
A module can create and destroy per-library-context state objects
Packit fd8b60
using the **init** and **fini** methods.  If the module does not need
Packit fd8b60
any state, it does not need to implement these methods.
Packit fd8b60
Packit fd8b60
The optional **host_realm** method allows a module to determine
Packit fd8b60
authoritative realm mappings for a hostname.  The first authoritative
Packit fd8b60
mapping is used in preference to KDC referrals when getting service
Packit fd8b60
credentials.
Packit fd8b60
Packit fd8b60
The optional **fallback_realm** method allows a module to determine
Packit fd8b60
fallback mappings for a hostname.  The first fallback mapping is tried
Packit fd8b60
if there is no authoritative mapping for a realm, and KDC referrals
Packit fd8b60
failed to produce a successful result.
Packit fd8b60
Packit fd8b60
The optional **default_realm** method allows a module to determine the
Packit fd8b60
local default realm.
Packit fd8b60
Packit fd8b60
If a module implements any of the above methods, it must also
Packit fd8b60
implement **free_list** to ensure that memory is allocated and
Packit fd8b60
deallocated consistently.