Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to establish Cognito client connection #2944

Closed
quinnjr opened this issue Jun 17, 2024 · 5 comments · Fixed by #2945
Closed

Unable to establish Cognito client connection #2944

quinnjr opened this issue Jun 17, 2024 · 5 comments · Fixed by #2945
Assignees
Labels
bug This issue is a bug. p0 This issue is the highest priority pr/work-in-progress This PR is a draft and needs further work.

Comments

@quinnjr
Copy link

quinnjr commented Jun 17, 2024

Describe the bug

As of roughly 2:00PM on 6/17/2024, we've been unable to establish client connections to Cognito to verify access tokens that are produced by the service.

Error output: Could not resolve an authentication scheme: The service does not support smithy.api#noAuth authentication.

Expected Behavior

Connect to Cognito and verify access token

Current Behavior

No connection to Cognito can be established

Reproduction Steps

Example code:

try { // Verify access token with Cognito

    // Create Cognito client
    $client = new CognitoIdentityProviderClient([
        'region' => $config['aws']['region'],
        'version' => $config['aws']['version'],
        'credentials' => $config['aws']['credentials']
    ]);

    $cognito_user = $client->getUser(['AccessToken' => $data->accessToken]);

} catch (Exception $e) {
    $response['message'] = 'Invalid access token';
    //Update tracking api call request
    update_api_request($api_id, $response);

    http_response_code(401); // Unauthorized

    $logger->addRecord(Logger::ERROR, $e->getMessage());

    echo json_encode($response, true);
    exit;
}

$config['aws']['credentials'] is a correct associative array with valid access credentials.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.314.3

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 8.2.15, Ubuntu 22.04

@quinnjr quinnjr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 17, 2024
@quinnjr
Copy link
Author

quinnjr commented Jun 17, 2024

Confirming downgrading to 3.314.2 corrected the issue.

@durimjusaj
Copy link

Same issue, Confirming downgrading to 3.314.2 corrected the issue.

@RanVaknin RanVaknin self-assigned this Jun 18, 2024
@stobrien89
Copy link
Member

Hi all,

Sorry to hear about the issues. Looking into this now.

@stobrien89 stobrien89 removed the needs-triage This issue or PR still needs to be triaged. label Jun 18, 2024
@RanVaknin RanVaknin added p0 This issue is the highest priority investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jun 18, 2024
@stobrien89 stobrien89 self-assigned this Jun 18, 2024
@stobrien89 stobrien89 added pr/work-in-progress This PR is a draft and needs further work. p0 This issue is the highest priority and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. p0 This issue is the highest priority labels Jun 18, 2024
@stobrien89
Copy link
Member

This was caused by a discrepancy in the noAuth value in our specification vs what was actually modeled. We recently released a feature which allows services to model multiple auth types for the service as a whole, as well as certain operations— the getUser operation uses the auth type that the discrepancy lies with. This should be fixed in today's release.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p0 This issue is the highest priority pr/work-in-progress This PR is a draft and needs further work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants