Issue with Authenticating OCI REST API calls for DNS
Summary:
We're using PHP to call the Oracle cloud REST APIs for some DNS configuration. However, the code we are trying to use is only getting back 401 Authentication Errors.
Content (required):
What we know so far:
- Direct CLI works. So, the user config information we are trying to reuse in code is correct.
- Also tried creating new keypairs and using them in code to sign the request.
- System clock is only varying by approx 1 min, so that isn't the problem.
Have ran a debug on the CLI command and below is what it gives:
Request: GET https://dns.us-sanjose-1.oci.oraclecloud.com/20180115/zones/exampledomain.com Not using Expect header... send: b'GET /20180115/zones/exampledomain.com HTTP/1.1\r\nuser-agent: Oracle-PythonSDK/2.78.0 (python 3.7.9; AMD64-Windows) Oracle-PythonCLI/3.14.0\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nconnection: keep-alive\r\ncontent-type: application/json\r\nopc-request-id: 670F2*****7304\r\nopc-client-retries: true\r\nopc-client-info: Oracle-PythonSDK/2.78.0\r\ndate: Thu, 18 Aug 2022 17:39:58 GMT\r\nhost: dns.us-sanjose-1.oci.oraclecloud.com\r\nauthorization: Signature algorithm="rsa-sha256",headers="date (request-target) host",keyId="ocid1.tenancy.oc1..<ID>/ocid1.user.oc1..<ID>/<fingerprint>",signature="===masked==",version="1"\r\n\r\n'
Tagged:
0