带有Windows身份验证的Orchard CMS? [英] Orchard CMS with windows auth?

查看:67
本文介绍了带有Windows身份验证的Orchard CMS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Orchard可以使用AD和Windows身份验证吗? 我只需要允许特定的AD组访问博客.任何有效的域用户都应该可以访问该站点的其余部分.管理员仪表板只能由另一个特定的AD组访问.

Can Orchard work with AD and Windows authentication? I need to allow only specific AD groups access to a blog. The rest of the site should be accessible to any valid domain user. The admin dashboard should only be accessible by another specific AD group.

[更新]
在ViRuSTriNiTy的建议下,我尝试了以下操作:
-安装Windowsauth模块
http://gallery.orchardproject.net/Packages/Orchard.Module.AlexZh. Windows身份验证 -在管理设置中,我为自己添加了一个用户,名称为"my-domain \ my-user-name",其中的域名和用户均为我的.
-添加了一个角色以匹配我所属的AD角色,并授予该角色访问所有内容的权限.
-将iis设置切换为使用Windows身份验证,并关闭了匿名
-更新了web.config以使用Windows身份验证并指定了我之前设置的角色

[ update ]
At the suggestion of ViRuSTriNiTy, I tried the following:
- install the windowsauth module
http://gallery.orchardproject.net/Packages/Orchard.Module.AlexZh.WindowsAuthentication - in the admin settings, I added a user for myself as "my-domain\my-user-name", where the domain name and user are mine.
- added a role to match a AD role that I am a member of and gave this role access to everything.
- switched the iis settings over to use windows auth, and turned off anonymous
- updated the web.config to use windows auth and specify the role that I setup previous

但是,我现在无法进入管理面板.我可能会缺少什么?

However,I cant get to the admin panel now. What could I be missing?

[更新2 ] 注意到他提供的文档链接后,我看到我需要为模块启用Windows身份验证.因此,我再次启用了IIS匿名(以便可以登录),并更新了模块的设置,但是在Settings \ Users下看不到用于启用Windows身份验证的选项.它移动了吗? 我正在使用v1.10.2

[ update 2 ] After noticing the documentation link he provided (duh), I saw that I needed to enable windows auth for the modules. So I enabled IIS anonymous again (so I could log in), and updated the settings for the modules, but I see no option under Settings\Users for to enable windows auth. Did it move? Im using v1.10.2

推荐答案

您可以使用模块文档: http://orchardwinauth.codeplex.com/documentation

首先,您需要将Orchard.Web项目属性(在Visual Studio中,单击项目+ F4)更改为...

First you need to change the Orchard.Web project properties (in Visual Studio, click on project + F4) to ...

Anonymous Authentication: Disabled
Windows Authentication: Enabled

...,然后您需要将Orchard.Web\Web.config更改为类似的内容

... and then you need to change the Orchard.Web\Web.configto something like this

  <authentication mode="Windows">
    <forms loginUrl="~/Users/Account/AccessDenied" timeout="2880" />
  </authentication>
  <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" />
  <authorization>
    <allow roles="YourDomain\Domain Users" />
    <deny users="?" />
  </authorization>

可以根据Orchard角色照常配置权限.

The permissions can be configured as usual based on Orchard roles.

我从2年以来一直在使用该模块,对此我感到非常满意,但是请注意,该模块有几个 bug :

I've been using this module since 2 years now and i'm pretty happy with it but be aware that the module has several bugs:

  • 这可能会导致死锁,请参阅 https://github.com/OrchardCMS/Orchard/Issues/7688
  • 当在Orchard DB中找不到登录的域用户时,它会创建一个新用户,您可能想要更改类CustomAuthenticationService以避免这种情况(如果需要,我可以提供一些代码)
  • it might cause a deadlock, see https://github.com/OrchardCMS/Orchard/issues/7688
  • it creates a new user when the logged in domain user cannot be found in the Orchard DB, you might want to alter the class CustomAuthenticationService to avoid this (i can provide some code if you need it)

这篇关于带有Windows身份验证的Orchard CMS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆