Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Update to support Gandi Personal Access Tokens #30

Closed
0xdade opened this issue Nov 20, 2023 · 1 comment
Closed

Update to support Gandi Personal Access Tokens #30

0xdade opened this issue Nov 20, 2023 · 1 comment

Comments

@0xdade
Copy link

0xdade commented Nov 20, 2023

Gandi is now advocating strongly for Personal Access Tokens and it can be a little difficult to find the correct place to get an API Key. These new Personal Access Tokens allow considerably more granularity in control, meaning we can scope them down to individual resources and specific permissions.

The primary differences between the API Key and the Personal Access Token appear to be:

  • Uses Authorization: Bearer <key> rather than Authorization: ApiKey <key>
  • Personal Access Token looks like a 40-character hex-string, whereas ApiKey is a 24 character [a-zA-Z0-9] string

This means that it could be possible to support both of these dynamically based on the shape of the supplied key and alter the Authorization: header accordingly.

Alternatively, you could store the "type" of key in the same Secret as the key itself.

@bwolf
Copy link
Owner

bwolf commented Nov 29, 2023

Sounds good. A PR would be welcome either here or (better) at the future maintainer of the package.

@bwolf bwolf closed this as completed Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants