Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Apache 2.3
mod_auth_form + mod_session
             <koura-h@klab.jp>
• Apache
•
• Apache 2.2
• Apache 2.3
•      (           )
•
•   MacOSX Linux
•
•
Apache

•        2.2   (=2.2.14 at 2010/3/5)

•                 2.3                   (2.3.5-
    alpha and svn trunk)
   ...
~Apache 2.2 (   )
(          )

login

                     home




        logout
•    CGI(Web   )


•
•
•   CGI
•
    •
    •
•       ID
(          )

login

                     home




        logout
•
(          )

login

                     home




        logout
•

    •

    •
(          )

login

                     home




        logout
Apache 2.3~
Browser   Apache(httpd)
Browser                   Apache(httpd)




• 401 Authorization Required
•
  •
mod_auth_form                   …

   Browser      Apache(httpd)
mod_auth_form                             …

     Browser              Apache(httpd)




• 301 Moved Permanently
•
(          )

login

                     home




        logout
• Apache                     -
    mod_auth_form + mod_session
•
    • handler
    • check_authn (or check_user_id)
Apache
• HTTP           Apache


    •    parse
                   etc...

•
•
handler

•         HTTP
          HTTP



• CGI   Web
check_authn

•       HTTP




• 2.3
               (check_user_id   )
mod_auth_form

•
    • handler
    • check_authn
•
    • check_authn
httpd.conf
<Location /doauth>
  SetHandler form-login-handler
  AuthFormLoginRequiredLocation /login.html
  AuthFormLoginS...
httpd.conf
•                = /doauth

•                  = /dologout

    • SetHandler
    • AuthFormLoginSuccessLocation...
httpd.conf

<LocationMatch "/mypage/*">
  AuthFormProvider dbd
  AuthDBDUserPWQuery "SELECT password FROM user
WHERE user ...
(ACL)

• AuthFormProvider
 •         DB

 •            LDAP

• htpasswd
(          )

login

                     home




        logout
• CGI/Web
•         HTTP_SESSION
    REMOTE_USER
•           ID

    •
•              HTTP_SESSION


    • mod_session_crypto
•         ID

    •
•                 DB


    • Key-Value
...

• MPM
• mod_lua
• FastCGI        (mod_proxy_fcgi &
  fcgistarter)
• etc...
DSAS
Apache2.3 探訪
Apache2.3 探訪
Apache2.3 探訪
Upcoming SlideShare
Loading in …5
×

Apache2.3 探訪

8,102 views

Published on

勉強会資料

Published in: Technology
  • Be the first to comment

Apache2.3 探訪

  1. 1. Apache 2.3 mod_auth_form + mod_session <koura-h@klab.jp>
  2. 2. • Apache • • Apache 2.2 • Apache 2.3
  3. 3. • ( ) • • MacOSX Linux • •
  4. 4. Apache • 2.2 (=2.2.14 at 2010/3/5) • 2.3 (2.3.5- alpha and svn trunk) • stable 2.4 3.0
  5. 5. ~Apache 2.2 ( )
  6. 6. ( ) login home logout
  7. 7. • CGI(Web ) • • • CGI
  8. 8. • • • • ID
  9. 9. ( ) login home logout
  10. 10.
  11. 11. ( ) login home logout
  12. 12. • • •
  13. 13. ( ) login home logout
  14. 14. Apache 2.3~
  15. 15. Browser Apache(httpd)
  16. 16. Browser Apache(httpd) • 401 Authorization Required • •
  17. 17. mod_auth_form … Browser Apache(httpd)
  18. 18. mod_auth_form … Browser Apache(httpd) • 301 Moved Permanently •
  19. 19. ( ) login home logout
  20. 20. • Apache - mod_auth_form + mod_session • • handler • check_authn (or check_user_id)
  21. 21. Apache • HTTP Apache • parse etc... • •
  22. 22. handler • HTTP HTTP • CGI Web
  23. 23. check_authn • HTTP • 2.3 (check_user_id )
  24. 24. mod_auth_form • • handler • check_authn • • check_authn
  25. 25. httpd.conf <Location /doauth>   SetHandler form-login-handler   AuthFormLoginRequiredLocation /login.html   AuthFormLoginSuccessLocation /mypage/   AuthFormProvider dbd   AuthDBDUserPWQuery "SELECT password FROM user WHERE user = %s"   AuthType form   AuthName realm   Session On   SessionDBDCookieName session path=/ </Location> <Location /dologout>   SetHandler form-logout-handler   AuthFormLogoutLocation /logout.html   AuthName realm   Session On   SessionDBDCookieName session path=/ </Location>
  26. 26. httpd.conf • = /doauth • = /dologout • SetHandler • AuthFormLoginSuccessLocation • AuthFormLoginRequiredLocation • AuthFormLogoutLocation
  27. 27. httpd.conf <LocationMatch "/mypage/*">   AuthFormProvider dbd   AuthDBDUserPWQuery "SELECT password FROM user WHERE user = %s"   AuthFormLoginRequiredLocation /login.html   AuthType form   AuthName realm   Session On SessionEnv On   SessionDBDCookieName session path=/ </LocationMatch>
  28. 28. (ACL) • AuthFormProvider • DB • LDAP • htpasswd
  29. 29. ( ) login home logout
  30. 30. • CGI/Web • HTTP_SESSION REMOTE_USER • ID •
  31. 31. • HTTP_SESSION • mod_session_crypto • ID •
  32. 32. • DB • Key-Value
  33. 33. ... • MPM • mod_lua • FastCGI (mod_proxy_fcgi & fcgistarter) • etc...
  34. 34. DSAS

×