mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-12-02 15:22:18 +00:00
3dd7c2a590
xcatd fills _xcat_clienthost and _xcat_clientfqdn from a reverse lookup of the client socket, so both are empty when that lookup fails, however good the client credentials are. A plugin that asks only for the peer host therefore cannot identify a node whose certificate names it correctly. xCAT::DiscoveryUtils::request_client_names returns the names a request offers, most trustworthy first: the peer host, its fully qualified form, then _xcat_authname, which is the name in the validated client certificate and does not depend on name resolution. The request's own node attribute is excluded on purpose -- a client sends it, so it states what the client wants to be rather than what it proved it is, and postscripts carry the cluster root ssh key. xCAT-test/unit/getpostscript_client_identity.t drives the routine directly: the request hash is its only input and a list of names its only output. It fails on five mutants of the routine, each naming the assertion it breaks -- the certificate name dropped (2 checks), the empty-name guard dropped (1), the client-supplied node offered (3), the de-duplication dropped (2), and the array-ref guard dropped (1). Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT is a toolkit for the deployment and administration of clusters. xCAT documentation is available at: http://xcat-docs.readthedocs.org/ xCAT is made available as open source software under the EPL license: http://www.opensource.org/licenses/eclipse-1.0.php