Sharepoint学习笔记—习题系列--70-576习题解析 -(Q72-Q74)

Question 72 
You are designing a SharePoint 2010 application and a Web application. You need to design a security model for the application that requires users to be authenticated through the Windows Live ID service without using a custom provider. Which type of authentication should you recommend?
A. Claims-based authentication
B. Kerberos
C. NTLM
D. Forms-based authentication


解析:
  你设计了一个Sharepoint2010应用程序和一个Web application, 你想实现此程序的用户可以通过Windows Live ID进行身份认证而无需客户定制的Provider,那么你应该选用哪个认证方式呢?
  本题很明显, Windows Live ID属于不在同一个域内的第三方提供的身份验证机制,在4个备选项中,只有选项A即基于声明的验证方式才有整合这种不在同一个域内的第三方身份验证的能力。至于Kerberos与NTLM均要求在同一个域内,因为 默认的 NTLM 身份验证和 Kerberos 身份验证都要求使用与调用应用程序关联的 Microsoft Windows NT 用户凭据尝试向服务器进行身份验证。而Forms表单验证则与Windows Live ID毫无关系。
因此本题答案应该选 A

参考 
http://msdn.microsoft.com/zh-cn/library/cc280744.aspx
http://forums.asp.net/t/1689809.aspx/1
http://msdn.microsoft.com/zh-cn/library/ff647076.aspx#XSLTsection133121120120
http://msdn.microsoft.com/zh-cn/library/yk7437c8(v%3Dvs.80).aspx


Question 73
  You are designing a SharePoint 2010 application. You have the following requirements:
.Display sales data from a CRM system.
.Authenticate users to the CRM system through their Windows credentials.
.Eliminate multiple authentication requests.
You need to choose an authentication method that supports the requirements. Which authentication method should you recommend?
A. NTLM
B. Kerberos
C. Forms-based authentication that prompts for the user’s Windows credentials
D. Forms-based authentication that uses the ASP.NET SQL Membership provider


解析:
  你设计一个Sharepoint2010应用程序,需要满足如下要求:
 要求1.显示从CRM系统得来的销售数据
 要求2.授权用户通过他们的Windows凭证访问CRM系统
 要求3.减少多种认证请求。
  你该选择哪种认证方式来满足上述要求呢?
 首先,我们知道,Sharepoint系统与CRM分属于同一个公司域内的不同的应用系统。由于表单验证做不到把一个用户的Windows凭证从一个系统传递到域内的另一个应用系统, 它只能针对单一的应用系统进行验证,所以选项C.D直接排除。
  而对于Kerberos验证,我们知道在 Kerberos 协议模式中,每个客户端/服务器连接开始时都会进行身份验证。客户端和服务器轮流依次执行一系列操作,这些操作用于向连接每一端的一方确认另一端的一方是真实的。如果身份验证成功,则会话设置完成,从而建立了一个安全的客户端/服务器会话。由于采用了集成的身份验证,这就意味着用户登录后,只要客户端票证未过期,该用户就无需再次登录便可访问支持 Kerberos 身份验证的任何服务,这里的任何服务是可以跨应用系统的,只要这个应用系统使用Kerberos验证并且与其它应用系统服务器均通过了身份验证,那么它们之间也就建立了相互信任的访问通道。所以Kerberos是本题的选项。
  至于NTLM,我们知道尽管NTLM可以让服务器校验客户端身份,但它不能让客户端校验服务器的身份,也不能使一台服务器校验另一台服务器的身份,这就意味着当你的客户端通过了某一台服务器的身份验证后,你并不能去访问另一台服务器的服务,除非你也通过了那台服务器的验证。这就是说,你无法做到在通过Sharepiont相关服务器的验证后,继续去访问CRM系统的服务器,除非你需要再经过CRM验证一次才行。
因此本题答案应该选 B

参考 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa378747(v=vs.85).aspx
http://msdn.microsoft.com/zh-cn/library/yk7437c8(v%3Dvs.80).aspx
http://blogs.msdn.com/b/apgcdsd/archive/2011/12/27/kerberos.aspx

 

Question 74
You are designing a SharePoint 2010 solution that requires custom configuration settings. The solution will reside in every Web application within the environment because subsequent features depend on these settings. The server farm that the code is currently deployed to is going to be replaced with a new one. The content databases will be migrated to the new server farm. Manual changes to any files will not be allowed after the migration is complete. You need to ensure that the configuration settings are in place on the new server farm. Which approach should you recommend?
A. Place your settings within a feature that uses the SPWebConfigModification property to persist the information in the web.config file.
B. Place your settings in a file named webconfig.MySolution.xml and place it in the \14\config directory.
C. Place your settings in the current web.config file for each Web application.
D. Place your settings in the hierarchical object store in the SPPersistedObject class.


解析:
  你设计了一个Sharepoint2010解决方案需要用户进行配置设置,此解决方案将会应用到所有的Web Application上,因为以后开发的功能都将会依赖于此方案的配置设置。由于当前代码所部署的服务器场会被新的场代替,所以原有的内容数据库也会被迁移到新的服务器场中去,要求是: 一旦服务器场迁移完成,就不再允许手工修改任何文件。因此,你需要保证配置设置也需要被放置到新的服务器场中去。
  首先,根据题意,用户所做的配置其影响范围是应用到所有的Web Application,这就意味着我们可以排除掉任何与Web.config相关的选项,为什么呢?这是因为,Web.config最高层次也就是针对某个Web Application的,我们来看看微软对此的相关说明:
   在Sharepoint中,您可能需要修改 web.config 文件,才能使您的解决方案在SharePoint环境中有效。但是部署 SharePoint Foundation 将需要大量的 web.config 文件。例如,每个 Web 应用程序对应一个文件,并且每台前端 Web 服务器中包含每个这些文件的副本。
为了更加轻松地自定义 web.config 文件,SharePoint Foundation 提供了两种更改方式。第一种方式是通过创建包含一组 web.config 修改的 XML 文件以声明方式注册 web.config 项。为此,您需要创建一个已部署到 %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG 中的自定义 webconfig.XYZ.xml 文件,其中,XYZ 是您用于标识自己的解决方案的唯一 ID。【这是选项B所做的方式】
除了创建补充 webconfig.XYZ.xml 文件之外,您还可以使用 SharePoint Foundation 对象模型来修改 web.config 设置。【这是选项A所做的方式】
在创建 Web 应用程序时,始终会应用通过对象模型或 XML 定义的更改。
关于Web.config 文件位置,Web.config 文件包含在文件系统中的以下文件夹中:
1.\\Inetpub\wwwroot\wss\VirtualDirectories\端口号 — 为 SharePoint 内容 Web 应用程序定义配置设置的 web.config 文件。
2.\\Inetpub\wwwroot\wss\VirtualDirectories\管理中心的端口号 — 为 SharePoint 管理中心应用程序定义配置设置的 web.config 文件。
3.\\Inetpub\wwwroot\wss\VirtualDirectories\端口号\wpresources — 在 Web 应用程序的 Web 部件资源中使用的 web.config 文件。
4.\\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources — 在全局程序集缓存的 Web 部件资源中使用的 web.config 文件。需要注意的是:你不应修改 \wpresources 文件夹中的 web.config 文件。这些文件的设置不允许可编译的页面或项目。如果更改了这些设置,则已编译代码的安全状态将与从本地驱动器:\Inetpub\wwwroot 目录运行的代码的安全状态大不相同。
5.%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG — 共同定义用于扩展其他 Web 应用程序的配置设置的 web.config 文件和其他 .config 文件。
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI — 为 /_vti_bin 虚拟目录定义配置设置的 web.config 文件。
6.%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS — 为 /_layouts 虚拟目录定义配置设置的 web.config 文件。
在创建 SharePoint Foundation Web 应用程序时,顶级 web.config 文件位于 Web 应用程序的内容根文件夹中,该文件为服务器定义配置设置(例如,Web 部件的 HTTP 处理)。用于 Web 部件资源的另一个 web.config 文件位于同一根文件夹中的 \wpresources 文件夹中。
  所以,由上描述可以排除Web.config的方式。
  下面我们来看看SPPersistedObject 对象。我们知道SPServer 对象是在服务器加入 SharePoint 服务器场时创建的;SPServer.Local 是配置对象。可以在“管理中心”查看场中的服务器列表。SPServer 继承自 SPPersistedObject 对象。实例化 SPPersistedObject 的对象保留在 SharePoint 2010 配置数据库中。而我们知道Sharepoint使用配置数据库来存储服务器场中服务器的配置和网站映射信息。每个服务器场只能有一个配置数据库。所以Sharepoint2010的配置数据库针对的是整个Sharepoint2010服务器场,它保存的配置信息当然能影响场内的所有Web Applications。
因此本题答案应该选 D

参考 
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.administration.spwebconfigmodification.aspx
http://msdn.microsoft.com/zh-cn/library/ms460914(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ee537799(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ff798371.aspx

 

posted @ 2013-10-16 12:22  wsdj  阅读(474)  评论(1编辑  收藏  举报