I'm trying to authenticate against the JSS API URL with a valid login credentials and it seems to constantly fail, e.g. ../JSSResource/accounts with error 401, not authorized. The user has full admin privileges, but continue to fail on the basic auth. I've even tried cURL to see if the behavior is different:
$ curl -kvu "jss:****************" -H "Content-type: text/xml" https://jss.*********/JSSResource/accounts
* Trying *.*.*.*...
* TCP_NODELAY set
* Connected to jss.**** (*.*.*.*) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Iterable, Inc.; CN=*.****
* start date: Dec 20 00:00:00 2017 GMT
* expire date: Jan 4 12:00:00 2019 GMT
* issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user 'jss'
* Using Stream ID: 1 (easy handle 0x7fa10400c600)
> GET /JSSResource/accounts HTTP/2
> Host: jss.****
> Authorization: Basic anNzLWFkbWluOjdIdGt5R0hrJTNKJU4xM1RMSzBWNW1lbQ==
> User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
> Accept: */*
> Referer:
> Content-type: text/xml
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 401
< date: Thu, 08 Feb 2018 22:08:10 GMT
< content-type: text/html;charset=UTF-8
< content-length: 424
< set-cookie: AWSALB=EeUpRKAC4JskdDEjhyLzmc6eDemDZTbUJcQQogDvr8/hH4FmzZxRkVCI4n38u8I63VyBwNunaStiJOQShzA92up7vlHHob4DhmTOkJIhnUM8uNzPPc6MUPBLZJPU; Expires=Thu, 15 Feb 2018 22:08:10 GMT; Path=/
< x-frame-options: SAMEORIGIN
< cache-control: no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0
< accept-ranges: bytes
< server: Apache
* Authentication problem. Ignoring this.
< www-authenticate: Basic realm="Restful JSS Access -- Please supply your credentials"
<
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Unauthorized</p>
<p>The request requires user authentication</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
* Connection #0 to host jss.**** left intact
How do I debug the issue? Is there some .htpasswd equivalent that I can look at?