https://bz.apache.org/bugzilla/show_bug.cgi?id=68282

            Bug ID: 68282
           Summary: Variables of AuthDBDUserPWQuery
                    'AUTHENTICATE_<column-name>' are not available when
                    mod_authn_dbd is used with mod_authz_dbd.
           Product: Apache httpd-2
           Version: 2.4.57
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_authz_dbd
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hi all,

We find out that all variables generated autmatically from DB Select query by
AuthDBDUserPWQuery (usually called 'AUTHENTICATE_<column-name>'), are not
available when mod_authn_dbd is used with mod_authz_dbd.

In this configuration example environment variable 'AUTHENTICATE_ADDR' is empty
or not available:
        <Proxy *>
          AuthType Basic
          AuthName "Apache AuthDB PoC"
          AuthBasicProvider dbd

          AuthDBDUserPWQuery "SELECT token,user,addr FROM tokens.token WHERE
user = %s"

         Require dbd-login
         AuthzDBDQuery "UPDATE tokens.token SET login_count=(login_count+1)
WHERE user = %s"

          <RequireAll>
            Require valid-user
            <RequireAny>
              Require expr "env('AUTHENTICATE_ADDR') == ''"
              Require expr "env('AUTHENTICATE_ADDR') == 'physical'"
              Require expr "env('AUTHENTICATE_ADDR') == 'digital'"
            </RequireAny>
          </RequireAll>

        </Proxy>

In the other hand, if we remove next lines from previous example,
'AUTHENTICATE_ADDR' environment variable is available and it comes filled with
its value:
         Require dbd-login
         AuthzDBDQuery "UPDATE tokens.token SET login_count=(login_count+1)
WHERE user = %s"

We think that it might be a little bug where mod_authz_dbd module overlap or
removes the environment variables created by AuthDBDUserPWQuery statement.

Thank you for your support.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to