PAM Authentication for HttpFS
About this task
Procedure
-
Add the
httpfs.hadoop.authentication.type
andhttpfs.authentication.type
properties to the/opt/mapr/httpfs/httpfs-version/etc/hadoop/httpfs-site.xml
file, as shown. Note that the directory differs based on the httpfs version:- In EEP 7.0.1 and earlier, the directory is
/opt/mapr/httpfs/httpfs-1.0/etc/hadoop/httpfs-site.xml
. - In EEP 7.1.0 and later, the directory is
/opt/mapr/httpfs/httpfs-1.1.0/etc/hadoop/httpfs-site.xml
.
<property> <name>httpfs.hadoop.authentication.type</name> <value>multiauth</value> </property> <property> <name>httpfs.authentication.type</name> <value>multiauth</value> </property>
NOTE On secure clusters, themultiauth
authentication is enabled by default. - In EEP 7.0.1 and earlier, the directory is
-
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
-
After restarting the service, run cURL with the PUT operation, as shown in this
example:
NOTE If HttpFS is configured with plain authentication through PAM, the cURL request must contain a username and password.
curl -X PUT "https://mapr:mapr@node1:14000/webhdfs/v1/tmp/example?op=mkdirs"