title: DCOS 1.7 authentication failure with Invalid token. Reason: not enough data
body: <p>We built dcos 1.7 cluster in aws using cloud formation template by following "launch dc/os" instructions here <a href="https://dcos.io/docs/1.7/administration/installing/cloud/aws/" rel="nofollow">https://dcos.io/docs/1.7/administration/installing/cloud/aws/</a></p>
  
  <p>I tried to run the following query using curl</p>
  
  <pre><code>curl --header " Authorization: token=xxxxx" https://{dcos-elb}/service/chronos/scheduler/jobs 
  </code></pre>
  
  <p>but got </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Unauthorized&lt;/title&gt;
  &lt;noscript&gt;&lt;meta http-equiv="refresh" content="5; url=/#/login"&gt;&lt;/noscript&gt;
  &lt;script&gt;
    (function () {
      var location = window.location;
      location.href = "/#/login?redirect=" + encodeURIComponent(location.href);
    }())
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;h1&gt;Unauthorized&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I obtained the token by following these instructions
  <a href="https://dcos.io/docs/1.7/administration/security/managing-authentication/#log-in-cli" rel="nofollow">https://dcos.io/docs/1.7/administration/security/managing-authentication/#log-in-cli</a></p>
  
  <p>i.e. in browser paste this url: https:///login?redirect_uri=urn:ietf:wg:oauth:2.0:oob, login with google creds and then copy the token</p>
  
  <p>adminrouter logs in master node has following lines</p>
  
  <pre><code>[notice] 31915#0: *8026 [lua] auth.lua:119: validate_jwt_or_exit(): Invalid token. Reason: not enough data, client: xx.xx.xx.xx, server: dcos.*, request: "GET /service/chronos/scheduler/jobs HTTP/1.1", host: "xxxxx"
  </code></pre>
  
  <p>How can I resolve this issue ?. Do I have to include any extra payload with curl query ?</p>
  
  <p>Any suggestions would be much appreciated. Thanks </p>