WordPress.org

Ready to get started?Download WordPress

Forums

Lift: Search for WordPress
[resolved] There was an error authenticating. Please check your Access Key ID and Secret Ac (8 posts)

  1. postme
    Member
    Posted 4 months ago #

    I can see this error has been reported here before. I have provided the correct access key and secret key yet lift-search fails to accept them. They are 100% verifiable correct keys used in other scenarios like aws-cli.

    How can I troubleshoot this issue? Is there a way to turn on logging?

    Kind reagrds
    Meint

    https://wordpress.org/plugins/lift-search/

  2. postme
    Member
    Posted 4 months ago #

    This is additonal http logging taken when verifying the access + secret key:

    Remote Address:xx.xxx.xx.xxx:80
    Request URL:http://wp.test.net/wp-admin/admin-ajax.php?action=lift_setting&setting=credentials&nonce=0b16b2aca9
    Request Method:POST
    Status Code:400 Bad Request
    Request Headersview parsed
    POST /wp-admin/admin-ajax.php?action=lift_setting&setting=credentials&nonce=0b16b2aca9 HTTP/1.1
    Host: wp.test.net
    Connection: keep-alive
    Content-Length: 188
    Accept: application/json, text/javascript, */*; q=0.01
    Origin: http://wp.test.net
    X-Requested-With: XMLHttpRequest
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
    X-HTTP-Method-Override: PUT
    Content-Type: application/x-www-form-urlencoded
    DNT: 1
    Referer: http://wp.test.net/wp-admin/options-general.php?page=lift-search
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4,de;q=0.2
    Cookie: wordpress_6cf1e9f14312c6ad0e649ff5369d143a=XXXXXX%7C1398118448%7Cd33ece68fa286d92844a9b8d92c17de3; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_6cf1e9f14312c6ad0e649ff5369d143a=XXXXXX%7C1398118448%7C1bde216eb59056464f916078a5025812; wp-settings-time-1=1397945651

    Query String Parametersview sourceview URL encoded
    action:lift_setting
    setting:credentials
    nonce:0b16b2aca9

    Form Dataview sourceview URL encoded
    model:{"id":"credentials","value":{"accessKey":"XXXXXXXXXXXXXXXXXXXX","secretKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}}
    _method:PUT

    Response Headersview parsed
    HTTP/1.1 400 Bad Request
    Date: Sat, 19 Apr 2014 22:14:37 GMT
    Server: Apache
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Credentials: true
    X-Robots-Tag: noindex
    X-Content-Type-Options: nosniff
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0, public
    Pragma: no-cache
    X-Frame-Options: SAMEORIGIN
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Node: Hardy
    X-UA-Compatible: IE=Edge,chrome=1
    Content-Length: 192
    Connection: close
    Content-Type: application/json

  3. postme
    Member
    Posted 4 months ago #

    I have installed the AWS SDK for PHP and have created the following cloudsearch client:

    <?php
    require '/usr/share/nginx/html/cloudsearch/vendor/autoload.php';

    use Aws\CloudSearch\CloudSearchClient;

    $client = CloudSearchClient::factory(array(
    'key' => 'XXXXXXXXXXXXXXXXXXXX',
    'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
    'region' => 'eu-west-1'
    ));

    $iterator = $client->getDescribeDomainsIterator();
    foreach ($iterator as $domain) {
    echo $domain['DomainName'] . "\n";
    }

    ?>

    This works flawlessly and the script produces my search domain. It uses the exact same access key and secret key as I'm trying to use in lift-search.

    I've tried the lift-search plugin on a different server with exactly the same issue. I've tried it on Apache and nginx. I've tried it with an older version of WordPress (3.6) and the most recent version 3.9. All situations give the same error wrt access key and security key.

    Looks like the issue is in the lift-search code?

  4. postme
    Member
    Posted 4 months ago #

    Just a hunch, does lift-search support the 2013-01-01 API?

  5. mattstep
    Member
    Posted 3 months ago #

    Have you had any success resolving this? We're hitting this exact same issue.

  6. postme
    Member
    Posted 3 months ago #

    Hi mattstep, no unfortunately not, havent heard a peep from the dev team so far. I have the rather horrible suspicion that the plugin doesnt work with the new 2013-01-01 API but can't proof it.

  7. aeothomas
    Member
    Posted 2 months ago #

    Hi,

    Your hunch was right.

    However, I managed to get past this issue by doing the following:

    Located the lift-search\api folder and opened the cloud-config-api.php

    Locate the class Cloud_Config_Request and I updated the version to 2013-01-01

    This change allowed me to create the domain in cloudsearch.

    I'm sure given the AWS API version changes there is possibly some other underlying logic that may need to change - but at least this gets you passed the first hurdle.

    FYI: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/migrating.html

    Hope that helps - happy coding!

  8. postme
    Member
    Posted 2 weeks ago #

    tnx aeothomas, will look into your solution!

Reply

You must log in to post.

About this Plugin

About this Topic