`
li.feixiang
  • 浏览: 121213 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

Single Sign-On with Apache and Active Directory – Part 2

    博客分类:
  • Java
阅读更多

Back on May 23rd, 2007 I wrote an article titled Single Sign-On with Apache and Active Directory which I have now made Part 1 of this topic. In that article I wrote:

There are 3 major solutions for this which are mod_ntlm, mod_auth_kerb and Apache2:AuthenNTLM…I tried mod_ntlm which seemed to be very easy to setup and worked well. But there was one catch…If the browser did not send the NTLM information or correct NTLM information, see the footnotes1 below as to why, the user had to login with the username in the form of DOMAIN\username. In my experience with applications already in place they did not require this form of DOMAIN\username. This could be resolved if you could specify the default domain in mod_ntlm which you cannot.

Now I will explain why there is a Part 2 to this topic. I used the Apache2::AuthenNTLM Apache Perl module in a large environment and quickly found a serious problem which I could not diagnose or resolve. When using the Apache2::AuthenNTLM Perl module Apache would stop responding to requests to the site after an undetermined number of requests. I tried limiting the file types that would be authenticated but in the end it would still stop reaponding after a while.

So I finally decided to use the Apache mod_ntlm module to handle the authentication. And with the article I had written titled Enabling NTLM Authentication (Single Sign-On) in Firefox , the problem with having to use the username in the form of DOMAIN\username in Firefox can be eliminated.

This how to is intended for CentOS 4 and RHEL4 but can be easily adapted for other distributions.

Now for the HowTo:

1) Start by installing Apache by issuing the following command:
yum install httpd

2) Next we need to install the mod_ntlm Apache module

wget http
:
//sivel.net/repo/i386/mod_ntlm-2-0.1.el4.sn.i386.rpm

rpm 
-
ivh mod_ntlm
-
2
-
0.1
.
el4
.
sn
.
i386
.
rpm

3) Now we need to configure mod_ntlm

cd 
/
etc
/
httpd
/
conf
.
d
vi mod_ntlm
.
conf

Modify the conf like so (the documentation in the conf pretty much covers it also):

<location
 ~ 
"/path/to/dir/to/protect/here)/(.*)"
 
>


  # NTLMAuth - set to 'on' to activate NTLM authentication here
  NTLMAuth on

  # AuthNTGroups - text file containing (NT) group names and member user IDs

  # NTLMBasicAuth - set to 'on' to allov Basic authentication too

  # NTLMBasicRealm - realm to use for Basic authentication

  # NTLMAuthoritative - set to 'off' to allow access control to be passed along to lower modules if the UserID is not known to this module
  NTLMAuthoritative on

  # NTLMDomain - set to the domain you want users authenticated against for cleartext authentication - if not specified, the local machine, then all trusted domains are checked
  NTLMDomain MYDOMAIN

  # NTLMServer - set to the NT server to contact to authenticate users
  NTLMServer primary.mydomain.com

  # NTLMBackup - set to the alternate NT server to contact to authenticate users
  NTLMBackup secondary.mydomain.com

  # NTLMLockFile - set to the lock file that is used to prevent simutaneous contacts to DC
  NTLMLockfile /tmp/_mod_ntlm.lck

  AuthName NTAuth
  AuthType NTLM
  require valid-user
  Satisfy all


</location>

4) We need to modify the global conf file now.
vi / etc / httpd / conf / httpd . conf
Find ‘KeepAlive Off’ and change it to ‘KeepAlive On’

5) Let’s start Apache
/etc/ init . d / httpd start

6) Let’s setup a simple test page that will utilize the server environment variable that mod_ntlm sets.

cd 
/
path
/
set
/
in
/
step
/
3
/
in
/
location
/
directive
touch index
.
php
vi index
.
php

* Insert the following information:

<?
php
echo 
"You have logged in as <b>"
 
.
 $_SERVER
[
'REMOTE_USER'
]
 
.
 
"</b>"
;


?>

If you do not have PHP installed you can just place a page in the directory and if you login you should be able to see it.

If you get a login prompt check the footnotes1 .

Part 1 | Part 2

Footnotes
1. Getting a login prompt can be caused by using Firefox with the default configuration, not being logged on in the domain that you are attempting to authenticate against, or not having the site listed in the Local Intranet security zone in Internet Explorer. Or worst of all you could have mis configured something in step 3

分享到:
评论

相关推荐

    Single Sign-on

    单点登录(Single Sign-on,简称SSO)是企业级应用集成解决方案中的一个重要组成部分,它旨在提供用户在多个系统和应用程序之间无缝切换的能力,而无需多次输入认证信息。微软为其实现提供了集成服务,如与Microsoft...

    Single-sign-on

    Single sign-on (SSO) is a property of access control of multiple related, but independent software systems. With this property a user logs in once and gains access to all systems without being ...

    CAS单点登录SSO( Single Sign-On)

    CAS(Central Authentication Service)单点登录(Single Sign-On,简称SSO)是一种网络认证协议,旨在简化用户在多个应用系统间的登录流程。当用户通过CAS认证后,可以在无需再次输入凭证的情况下访问已接入CAS的...

    Single sign-on best practices for Azure Active Directory

    优质资源,值得拥有

    single-sign-on-v2

    自定义的单点登录系统,可返回各个子系统的登录页及支持CAS Server集群。(https://github.com/liyingqiao121727/single-sign-on-v2)

    rubycas-server, 为web应用提供 单点登录(Single Sign-On) 认证,实现Jasig协议的服务器端.zip

    rubycas-server, 为web应用提供 单点登录(Single Sign-On) 认证,实现Jasig协议的服务器端 rubycas服务器版权Matt Zukowski贡献的部分是版权所有( c ) 2011 Urbacon有限公司。 其他部分是他们各自作者的版权。作者请...

    SSO(SingleSign-On)基于YMP框架实现的单点登录服务模块

    SSO (Single Sign-On) 基于YMP框架实现的单点登录服务模块

    SSO-Single-Sign-on实战.docx

    SSO-Single Sign-on实战 SSO(Single Sign-on)是一种单点登录技术,能够让用户在多个相关的应用程序之间进行身份验证,提高用户体验和安全性。SSO可以分为Web SSO和桌面SSO两种,Web SSO是指客户端的单点登录,而...

    WebSphere环境下的SSO(Single sign-on:单点登录、全网漫游)实现之: -- SSO(Single Sign-On)实现步骤

    本文中作者给大家详细的演示了如何实现WebSphere服务器和webpshere服务器之间的SSO(“单点登录、全网漫游”),并且给大家详细地解释了实现过程中的关键点和相关选项的含义,并且给出了开发带有安全性能要求的web...

    VMware vSphere 5.1安装 图 vcenter5.1安装 Single sign on 安装

    ### VMware vSphere 5.1 安装及Single Sign-On配置详解 #### 一、概述 VMware vSphere 5.1 是一款先进的虚拟化平台,为企业提供了强大的资源管理和优化功能。本文档详细介绍了vSphere 5.1的安装过程,并特别强调了...

    SSO解决方案大全 Single Sign-On for everyone

    SSO(Single Sign-On)是一种身份验证机制,允许用户在一个应用系统中登录后,无需再次认证即可访问其他关联的系统。这种技术对于拥有多个应用程序或网站的企业尤其有用,可以提高用户体验,减少用户记忆多套登录...

    CAS 单点登录(Single Sign On)

    CAS(Central Authentication Service)单点登录(Single Sign-On,简称SSO)是一种网络认证协议,它允许用户在一次登录后,就能访问多个相互信任的应用系统,而无需再次进行身份验证。这种技术对于大型企业或组织的...

    django-mama-cas, Django 中央身份验证服务( CAS ) 单点登录(Single Sign-On) 服务器.zip

    django-mama-cas, Django 中央身份验证服务( CAS ) 单点登录(Single Sign-On) 服务器 MamaCAS MamaCAS是 Django 中央认证服务( CAS ) 单一登录和单一注销服务器。 它实现了 CAS 1.0.2.0和 3.0协议,包括一些可选的...

    eSSO Single Sign On

    综上所述,eSSO Single Sign-On利用LDAP、Active Directory等技术,实现了用户在企业环境中的一次登录多应用访问,通过目录服务进行账户管理和权限分配,而组和角色的概念则进一步细化了权限控制。在具体实现时,...

    miniOrange Secure Single Sign-On Plug-in-crx插件

    语言:English (United States) 安全自动登录任何应用程序 使用此简单扩展为您的应用程序启用SSO。 -miniOrange单一登录插件将允许用户无缝登录所有可用的Web应用程序。 -插件与miniOrange服务器安全通信,以在登录...

    single sign on流程图

    ### Single Sign-On (SSO) 流程解析 #### 单点登录(SSO)概念介绍 单点登录(Single Sign-On,简称 SSO)是一种身份验证机制,它允许用户通过一次登录过程,即可访问所有相互信任的应用程序和服务,而无需在每个应用...

    Active Directory Cookbook, 3rd Edition.pdf

    Covers how to back up Active Directory, perform authoritative and nonauthoritative restores, check DIT file integrity, perform online and offline defrags, and search for deleted objects. Chapter 17, ...

    VisualSVN Server 3.5.4 破解补丁

    VisualSVN Server Enterprise Edition provides additional enterprise-grade features such as Active Directory Single Sign-On and Multisite Repository Replication and is licensed per server. Learn more.....

Global site tag (gtag.js) - Google Analytics