-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Aws::Organizations::OrganizationsClient::DescribeOrganization API not working as expected #2631
Comments
Hello @japsingh , Thank you very much for your detailed submission. You are right, per the AWS Organizations documentation, the DescribeOrganization request does require the If you look at the code for the DescribeOrganizationRequest: Aws::Http::HeaderValueCollection DescribeOrganizationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DescribeOrganization"));
return headers;
} We do set However, it seems that the request is requestless and doesn't have input specified (see). Because this is generated code from the service team, we need to investigate the issue further to provide a fix. Thank you very much for bringing this up to our attention. We will provide updates here. Best regards, Yasmine |
Hi @yasminetalby, thanks for looking into this and responding. I am not sure if both services are linked in any way, my suspect is that "WorkMailService organization" might be a different concept than "AWS organization". I believe a proper fix should be in aws-sdk-cpp-organizations lib instead. |
@japsingh It may come from the Had the same error with |
Hello @japsingh , Thank you very much for your answer. We are currently working on a fix for this issue. I will keep you updated here! Best regards, Yasmine |
fix has been merged and will be tagged as part of this days release, give a shout if you have any questions |
|
Thank you for fixing this so fast :) |
Describe the bug
This code results in error response:
Expected Behavior
On an EC2 instance where the following AWS CLI command works well:
Trying to run the C++ code mentioned in the bug description should successfully describe the organization.
Current Behavior
However, the code mentioned in the bug description doesn't work. It leads to following error:
Reproduction Steps
This code results in error
Possible Solution
As per my debugging, the error is due to a missing header. When I try to run following command via AWS CLI:
aws organizations describe-organizations
and use Burrp suite to check which headers are added by AWS CLI, then diff with the headers added by the code I shared, then I observe the following header is missing when calling the CPP code to DescribeOrganization():
I tried adding the header by creating my own HTTP client by setting
However, that doesn't work, because the headers are signed before sending in the HTTP request, and therefore the addition of header needs to happen in the SDK, before HTTP header signing takes place.
I see that for other requests like ListRootsRequest, header like this is added in the SDK code:
But, there is no DescribeOrganizationRequest class which can do this job of adding X-Amz-Target header. I think the fix is to create DescribeOrganizationRequest class which adds the correct X-Amz-Target header.
Additional Information/Context
No response
AWS CPP SDK version used
1.11.132
Compiler and Version used
Visual Studio 2019
Operating System and version
Windows 2022 Server
The text was updated successfully, but these errors were encountered: