From e85f190d8e081fbbfeadca24781266d1c3e1bba1 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Tue, 20 Jan 2015 17:13:34 -0500 Subject: Add request/response logging via cherrypy tool hooks The ability to easily review the HTTP Ipsilon request and response is boon for development and issue debugging. Normally these HTTP conversations occur on SSL/TLS encrypted connections making it difficult to use other tools to view the traffic. Client side tools have known pitfalls (e.g. Firebug) and not all conversations are browser initiated (e.g. SAML ECP). Logging performed by the server hosting Ipsilon makes logging at the server level server specific (e.g. Apache's dumpio requires post-processing the log file to extract and reassamble the HTTP conversation). The best place to log requests and responses is within Ipsilon using the cherrypy framework Ipsilon is embedded in. Cherrypy provides user defined hooks that can be invoked at specific places in the request pipeline. We establish a hook at the last stage just before the response is written to the client, it logs the incoming request and outgoing response. Resolves: https://fedorahosted.org/ipsilon/ticket/44 Signed-off-by: John Dennis Reviewed-by: Simo Sorce --- examples/ipsilon.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'examples') diff --git a/examples/ipsilon.conf b/examples/ipsilon.conf index eddde2f..e89f970 100644 --- a/examples/ipsilon.conf +++ b/examples/ipsilon.conf @@ -1,5 +1,6 @@ [global] debug = True +tools.log_request_response.on = False template_dir = "templates" log.screen = True -- cgit