(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:
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.(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.
(client-auth-info config request)Get map of client authentication info for the client. Map has the following keys:
java.security.cert.X509Certificate object or nilParameters:
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(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.
(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
(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.
(header-cert->pem header-cert)Convert the header cert value into a PEM string
Convert the header cert value into a PEM string
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
(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
(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.
(pem->certs pem)Convert a pem string into certificate objects
Convert a pem string into certificate objects
(response->map response)Converts a JRubyPuppetResponse instance to a map.
Converts a JRubyPuppetResponse instance to a map.
(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.
Return a map with default info for an unauthenticated client
Return a map with default info for an unauthenticated client
(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.
(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.
(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.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |