ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Singhai <ankit...@gmail.com>
Subject REST API Secret key not working
Date Wed, 11 Oct 2017 13:13:37 GMT
Hi All,
I am trying to use secret key for REST API.

Snippet of Ignite Config XML
<property name="connectorConfiguration">
            <bean
class="org.apache.ignite.configuration.ConnectorConfiguration">
                <property name="jettyPath"
value="D:\\ApacheIgnite\\IgniteCaching-2.0\\src\\METAINF\\spring\\jetty.xml"/>
                <property name="secretKey" value="test"/>
            </bean>
        </property>

REST request via POSTMAN

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:6060/ignite?cmd=version")
  .get()
  .addHeader("x-signature",
"\"1507726963290:qUqP5cyxm6YcTAhz05Hph5gvu9M=\"")
  .addHeader("cache-control", "no-cache")
  .addHeader("postman-token", "2cd42700-f138-94c0-38e5-fa8b9727cdf5")
  .build();

Response response = client.newCall(request).execute();

I am getting Response code :- 401 i.e un-authorized

Used openssl to get Base64 SHA1 of test => echo -n "test" | openssl sha1
-binary | base64

Thanks
Ankit Singhai



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message