An authentication module for Apache httpd using JSON Web Tokens
Other
79
stars
46
forks
source link
We are able to generate the token but not able to set the required environment variables with data stored in DB. Used AuthJWTProvider dbd technique #70
Code Snippet:
<Location /gettoken>
SetHandler jwt-login-handler
AuthJWTProvider dbd
AuthDBDUserPWQuery "SELECT password, cn as SSL_CLIENT_S_DN_CN, ou as SSL_CLIENT_S_DN_OU, o as SSL_CLIENT_S_DN_O from dbo.USER_CERT_VIEW where userName = %s" --> as user name is not passing along with URL, not sure whether this query will help us to set required ENV variables
Tried to set the username explicitly with the below code. (Note: Sent user name as query param)
<Location /gettoken>
SetHandler jwt-login-handler
AuthJWTProvider dbd
Rewriteengine On
RewriteCond %{QUERY_STRING} ^(?:.&)?username=(.)$
RewriteRule ^ - [env=username:%1]
Header set TokenH %{username}e
AuthDBDUserPWQuery "SELECT password, cn as SSL_CLIENT_S_DN_CN, ou as SSL_CLIENT_S_DN_OU, o as SSL_CLIENT_S_DN_O from dbo.USER_CERT_VIEW where userName = %{username}e"
Getting error with above query. Could you please suggest me on the usage of query in case of AuthJWTProvider dbd as i didn't get any example to refer.
Declaimer: I doesn't have prior knowledge on Apache HttpD server.
Code Snippet: <Location /gettoken> SetHandler jwt-login-handler AuthJWTProvider dbd AuthDBDUserPWQuery "SELECT password, cn as SSL_CLIENT_S_DN_CN, ou as SSL_CLIENT_S_DN_OU, o as SSL_CLIENT_S_DN_O from dbo.USER_CERT_VIEW where userName = %s" --> as user name is not passing along with URL, not sure whether this query will help us to set required ENV variables
Tried to set the username explicitly with the below code. (Note: Sent user name as query param) <Location /gettoken> SetHandler jwt-login-handler AuthJWTProvider dbd Rewriteengine On RewriteCond %{QUERY_STRING} ^(?:.&)?username=(.)$ RewriteRule ^ - [env=username:%1] Header set TokenH %{username}e AuthDBDUserPWQuery "SELECT password, cn as SSL_CLIENT_S_DN_CN, ou as SSL_CLIENT_S_DN_OU, o as SSL_CLIENT_S_DN_O from dbo.USER_CERT_VIEW where userName = %{username}e"
Getting error with above query. Could you please suggest me on the usage of query in case of AuthJWTProvider dbd as i didn't get any example to refer. Declaimer: I doesn't have prior knowledge on Apache HttpD server.