2013-08-26 34 views
2

在我的環境,其註冊的域名在通過LDAP的管理平臺進行身份驗證的所有用戶管理平臺,如這裏所描述 - LDAP Authentication沉默登錄後進入域

我有這個想法自動登錄到管理平臺,而無需鍵入登錄/密碼的地方,並立即去home_url

可能嗎?

我試圖使用這裏描述的黑客 - Running redmine on Apache2 on Windows; using SSPI authentication; is it possible?但我仍然應該在通過基本身份驗證(在單獨的窗口中)時輸入AD憑據。

回答

0

是的,這是可能的。

在文件httpd.conf中需要加 -

LoadModule sspi_auth_module modules/mod_auth_sspi.so 

然後 -

... 
<Location /redmine> 
    Options   +FollowSymLinks +SymLinksIfOwnerMatch 
    Order    allow,deny 
    Allow    from all 

    RewriteEngine  On 
    RewriteCond  %{IS_SUBREQ} ^false$ 
    RewriteCond  %{LA-U:REMOTE_USER} (.+) 
    RewriteRule  . - [E=RU:%1] 
    RequestHeader  add X_REMOTE_USER_2013 %{RU}e 

    AuthName   "Redmine Authentication" 
    AuthType   SSPI 
    SSPIAuth   On 
    SSPIAuthoritative On 
    SSPIOmitDomain On 
    SSPIUsernameCase lower 
    require   valid-user 
</Location> 
... 

這一需求後,更改文件application_controller.rb,添加到它 -

... 
elsif (forwarded_user = request.env["HTTP_X_REMOTE_USER_2013"]) 
    # web server authentication 
    user = (User.active.find_by_login(forwarded_user) rescue nil) 
... 

我在工具/選項/安全/本地內網/站點/中選擇了「自動檢測內聯網站點」,然後在「高級」中添加了該地址。 在Mozila Firefox的我加入network.automatic-ntlm-auth.trusted-uris

的ADRESS現在的用戶,授權域自動獲得訪問管理平臺

0

只是寫了一個帖子如何設置它在最新的CentOS 7,使用single_auth插件: http://blog.techutils.space/2016/02/redmine-ad-sso-setup.html

的思路是遵循single_auth插件的默認設置,但使用mod_auth_ntlm_winbind Apache模塊是apache和ntlm_auth命令之間的橋樑。 ntlm_auth需要在該域中加入samba(本例中爲samba 4)。

希望它有幫助!

+0

非常感謝! –