<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>服务器安全维护工作室 &#187; 为AWS北京区管理控制台集成ADFS访问</title>
	<atom:link href="https://www.fuwuqiok.com/tag/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqiok.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Mar 2020 07:28:40 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.26</generator>
	<item>
		<title>为AWS北京区管理控制台集成ADFS访问</title>
		<link>https://www.fuwuqiok.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/</link>
		<comments>https://www.fuwuqiok.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/#comments</comments>
		<pubDate>Fri, 27 Jul 2018 09:13:58 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[linux服务器代维]]></category>
		<category><![CDATA[为AWS北京区管理控制台集成ADFS访问]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=3665</guid>
		<description><![CDATA[<p>原英文链接：http://blogs.aws.amazon.com/security/post/Tx71TWX [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/">为AWS北京区管理控制台集成ADFS访问</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>原英文链接：<a href="http://blogs.aws.amazon.com/security/post/Tx71TWXXJ3UI14" target="_blank" rel="noopener noreferrer">http://blogs.aws.amazon.com/security/post/Tx71TWXXJ3UI14</a></p>
<p>在我们使用AWS的过程中, AWS IAM 是我们接触的第一个服务, 它具有强大的功能，可使您在AWS IAM中通过管理用户, 用户组, 策略, 角色, 证书, 密钥等来灵活而精确的控制对AWS 服务和资源的访问和权限. 同时在很多企业内部, 一般都已经部署了自己的用户管理及授权系统, 如何将AWS的用户管理及授权纳入现有系统则成为企业的想要解决的一个问题. 本文将介绍如何将企业内部Windows活动目录(Active Directory)和AWS通过ADFS(Active Directory Service) 进行集成, 从而实现在活动目录中管理用户对AWS服务和资源的访问和授权.</p>
<p>在AWS IAM中, 我们提供了对SAML的支持, 这个功能可以让我们可以和支持该标准的身份提供商进行联合从而实现单点登陆. 对于很多使用微软活动目录的企业, 我们可以使用Windows自带的ADFS进行和AWS IAM的集成.</p>
<p><strong>工作原理:</strong></p>
<p>在我们进行详细配置之前, 可以先看一下工作原理:</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-1.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-1.png" alt="1-1" width="739" height="372" /></a></p>
<p>1.       首先用户访问和AWS做了集成的ADFS站点 (<a href="https://adfs/adfs/ls/IdpInitiatedSignOn.aspx" target="_blank" rel="noopener noreferrer">https://ADFS/adfs/ls/IdpInitiatedSignOn.aspx</a>)</p>
<p>2.       用户在登陆页面输入用户名及密码, 提交以后ADFS将联系AD进行用户验证</p>
<p>3.       用户浏览器收到ADFS返回的SAML 断言</p>
<p>4.       用户浏览器将用户断言Post到AWS的Sign-in SAML终结点 (<a href="https://signin.amazonaws.cn/saml" target="_blank" rel="noopener noreferrer">https://signin.amazonaws.cn/saml</a>), Sign-in将调用AssumeRoleWithSAML API接口请求临时安全凭证并使用其构建管理控制台的登陆链接</p>
<p>5.       用户浏览器转向使用构建的登陆链接进行登陆</p>
<p><strong>配置活动目录:</strong></p>
<p>1.       在活动目录中及建立用户adfsuser, 邮件地址设为adfsuser@examplecom</p>
<p>2.       在活动目录中建立两个组AWSBJS-Admin, AWSBJS-ReadOnly, 这两个组会和AWS中新建的角色进行匹配</p>
<p>3.       将用户adfsuser添加到AWSBJS-Admin, AWSBJS-ReadOnly这两个组中</p>
<p><strong>安装部署Active Directory Federation Service</strong></p>
<p>我们可以参考如下的文档部署ADFS服务</p>
<p><a href="https://technet.microsoft.com/en-us/library/dn486775.aspx" target="_blank" rel="noopener noreferrer">https://technet.microsoft.com/en-us/library/dn486775.aspx</a></p>
<p><strong>导出SAML Metadata Document</strong></p>
<p>访问ADFS服务器并导出 SAML Metadata Document (将ADFS换成你ADFS服务器的名称)</p>
<p><a href="https://adfs/FederationMetadata/2007-06/FederationMetadata.xml" target="_blank" rel="noopener noreferrer">https://ADFS/FederationMetadata/2007-06/FederationMetadata.xml</a></p>
<p><strong>配置AWS</strong></p>
<p>1.       登录 AWS管理控制台<a href="https://console.amazonaws.cn/" target="_blank" rel="noopener noreferrer">https://console.amazonaws.cn/</a></p>
<p>2.       在IAM服务中, 点击身份提供商, 选择SAML, 导入从ADFS服务器上导出的SAML Metadata</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-2.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-2.png" alt="1-2" width="950" height="359" /></a></p>
<p>3.       记录下提供商ARN记录</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-3.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-3.png" alt="1-3" width="908" height="407" /></a></p>
<p>4.       新建IAM 角色ADFSBJS-Admin和ADFSBJS-ReadOnly [注意选择 授予 SAML 提供商 Web 单点登录 (Web SSO) 访问权限, 这两个角色会和活动目录中的新建的用户组AWSBJS-Admin和AWSBJS-ReadOnly对应]
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-4.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-4.png" alt="1-4" width="857" height="407" /></a></p>
<p>5.       记录各个角色的ARN</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-5.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-5.png" alt="1-5" width="1032" height="328" /></a></p>
<p><strong>配置ADFS将AWS作为 信赖方信任</strong></p>
<p>1.       打开ADFS管理界面, 选择信任关系-信赖方信任</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-6.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-6.png" alt="1-6" width="692" height="342" /></a></p>
<p>2.       右键点击信赖方信任, 点击 添加信赖方信任</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-7.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-7.png" alt="1-7" width="694" height="319" /></a></p>
<p>3.       点击 启动</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-8.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-8.png" alt="1-8" width="725" height="587" /></a></p>
<p>4.       选择 导入有关在线或在本地网络发布的信赖方的数据, 在联合元数据地址栏输入以下地址,点击 下一步</p>
<p><a href="https://signin.amazonaws.cn/static/saml-metadata.xml" target="_blank" rel="noopener noreferrer">https://signin.amazonaws.cn/static/saml-metadata.xml</a></p>
<p>5.       在 显示名称 中输入AWS China, 然后点击下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-9.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-9.png" alt="1-9" width="726" height="591" /></a></p>
<p>6.       选择 不配置多重身份验证, 点击 下一步:</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-10.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-10.png" alt="1-10" width="731" height="586" /></a></p>
<p>7.       选择 允许所有用户访问此信赖方, 点击下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-11.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-11.png" alt="1-11" width="730" height="586" /></a></p>
<p>8.       点击下一步:</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-12.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-12.png" alt="1-12" width="725" height="585" /></a></p>
<p>9.       点击 关闭</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-13.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-13.png" alt="1-13" width="725" height="585" /></a></p>
<p>10.    点击 关闭, 并打开编辑声明规则</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-14.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-14.png" alt="1-14" width="730" height="586" /></a></p>
<p><strong>为AWS 信赖方信任 建立 声明规则</strong></p>
<p>1.       在编辑声明规则中, 点击 添加规则</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-15.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-15.png" alt="1-15" width="508" height="554" /></a></p>
<p>2.       选择 转化传入声明, 点击下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-16.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-16.png" alt="1-16" width="729" height="585" /></a></p>
<p>3.       声明规则名称使用 NameId, 传入声明类型 选择 Windows帐户名, 传出声明类型 选择 名称ID, 传出名称ID格式 选择 永久标识符, 点击完成</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-17.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-17.png" alt="1-17" width="725" height="584" /></a></p>
<p>4.       再次点击 添加规则</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-18.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-18.png" alt="1-18" width="509" height="554" /></a></p>
<p>5.       选择以声明方式发送LDAP特性, 点击 下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-19.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-19.png" alt="1-19" width="726" height="584" /></a></p>
<p>6.       声明规则名称 输入RoleSessionName, 特性存储选择 Active Directory, LDAP特性 选择 E-Mail-Address, 传出声明类型输入 <a href="https://amazonaws-china.com/SAML/Attributes/RoleSessionName" target="_blank" rel="noopener noreferrer">https://aws.amazon.com/SAML/Attributes/RoleSessionName</a>, 点击完成</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-20.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-20.png" alt="1-20" width="733" height="581" /></a></p>
<p>7.       再次点击 添加规则</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-21.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-21.png" alt="1-21" width="509" height="552" /></a></p>
<p>&nbsp;</p>
<p>8.       选择 使用自定义规则发送声明, 点击 下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-22.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-22.png" alt="1-22" width="730" height="589" /></a></p>
<p>9.       声明规则名称输入 Get AD Groups, 自定义规则输入以下文本 (这一步用来取出登录用户所在的AD用户组, 并将其传入到临时声明 http://temp/variable中), 点击完成</p>
<p>c:[Type == “http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname”, Issuer == “AD AUTHORITY”]
<p>=&gt; add(store = “Active Directory”, types = (“http://temp/variable”), query = “;tokenGroups;{0}”, param = c.Value);</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-23.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-23.png" alt="1-23" width="724" height="578" /></a></p>
<p>10.    再次点击 添加规则</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-24.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-24.png" alt="1-24" width="503" height="555" /></a></p>
<p>11.    选择 使用自定义规则发送声明, 点击下一步</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-25.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-25.png" alt="1-25" width="729" height="586" /></a></p>
<p>12.    声明规则名称 输入 Roles, 自定义规则中输入以下文本 (这部分主要是用来映射AD中的用户组 和 AWS中的角色之间的对应关系, 其中红色部分需要根据我们前面所建的AD用户组名称 和 身份提供商的ARN和角色的ARN调整), 点击完成</p>
<p>c:[Type == “http://temp/variable”, Value =~ “(?i)^AWSBJS-“]
<p>=&gt; issue(Type = “https://aws.amazon.com/SAML/Attributes/Role”, Value = RegExReplace(c.Value, “AWSBJS-“, “arn:aws-cn:iam::761602622223:saml-provider/ADFS,arn:aws-cn:iam::761602622223:role/ADFSBJS-“));</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-26.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-26.png" alt="1-26" width="729" height="586" /></a></p>
<p>13.    重新启动 Active Directory Federation Service</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-27.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-27.png" alt="1-27" width="957" height="280" /></a></p>
<p><strong>测试配置效果</strong></p>
<p>1.       访问https://ADFS/adfs/ls/IdpInitiatedSignOn.aspx (将ADFS换成你ADFS服务器的名称)</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-28.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-28.png" alt="1-28" width="808" height="357" /></a></p>
<p>2.       输入用户名和密码</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-29.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-29.png" alt="1-29" width="793" height="339" /></a></p>
<p>3.       验证以后, 服务器将根据它所在的组返回它拥有的角色, 用户选择不同的角色就可以拿到不同角色的权限</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-30.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-30.png" alt="1-30" width="691" height="362" /></a></p>
<p>4.       登录以后在右上角可以看到当前用户及其所使用的角色信息</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-31.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2018/07/1-31.png" alt="1-31" width="875" height="437" /></a></p>
<p><strong>总结:</strong></p>
<p>上述是将ADFS和AWS管理控制台集成从而实现使用AD账号系统登录访问AWS管理控制台的详细流程. 同时我们还可以通过调整ADFS本身的身份验证策略来实现多重验证等功能.</p>
<p>&nbsp;</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/">为AWS北京区管理控制台集成ADFS访问</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
