codership / galera-manager-support

Galera Manager Support Repository
8 stars 2 forks source link

Error validating new DigitalOcean API token formats when creating clusters #31

Closed bentranter closed 2 years ago

bentranter commented 2 years ago

Hello from DigitalOcean 👋

I'm on the API Engineering team, and we recently updated our API token formats. It appears this is causing issues with Galera's recently released DigitalOcean support.

When trying to create a new cluster with a new token format, I see the following error:

{
  "errors": [
    {
      "code": "validation_match_invalid",
      "title": "Validation Error",
      "detail": "must be in a valid format",
      "source": {
        "pointer": "/data/attributes/sharedConfig/host/hostTypeSpecific/accessToken"
      }
    }
  ]
}

Given the value of the pointer field, it makes me think that the issue is with the validation of the new tokens.

Our new tokens can be checked using the regex /do[opr]_v\d_[0-9a-f]{64}/g. An example of a valid new API token is dop_v1_abc1230000000000000000000000000000000000000000000000000000000000. For now, users can have both our older tokens (which were random 64 character hexadecimal strings), or the new format, so both should be supported to resolve this issue.

If there's anything I can do to help, or if you need any more information, please let me know. Thanks!

denisgcm commented 2 years ago

I'm sorry you experienced this iusuue and thank you for your report. This will be fixed in the next release.

mihaellenic commented 2 years ago

@bentranter thank you for the details. It's fixed in 1.6.4 which was released today!