limitations under the License. See accompanying LICENSE file.
–>
<web-resource-collection>
<web-resource-name>Protected</web-resource-name>
<url-pattern>/*</url-pattern> <!-- 这是正在被保护的路径,当前设定的是root路径下的web ui -->
</web-resource-collection>
<auth-constraint>
<role-name>root</role-name> <!-- hadoop用户的组名 -->
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method> <!-- HTTP规范,Base64 编码方式, 采用Base64编码具有不可读性,需要解码后才能阅读。-->
<realm-name>jobtrackerRealm</realm-name> <!-- 这个名称要和下面jetty里的name一致-->
</login-config>
## 二、配置jetty-web.xml
和web.xml在同一个文件夹下,如果没有,则新增一个,填入以下内容
jobtrackerRealm
/etc/hadoop/realm.properties
**/etc/hadoop/realm.prop