scylladb / scylladb-cloud-doc-issues

A repo for Scylla Cloud docs issues
https://cloud.docs.scylladb.com/stable/
1 stars 1 forks source link

docs: Issue in page Create a Personal Token for Authentication #11

Closed Kikivsantos closed 8 months ago

Kikivsantos commented 8 months ago

I would like to report an issue in page https://cloud.docs.scylladb.com/master/api-docs/create-api-token

Problem

I'm trying to use the command with my personal token and it's not working. Do I need to install or configure something in my machine first?

command: curl --request GET --url https://api.cloud.scylladb.com/deployment/cloud-providers --header 'Authorization: Bearer '

Error: curl: (60) SSL certificate problem: self-signed certificate in certificate chain More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.

PS: A co-worker of my could run this in hes machine. So it's probably something that I dont have install or cofigured in my machine, but cant find what it is.

Thanks

Kikivsantos commented 8 months ago

PS: With --insecure it runs fine from my machine.

But I need this to work without the --insecure, so I can run terraform to manage my infrastructure

annastuchlik commented 8 months ago

Thanks for reporting.

@mixellent @noellymedina @hopugop I'm not sure this is a documentation issue. Could you help out?

mrVanboy commented 8 months ago

Hello @Kikivsantos

thank you for the report. We were not able to reproduce the issue. I tried to isolate as many things and possible and run everything in the alpine container with docker:


$ docker run --rm -ti alpine

$ apk add curl

$ export API_TOKEN=<TOKEN_VALUE>

# remove the --head flag to see the response
$ curl \
    --header "Authorization: Bearer ${API_TOKEN}" \
    --head \
     https://api.cloud.scylladb.com/deployment/cloud-providers 

HTTP/2 200
date: Fri, 08 Dec 2023 19:29:41 GMT
content-type: application/json; charset=utf-8
content-length: 137
...

It would be helpful to run curl with -v or -vv flags to see more details. Our API should be signed with ISRG Root X2 and cross-signed with ISRG Root X1 certificate (details). Those certificate authorities are common in many package managers, if they are relying on Mozilla's CA Certificate program:

So far the only recommendation I could made is to check the root certificates on the machine where curl was failing to run. Alternatively same link could be opened in web browser to check if certificates are all-right.


I also see that you reported in a terraform repository that curl worked as expected: https://github.com/scylladb/terraform-provider-scylladbcloud/issues/99#issuecomment-1847193983

annastuchlik commented 8 months ago

@Kikivsantos I hope the answer provided above helps. I'm closing this issue as it's not related to the documentation. Should you have more questions, please contact ScyllDB Cloud support: cloud.scylladb.com/support