404 Error regarding unrapping KMS Crypto key - google-cloud-kms

Seeing the following error when attempting to unwrap KMS key. Key ring exists in us-east1
google.api_core.exceptions.NotFound: 404 Received the following error message from Cloud KMS when unwrapping KmsWrappedCryptoKey "projects/PROJECT_ID/locations/us-east1/keyRings/KEYRING_NAME/cryptoKeys/KEY_NAME": The request concerns location 'us-east1' but was sent to location 'global'. Read go/storky-stubby for more information.

Related

KingswaySoft Upsert Bad Request

I am currently using KingswaySoft for ETL into Dynamics. We have a need for the upsert action for future trickle loading. Each time I use upsert on a entity (table in dynamics), that has data in it already, I am facing a bad request error.
[Dynamics CRM Destination [2]] Error: An error occurred with the following error message: "KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException: CRM service call returned an error: The remote server returned an error: (400) Bad Request. (Error Type / Reason: BadRequest, Detailed Message: --batchresponse_a42eef80-4222-496c-8c69-ff6660222ef4
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
REQ_ID: a9868fb9-d02b-4595-a329-a855c92ced17
Content-Type: application/json; odata.metadata=minimal
OData-Version: 4.0
{"error":{"code":"0x80040265","message":"Unhandled Plugin Exception Object reference not set to an instance of an object."}}
--batchresponse_a42eef80-4222-496c-8c69-ff6660222ef4--
) (SSIS Integration Toolkit for Microsoft Dynamics 365, v21.1.0.1671 - DtsDebugHost, v15.0.2000.152)KingswaySoft.IntegrationToolkit.DynamicsCrm.WebAPI.WebApiServiceException
: The remote server returned an error: (400) Bad Request. (Error Type / Reason: BadRequest, Detailed Message: --batchresponse_a42eef80-4222-496c-8c69-ff6660222ef4
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
REQ_ID: a9868fb9-d02b-4595-a329-a855c92ced17
Content-Type: application/json; odata.metadata=minimal
OData-Version: 4.0
{"error":{"code":"0x80040265","message":"Unhandled Plugin Exception Object reference not set to an instance of an object."}}
--batchresponse_a42eef80-4222-496c-8c69-ff6660222ef4--
)System.Net.WebException
(Status Reason: BadRequest): The remote server returned an error: (400) Bad Request.".
I am manually specifying Record Matching Criteria on a primary key from the staging tables that does live on the records in Dynamics.
The error that you have received indicates that you have an unhandled null reference error in your custom code, you need to fix the error in your plugin code. Alternatively, you could turn on the "Tentatively Disable Relevant Plugins" option in the CDS/CRM destination component, in which case our software will tentatively disable your plugin while loading the data. In doing so, we do recommend you upgrade your software installation to the latest v21.2 release that we just made available last week. In the new release, there is the "Bypass Custom Business Logic" option which serves the purpose better by bypassing (not actually turning off or disabling) your custom plugins. We hope this helps, please give it a try and share the update with us if you need further assistance.

SBL-EAI-04116:HTTP Internet Exception during 'Data Send': 'An error occurred in the secure channel support', code: '12157'

Integration Siebel - Google geocoding:
the URL requests sent directly from the browser:
https://maps.googleapis.com/maps/api/geocode/xml?address=Landsdorf%20Strasse,,Gr%C3%BCnewald,01945,Deutschland&key=API_key
where API_key = particular API key provided by Google during first registration
Such request is working correctly, the response with geo codes is returned into the browser screen.
However if the same request is sent via Siebel through BS: EAI HTTP Transport
The error is displayed:
SBL-EAI-04116:HTTP Internet Exception during 'Data Send': 'An error
occurred in the secure channel support', code: '12157'.
Described solutions on official Oracle support Web for that error are related to some missing certificate on external Server , (in our case Google Server)
This is a faily generic occuring at the Wininet layer during the SSL handshake.
And action should be: Throughly check the external webserver logs wih increased SSL tracing level on webserver.
but logically it does not make a sense, why URL request directly from the browser (same network) has been successfully sent and response was received
without using any certifications or similar stuff related to SSL handshake
Can someone help with it ?
Thank you
Best regards
I have a hunch here Siebel is sending data in UTF-16 format, and end point is rejecting it. Please check your outgoing trace messages.

Google cloud KMS: encryption works but decryption fails

I am trying to decrypt a token using the google KMS tool.
Running it locally, for some reason, encryption seems to work but not decryption.
I am running the following code:
import base64
import googleapiclient.discovery
kms_client = googleapiclient.discovery.build('cloudkms', 'v1')
crypto_keys = kms_client.projects().locations().keyRings().cryptoKeys()
name = "projects/my-project/locations/my-loc/keyRings/my-kr/cryptoKeys/my-key"
request = crypto_keys.decrypt(name=name, body={'ciphertext': base64.b64encode("my text").decode('ascii')})
response = request.execute()
The last line returns a 400 error:
HttpError: <HttpError 400 when requesting https://cloudkms.g[...]ion:decrypt?alt=json
returned "Decryption failed: verify that 'name' refers to the correct CryptoKey.">
The name, however, actually seems to be correct.
Surprisingly enough, replacing the call to decrypt by encrypt, I obtain a valid output.
Am I missing an obvious mistake, or should I just open a issue on the project's github ?
EDIT:
I was trying to decrypt plain text, which of course does not make much sense (but the error message misled me somewhat).
Make sure that the ciphertext you're trying to decrypt was encrypted using the same key. In case you used another key to encrypt, KMS tells you that it could not find the key while actually the key was found but couldn't be used to decrypt the cipher.
I think the error message is "a bit" misleading.

CORS headers missing from response when POST with invalid JSON in AWS Api Gateway API

We have an AWS API Gateway API that works for CORS most of the time. The only exception is when POSTing with invalid JSON, when CORS headers are missing from the response. If it is a valid JSON but it fails data validation, then the CORS headers are correctly set. I tried to reset the root resource by 'enable CORS' for root resource and redeploy, the same situation.
Just wondering if anyone has seen this before and how to fix it. Thanks
found the answer myself. If APIG has not reached integration in this case, need to customize the gateway response
https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html

themoviedb Search Movie 401 error

I am on themoviedb.org to understand request and response for search movie. I am received api_key. When I try to use their console on the site with api_key and query. I am getting 401 error.
The detailed error message is:
status code 7
status message invalid api key
If I use the same key in my code, I dont receive any error. Can anyone please help?
This is usually caused by Apiary expecting the API key to be sent as a header as opposed to what TMDb expects (which is just a query parameter).
If you add the 'api_key' as a query parameter to your URL instead, it should work.