Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 078429851 for ; Sat, 1 Oct 2011 21:06:14 +0000 (UTC) Received: (qmail 53693 invoked by uid 500); 1 Oct 2011 21:06:13 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 53611 invoked by uid 500); 1 Oct 2011 21:06:13 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 53603 invoked by uid 99); 1 Oct 2011 21:06:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 21:06:12 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of suneetshah2000@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bw0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 21:06:04 +0000 Received: by bkbzv15 with SMTP id zv15so4352782bkb.18 for ; Sat, 01 Oct 2011 14:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=aHg68jXLKL2EWNbG4zhjJmyZQqtTbMkrKITWQm9S8AY=; b=blMbnTM7SKrrhLlQB8Kxk2oiM3C8cVAbgx93dlHMH1x5Pd0xEpJ+BR3GSmRrDJrjhn Qx2yW75Wx4EBKzttfLpIAEhv9Gi5iyfD9yYYaR/Rc90U2Bq1QR3FRY0jfQiE5+I7NMkQ A1iJTXx/sy8zI/yfCaIiP4yuea377Py4AzE/s= MIME-Version: 1.0 Received: by 10.223.59.136 with SMTP id l8mr7862432fah.96.1317503144489; Sat, 01 Oct 2011 14:05:44 -0700 (PDT) Received: by 10.223.95.203 with HTTP; Sat, 1 Oct 2011 14:05:44 -0700 (PDT) Date: Sat, 1 Oct 2011 17:05:44 -0400 Message-ID: Subject: Developing Authn/Authz Modules From: Suneet Shah To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=00151747b650eaf4b504ae431a46 X-Virus-Checked: Checked by ClamAV on apache.org --00151747b650eaf4b504ae431a46 Content-Type: text/plain; charset=ISO-8859-1 Hello, I am trying to build my apache module which needs to carry out authentication and authorization functions based on the value of a cookie. To start with, I have just created a shell with the intent that I wanted the functions for authentication and authorization being called. However, it does not appear that these functions are being called. I have pasted by configuration and code below. When I try to access http://localhost/test_rpc/ I get the login.html that is defined in my ErrorDocument below. But when I look in the log file, I see the following. Since its looking for a userId, I am wondering if there is an error in my configuration [Sat Oct 01 16:37:29 2011] [debug] prefork.c(996): AcceptMutex: sysvsem (default: sysvsem) [Sat Oct 01 16:38:08 2011] [error] [client 127.0.0.1] access to /test_rpc/header.jsp failed, reason: verification of user id '' not configured Any guidance on what I am doing wrong would be greatly appreciate. Regards Suneet -- Configuration in Httpd.conf IAM_CookieName IAM_PARAM IAM_TokenParam tkn IAM_Service_base_url "http://localhost:8080/" ErrorDocument 401 "/login.html" AuthType IAMToken AuthName "IAM Login" AuthCookie_Authoritative On ProxyPass http://localhost:9080/test_rpc require tkn ----- Module Code static int authz_dbd_check(request_rec *r) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "authz_dbd_check called"); return HTTP_OK; } static int check_token(request_rec *r) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "chedk_token called."); return OK; } static void authz_dbd_hooks(apr_pool_t *p) { ap_hook_auth_checker(check_token, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_auth_checker(authz_dbd_check, NULL, NULL, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA authz_dbd_module = { STANDARD20_MODULE_STUFF, authz_dbd_cr_cfg, NULL, NULL, NULL, authz_dbd_cmds, authz_dbd_hooks }; --00151747b650eaf4b504ae431a46--