Uses Kerberos/GSSAPI to authenticate and encrypt messages
@param [String,URI] endpoint the WinRM webservice endpoint @param [String] realm the Kerberos realm we are authenticating to @param [String<optional>] service the service name, default is HTTP @param [String<optional>] keytab the path to a keytab file if you are using one
# File lib/winrm/http/transport.rb, line 91 def initialize(endpoint, realm, service = nil, keytab = nil, opts) super(endpoint) # Remove the GSSAPI auth from HTTPClient because we are doing our own thing auths = @httpcli.www_auth.instance_variable_get('@authenticator') auths.delete_if {|i| i.is_a?(HTTPClient::SSPINegotiateAuth)} service ||= 'HTTP' @service = "#{service}/#{@endpoint.host}@#{realm}" init_krb end
# File lib/winrm/http/transport.rb, line 105 def send_request(msg) original_length = msg.length pad_len, emsg = winrm_encrypt(msg) hdr = { "Connection" => "Keep-Alive", "Content-Type" => "multipart/encrypted;protocol=\"application/HTTP-Kerberos-session-encrypted\";boundary=\"Encrypted Boundary\"" } body = --Encrypted Boundary\rContent-Type: application/HTTP-Kerberos-session-encrypted\rOriginalContent: type=application/soap+xml;charset=UTF-8;Length=#{original_length + pad_len}\r--Encrypted Boundary\rContent-Type: application/octet-stream\r#{emsg}--Encrypted Boundary\r r = @httpcli.post(@endpoint, body, hdr) winrm_decrypt(r.http_body.content) end
Generated with the Darkfish Rdoc Generator 2.