...
Code Block |
---|
$ curl -u me@example.com:me_pwd \ -b ~/cookies.txt -c ~/cookies.txt \ http://<platform_host>:<platform_port_number>/v3v4/<endpoint> |
where:
Parameter | Description | |
---|---|---|
-u me@example.com:me_pwd | Required username and password. | |
-b and -c | Required paths and filenames for storage of send and receive HTTP cookies. | |
<platform_host> | Fully qualified name of the host of the
| |
<platform_port_number> | Port number through which to access the
3005 . |
...
Verify that your version of cURL supports GSS:
Code Block $ curl -V curl 7.51.0 (x86_64-apple-darwin16.0) libcurl/7.51.0 SecureTransport zlib/1.2.8 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
- Verify that
GSS-API
andSPNEGO
are in the output. Run
kinit
and authenticate using the hadoop Hadoop principal:Code Block $ kinit Please enter the password for [hadoop.user.principal]@localhost: $
Access using
cURL
:Code Block $ curl --negotiate -u anything \ -b ~/cookies.txt -c ~/cookies.txt \ http://<platform_host>:<platform_port_number>/v3v4/<endpoint>
where:
Parameter Description --negotiate
Enables SPNEGO use in cURL. This option requires a library built with GSS-API or SSPI support. If this option is used several times, only the first one is used. Use --proxy-negotiate
to enable Negotiate (SPNEGO) for proxy authentication.-u anything
Required username. However, this username is ignored. Instead, the principal used in kinit
is applied.
...