lib/puppet/network/http/webrick/rest.rb
# Retrieve node/cert/ip information from the request object.
Retrieve node/cert/ip information from the request object.
Retrieve node / cert / ip information from the request object .
def client_information(request)
    result = {}
    if peer = request.peeraddr and ip = peer[3]
      result[:ip] = ip
    end
    result[:authenticated] = false
    if cert = request.client_cert and cn = Puppet::Util::SSL.cn_from_subject(cert.subject)
      result[:node] = cn
      result[:authenticated] = true
    else
      result[:node] = resolve_node(result)
    end
    result
  end
def client_information ( request ) result = { } if peer = request . peeraddr and ip = peer [ 3 ] result [ :ip ] = ip end result [ :authenticated ] = false if cert = request . client_cert and cn = Puppet :: Util :: SSL . cn_from_subject ( cert . subject ) result [ :node ] = cn result [ :authenticated ] = true else result [ :node ] = resolve_node ( result ) end result end
Retrieve node/cert/ip information from the request object.
Retrieve node / cert / ip information from the request object .
# If they have a certificate (which will almost always be true) # then we get the hostname from the cert, instead of via IP # info
request
<not_specific>