Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support User & Org API keys #62

Closed
ccaputo opened this issue Mar 4, 2022 · 6 comments · Fixed by #63
Closed

Support User & Org API keys #62

ccaputo opened this issue Mar 4, 2022 · 6 comments · Fixed by #63
Labels
Minor Up to 4 hours

Comments

@ccaputo
Copy link
Contributor

ccaputo commented Mar 4, 2022

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
Copy link
Member

grizz commented Mar 4, 2022

+1

@grizz
Copy link
Member

grizz commented Mar 4, 2022

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

@martinhannigan
Copy link

martinhannigan commented Mar 4, 2022 via email

@grizz grizz added this to the 1 Decide milestone Mar 4, 2022
@peterhelmenstine
Copy link

Agreed

@job
Copy link
Contributor

job commented Mar 14, 2022

Yes, useful. +1

@vegu vegu added the Minor Up to 4 hours label Mar 15, 2022
vegu pushed a commit that referenced this issue Apr 11, 2022
vegu added a commit that referenced this issue Apr 11, 2022
Support User & Org API keys #62

See merge request gh/peeringdb/peeringdb-py!9
@vegu vegu mentioned this issue Apr 11, 2022
@ccaputo
Copy link
Contributor Author

ccaputo commented Apr 16, 2022

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.

@vegu vegu closed this as completed in #63 May 13, 2022
vegu added a commit that referenced this issue May 13, 2022
* Support User & Org API keys #62

* linting

* changelog

* fix http status check for invalid auth

* poetry lock / pre-commit

* fix github test workflow

* use correct poetry workflow

* comment pre-commit check for now

* more workflow adjustments

* fix workflows, add py3.10

* poetry lock, use collections.abc

* clean up

* fix typo

* add munge extras flag to install yaml (#57)

* update deps

* update mypy

Co-authored-by: David Poarch <dpoarch@20c.com>
Co-authored-by: Matt Griswold <grizz@20c.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Up to 4 hours
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants