peeringdb / peeringdb-py

PeeringDB python client
BSD 2-Clause "Simplified" License
86 stars 21 forks source link

Support User & Org API keys #62

Closed ccaputo closed 2 years ago

ccaputo commented 2 years ago

Now that PeeringDB supports API keys (User & Org), we need to update this premier caching client to support them.

I recommend a config.yaml entry as follows, along with a documentation update:

sync:
  apikey: <apikey>

As part of this effort, both API key and user/pass authentication errors should be printed for the user to see, along with a failure exit code from a peeringdb sync attempt, so that users running this from cron, such as with chronic, may be informed of failures.

grizz commented 2 years ago

+1

grizz commented 2 years ago

@peeringdb/pc I'm all for this, please vote!

martinhannigan commented 2 years ago

+1

On Thu, Mar 3, 2022 at 19:17 Matt Griswold @.***> wrote:

@peeringdb/pc https://github.com/orgs/peeringdb/teams/pc I'm all for this, please vote!

— Reply to this email directly, view it on GitHub https://github.com/peeringdb/peeringdb-py/issues/62#issuecomment-1058691684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFA2YQXJULQG52BRYAGBI63U6FJCVANCNFSM5P4C7TWQ . You are receiving this because you are on a team that was mentioned.Message ID: @.***>

peterhelmenstine commented 2 years ago

Agreed

job commented 2 years ago

Yes, useful. +1

ccaputo commented 2 years ago

I have tested branch support_202203 with both Org & User API Keys, positive and negative (auth-fail) testing. It is working well. Fix for #57 remains needed. Once that is done, I recommend it and Pull Request #63 be merged and pushed to PyPi.