PAM Authentication for HttpFS

Complete the following steps to enable PAM authentication for HttpFS.
  1. 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>
  2. Rename the context.xml.jpamLogin (/opt/mapr/httpfs/httpfs-1.0/share/hadoop/httpfs/tomcat/webapps/webhdfs/META-INF/context.xml.jpamLogin) to context.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
  3. 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