-
Notifications
You must be signed in to change notification settings - Fork 2.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
Kinesis Video Signaling Channels - SDK may not get the correct name with custom endpoint #3367
Comments
Hi @marcotuna, thanks for bringing this to our attention. The SigningName for a service is typically what is used when building the Authorization header during the signing process, if that value is not present in the service's API model (as is the case here) the SDK typically falls back on the endpoint model. However, in this case since a custom endpoint is being specified the SDK is falling back on using the ServiceName which in this case is not appropriate for the signature expected by the service. We'll look into fixing this shortly, once we have additional information we'll update the issue accordingly. |
Looks like the SDK needs to add a custom request handler for this API if possible, to detect when a custom endpoint is provided, and lookup the signing name for the API. |
Potential solution: Add a model customization to the code generator to inject the correct signing name into the C2J model. |
|
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When using the AWS SDK for Kinesis Video Signaling Channels the HTTP Post request created by the SDK uses wrong values.
This is an excerpt of the HTTP request header:
As you can see, in the excerpt there is the name Kinesis Video Signaling, however that name should be kinesisvideo only.
This ends up resulting in a 403 HTTP error with the following message:
Version of AWS SDK for Go?
v1.32.0
Version of Go (
go version
)?1.14.2
To Reproduce (observed behavior)
Expected behavior
The expected behavior should be an HTTP 200 with a content similar to this:
Additional context
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_AWSAcuitySignalingService_GetIceServerConfig.html
One workaround for this problem is to add the following line after the kinesisvideosignalingchannels instantiation
kvsc.Client.ServiceName = "kinesisvideo"
Refer to the following file:
https://github.com/aws/aws-sdk-go/blob/master/service/kinesisvideosignalingchannels/service.go#L61
The text was updated successfully, but these errors were encountered: