PAM Authentication for HttpFS
About this task
Procedure
-
Un-comment the following text in
web.xml
(/opt/mapr/httpfs/httpfs-1.0/share/hadoop/httpfs/tomcat/webapps/webhdfs/WEB-INF/web.xml
):<security-constraint> <web-resource-collection> <web-resource-name>Admin</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> </security-constraint> <security-role> <role-name>*</role-name> </security-role> <login-config> <auth-method>BASIC</auth-method> </login-config>
-
Rename the
context.xml.jpamLogin
(/opt/mapr/httpfs/httpfs-1.0/share/hadoop/httpfs/tomcat/webapps/webhdfs/META-INF/context.xml.jpamLogin
) tocontext.xml
.mv /opt/mapr/httpfs/httpfs-1.0/share/hadoop/httpfs/tomcat/webapps/webhdfs/META-INF/context.xml.jpamLogin /opt/mapr/httpfs/httpfs-1.0/share/hadoop/httpfs/tomcat/webapps/webhdfs/META-INF/context.xml
-
Restart the HttpFS service.
sudo -u mapr /opt/mapr/httpfs/httpfs-1.0/sbin/httpfs.sh stop sudo -u mapr /opt/mapr/httpfs/httpfs-1.0/sbin/httpfs.sh start