Redmineã®(ãªãã¡ãã£ã¦?)SSO対å¿
ç¾å¨å©ç¨ä¸ã®Redmineã§ãã、åä¸ãã¡ã¤ã³ã§åããã¦ããWebã¢ããªã±ã¼ã·ã§ã³ã¨Single Sign Onã§éç¨ã§ããããããªã…ã¨æãå§ãã¾ãã。
※ ãªã、Redmineãä»ã®ã¢ããªã±ã¼ã·ã§ã³ã、IDã¨ãã¹ã¯ã¼ãã«ã¤ãã¦ã¯åãLDAPãåç §ãã¦ããã®ã§、å°ãªãã¨ã、IDã¨ãã¹ã¯ã¼ãã¯ä¸å åããã¦ãã¾ã。
ããã§、Redmineã¨SSOããã¼ã¯ã¼ãã«æ¤ç´¢ããã¦ã¿ãã¨ãã、以ä¸ã®è¨äºãããããã¾ãã。(Redmine.orgæ¬å®¶ã®ãã©ã¼ã©ã ã§ã)
Running redmine on Apache2 on Windows; using SSPI authentication; is it possible?
ä¸è¨ã®å 容ã§ã¯、Apacheã®ç°å¢å¤æ°ã«å ¥ã£ãã¦ã¼ã¶æ å ±ã、Remineã®ApplicationControllerã§åå¾ãã¦、Sessionã«æ ¼ç´ããã¦ããUserIdã®ä»£ããã«å©ç¨ãã、ã¨ãããã®ã§ãã。
ãããã®ç°å¢ã§ã¯、Windowsã®SSOã§ã¯ãªã、ã¾ã、Apacheã®ç°å¢å¤æ°ã«ãã¦ã¼ã¶ãèå¥ããæ å ±ã¯å ¥ããªãã®ã§ãã、ãªãããã®æ¹æ³ã§ã¦ã¼ã¶IDãåå¾ãã¦、ããã ãä¿®æ£ããã°åé¡ãªãããã§ã。
if session[:user_id]
# existing session
(User.find_active(session[:user_id]) rescue nil)
+elsif (forwarded_user = request.env["HTTP_X_REMOTE_USER_6E3RZQKX"])
+ # web server authentication
+ (User.find_by_login(forwarded_user) rescue nil)
elsif cookies[:autologin] && Setting.autologin?
# auto-login feature
User.find_by_autologin_key(cookies[:autologin])
Apacheã®åºæ¬èªè¨¼ã§ããã° request.env[“REMOTE_USER”]ãæå®ããã°ããã、Cookieãªã©ã§ããã°、cookies[“….”]ã§å¤ãæ¾ã£ã¦å¦çããã°å¤§ä¸å¤«ã§ãã。
åä½ã¨ãã¦ã¯、以ä¸ã®ããã«ãªãã¾ãã。(Apacheã®åºæ¬èªè¨¼ã®ä¾)
1. Redmineã®ãã°ã¤ã³ãã©ã¼ã ããèªè¨¼æ¸ã¿ã§ããã°、ãã¡ããã¾ãå©ç¨。
2. Redmineã«ãã°ã¤ã³ãã¦ããªãå ´åã§、Apacheã®èªè¨¼æ¸ã¿ã®å ´å、ãã®æ å ±ãå©ç¨。
3. ãã ã、Apacheã®èªè¨¼ãè¡ã£ã¦ãã¦ã、Redmineã®ã¦ã¼ã¶ç»é²ãè¡ã£ã¦ããªããã°、User.find_by_login ã§ãããããªããã、å¿åã¢ã¯ã»ã¹æ±ãã«ãªã。
ã©ã¡ãã®èªè¨¼ãæ¸ãã§ããã®ã§ããã°、Redmineæ¬æ¥ã®ã»ãã·ã§ã³æ
å ±ã®ã»ããåªå
ããã¾ã。
ãã£ã¦ã¿ãã¨、å°ãã®èª¿æ´ã§æ¸ãã ã®ã§、大å¤ãããããã§ã。
éã«、Redmineã«èªè¨¼æ¸ã¿ã§、ãã®æ
å ±ãä»ã®ã¢ããªã«ã渡ãããã¨ãªãã¨、Redmineããä»ã®ã¢ããªãããåå¾ã§ãããããªCookieãã»ãããã¦ãããã¨ã、ã¦ã¼ã¶æ
å ±ãè¿ãAPIã追å ããã¨ã、ã¡ãã£ã¨é¢åã§ãã…。
ä»ã«ãããã(ãã£ã¨è¯ã)æ¹æ³ããããã¨æãã¾ãã®ã§、è¦ã¤ãã£ããã¾ã追è¨ãããã¨æãã¾ã。
ã³ã¡ã³ã
ã³ã¡ã³ããæ稿