Liking cljdoc? Tell your friends :D

puppetlabs.services.request-handler.request-handler-core


as-jruby-requestclj

(as-jruby-request config request)

Given a ring HTTP request, return a new map that contains all of the data needed by the ruby HTTP layer to process it. This function does a couple things that are a bit weird:

  • It reads the entire request body into memory. This is not ideal for performance and memory usage, but we have to ship this thing over to JRuby, so I don't think there's any way around this.
  • It also extracts the client DN and certificate and includes that in the map it returns, because it's needed by the ruby layer. It is possible that the HTTPS termination has happened external to Puppet Server. If so, then the DN, authentication status, and, optionally, the certificate will be provided by HTTP headers.
Given a ring HTTP request, return a new map that contains all of the data
needed by the ruby HTTP layer to process it.  This function does a couple
things that are a bit weird:
   * It reads the entire request body into memory.  This is not ideal for
     performance and memory usage, but we have to ship this thing over to
     JRuby, so I don't think there's any way around this.
   * It also extracts the client DN and certificate and includes that
     in the map it returns, because it's needed by the ruby layer.  It is
     possible that the HTTPS termination has happened external to Puppet
     Server.  If so, then the DN, authentication status, and, optionally, the
     certificate will be provided by HTTP headers.
sourceraw docstring

build-request-handlerclj

(build-request-handler jruby-service config current-code-id)

Build the main request handler fn for JRuby requests.

Build the main request handler fn for JRuby requests.
sourceraw docstring

client-auth-infoclj

(client-auth-info config request)

Get map of client authentication info for the client. Map has the following keys:

  • :client-cert - A java.security.cert.X509Certificate object or nil
  • :client-cert-cn - The CN (Common Name) of the client, typically associated with the CN attribute from the Distinguished Name in an X.509 certificate's Subject.
  • :authenticated - A boolean representing whether or not the client is considered to have been successfully authenticated.

Parameters:

  • config - Map of configuration data
  • request - Ring request containing client data
Get map of client authentication info for the client.  Map has the following
keys:

* :client-cert - A `java.security.cert.X509Certificate` object or nil
* :client-cert-cn - The CN (Common Name) of the client, typically associated
                    with the CN attribute from the Distinguished Name
                    in an X.509 certificate's Subject.
* :authenticated - A boolean representing whether or not the client is
                   considered to have been successfully authenticated.

Parameters:

* config - Map of configuration data
* request - Ring request containing client data
sourceraw docstring

config->request-handler-settingsclj

(config->request-handler-settings {:keys [puppetserver master]})

Given an entire Puppet Server configuration map, return only those keys which are required by the request handler service.

Given an entire Puppet Server configuration map, return only those keys
which are required by the request handler service.
sourceraw docstring

header-auth-infoclj

(header-auth-info header-dn-name header-dn-val header-auth-name header-auth-val)

Return a map with authentication info based on header content

Return a map with authentication info based on header content
sourceraw docstring

header-certclj

(header-cert header-cert-val)

Return an X509Certificate or nil from a string encoded for transmission in an HTTP header.

Return an X509Certificate or nil from a string encoded for transmission
in an HTTP header.
sourceraw docstring

header-cert->pemclj

(header-cert->pem header-cert)

Convert the header cert value into a PEM string

Convert the header cert value into a PEM string
sourceraw docstring

header-client-cert-nameclj

Name of the HTTP header through which a client certificate can be passed for a request

Name of the HTTP header through which a client certificate can be passed
for a request
sourceraw docstring

jruby-request-handlerclj

(jruby-request-handler config current-code-id)

Build a request handler fn that processes a request using a JRubyPuppet instance

Build a request handler fn that processes a request using a JRubyPuppet instance
sourceraw docstring

make-request-mutableclj

(make-request-mutable request)

Make the request mutable. This is required by the ruby layer.

Make the request mutable.  This is required by the ruby layer.
sourceraw docstring

pem->certsclj

(pem->certs pem)

Convert a pem string into certificate objects

Convert a pem string into certificate objects
sourceraw docstring

response->mapclj

(response->map response)

Converts a JRubyPuppetResponse instance to a map.

Converts a JRubyPuppetResponse instance to a map.
sourceraw docstring

ssl-auth-infoclj

(ssl-auth-info ssl-client-cert)

Get map of client authentication info from the supplied java.security.cert.X509Certificate object. If the supplied object is nil, the information returned would represent an 'unauthenticated' client.

Get map of client authentication info from the supplied
`java.security.cert.X509Certificate` object.  If the supplied object is nil,
the information returned would represent an 'unauthenticated' client.
sourceraw docstring

unauthenticated-client-infoclj

Return a map with default info for an unauthenticated client

Return a map with default info for an unauthenticated client
sourceraw docstring

unmunge-http-header-nameclj

(unmunge-http-header-name setting)

Given the value of a Puppet setting which contains a munged HTTP header name, convert it to the actual header name in all lower-case.

Given the value of a Puppet setting which contains a munged HTTP header name,
convert it to the actual header name in all lower-case.
sourceraw docstring

update-body-for-jrubyclj

(update-body-for-jruby request)

Converts the body from a request into a String if it is a form encoding. Otherwise, just returns back the same body InputStream.

Converts the body from a request into a String if it is a form encoding.
Otherwise, just returns back the same body InputStream.
sourceraw docstring

with-code-idclj

(with-code-id current-code-id request)

Wraps the given request with the current-code-id, if it contains a :include-code-id? key with a truthy value. current-code-id is passed the environment from the request from it is invoked.

Wraps the given request with the current-code-id, if it contains a
:include-code-id? key with a truthy value.  current-code-id is passed the
environment from the request from it is invoked.
sourceraw docstring

wrap-params-for-jrubyclj

(wrap-params-for-jruby request)

Pull parameters from the URL query string and/or urlencoded form POST body into the ring request map. Includes some special processing for a request destined for JRubyPuppet.

Pull parameters from the URL query string and/or urlencoded form POST
body into the ring request map.  Includes some special processing for
a request destined for JRubyPuppet.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close