Tim Cashion
09/09/2024, 7:13 PMcurl --request GET \
--header "Authorization: Bearer $signed_jwt" \
--header 'Content-Type: application/vnd.gooddata.api+json' \
$HOST_URL/api/v1/profile -v
Note: Unnecessary use of -X or --request, GET is already inferred.
* Host <http://pushoperations-test.cloud.gooddata.com:443|pushoperations-test.cloud.gooddata.com:443> was resolved.
* IPv6: (none)
* IPv4: 54.225.116.104, 34.202.40.188, 52.70.92.108
* Trying 54.225.116.104:443...
* Connected to <http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com> (54.225.116.104) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
* subject: CN=<http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com>
* start date: Aug 16 11:45:52 2024 GMT
* expire date: Nov 14 11:45:51 2024 GMT
* subjectAltName: host "<http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com>" matched cert's "<http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com>"
* issuer: C=US; O=Let's Encrypt; CN=R11
* SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for <https://pushoperations-test.cloud.gooddata.com/api/v1/profile>
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: <http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com>]
* [HTTP/2] [1] [:path: /api/v1/profile]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [authorization: Bearer [REDACTED]]
* [HTTP/2] [1] [content-type: application/vnd.gooddata.api+json]
> GET /api/v1/profile HTTP/2
> Host: <http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com>
> User-Agent: curl/8.7.1
> Accept: */*
> Authorization: Bearer [REDACTED]
> Content-Type: application/vnd.gooddata.api+json
>
* Request completely sent off
< HTTP/2 401
< date: Mon, 09 Sep 2024 18:16:47 GMT
< content-length: 0
< vary: Origin
< vary: Access-Control-Request-Method
< vary: Access-Control-Request-Headers
< www-authenticate: Bearer error="invalid_token", error_description="The JWT contains invalid claims.", error_uri="<https://tools.ietf.org/html/rfc6750#section-3.1>"
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< expires: 0
< x-content-type-options: nosniff
< strict-transport-security: max-age=63072000; includeSubDomains
< x-xss-protection: 1; mode=block
< referrer-policy: no-referrer
<
* Connection #0 to host <http://pushoperations-test.cloud.gooddata.com|pushoperations-test.cloud.gooddata.com> left intact
Francisco Antunes
09/09/2024, 7:28 PMSigned JWT rejected: Another algorithm expected, or no matching key(s) found
. It’s pretty self-explanatory, indicating that either there’s no JWK matching the Token, or that the algorithm on the Token doesn’t match the one used on the Key.
I understand the JWT auth already works on your prod environment; Are you using the same Key pair on Dev/Test? Or did you generate different ones for these domains? Was the same setup completed on these other domains?Tim Cashion
09/09/2024, 7:31 PMTim Cashion
09/09/2024, 7:33 PMFrancisco Antunes
09/09/2024, 7:39 PMTim Cashion
09/09/2024, 7:41 PMFrancisco Antunes
09/09/2024, 8:02 PMTim Cashion
09/09/2024, 8:53 PMFrancisco Antunes
09/09/2024, 9:05 PMSigned JWT rejected: Invalid signature
, which does indicate that the Token hasn’t been signed properly.
Have you tried decoding the JWT on https://jwt.io/ or similar tool, checking whether they are valid, and comparing the results to the JWK?Tim Cashion
09/09/2024, 9:26 PMFrancisco Antunes
09/09/2024, 9:36 PMFrancisco Antunes
09/10/2024, 7:19 PMTim Cashion
09/10/2024, 7:20 PMTim Cashion
09/10/2024, 7:21 PM