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

Make ZenodoManager anonymous (token-less) calls keyring-free #45

Closed
eblondel opened this issue Sep 4, 2020 · 9 comments
Closed

Make ZenodoManager anonymous (token-less) calls keyring-free #45

eblondel opened this issue Sep 4, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@eblondel
Copy link
Owner

eblondel commented Sep 4, 2020

This is not an issue as long as keyring is installed on machines. It is essentially an issue on CRAN checks (Fedora, Macos flavors) and for R codes that are tested / run on CRAN checks, as it is the case in reverse depends GermaParl package (use of zen4R for data downloads from DOI).

The purpose is to bind the keyring use when a token is specified. When anonymous / tokenless use (token = NULL), the keyring functions should not be invoked.

@eblondel eblondel added the enhancement New feature or request label Sep 4, 2020
@eblondel eblondel added this to the 0.4 milestone Sep 4, 2020
@eblondel eblondel self-assigned this Sep 4, 2020
@eblondel eblondel closed this as completed Sep 4, 2020
@maelle
Copy link

maelle commented Sep 3, 2021

Coming a bit late to this, 1) thanks for this package and 2) how would you recommend using a token... whilst on a CI system? (we have a workflow building a bookdown book on GitHub Actions and use zen4R).

@PietrH
Copy link

PietrH commented Sep 3, 2021

@maelle , so you don't want to use keyring to get system credentials? https://r-lib.github.io/keyring/index.html

@maelle
Copy link

maelle commented Sep 3, 2021

@PietrH I wanted to know whether there were some tips related to using it on GitHub Actions :-)

@PietrH
Copy link

PietrH commented Sep 3, 2021

I've never used it, but I know you can pipe in secrets via https://docs.github.com/en/actions/reference/encrypted-secrets

@eblondel
Copy link
Owner Author

eblondel commented Sep 9, 2021

@maelle i'm setting up a github action for R CMD check (previously was done on Travis) in order to consolidate some integrateion tests. There i'm using a a secret token from my Github to interact with the Zenodo sandbox:

Zen4R now relies on keyring to get system credentials, and token is not anymore stored as field of the ZenodoManager. Note that as recent fix to follow recent changes in keyring for Linux OS, the keyring backend will be set to env. If you use Linux OS and still use zen4R from CRAN, you may have this issue, where you will be asked to set-up password for 'system' keyring. The fix is now in Github and will be soon released to CRAN.

@maelle
Copy link

maelle commented Sep 9, 2021

thank you @eblondel!

@maelle
Copy link

maelle commented Sep 10, 2021

Another question (happy to use another communication channel if better): from Zen4R, can one choose what keyring backend to use?

Another approach to authentication in opencage: having a function for authenticating but suggesting the use of keyring https://docs.ropensci.org/opencage/articles/opencage.html#authentication

@eblondel
Copy link
Owner Author

not yet, for the timebeing i've put a default to env, but i will see to make it as argument or option;
For discussing I've set up a Github "discussion" (since yesterday only :-) ), feel free to use that in future.

@eblondel
Copy link
Owner Author

@maelle i've pushed some enhancement to let user define the keyring_backend when initializing the ZenodoManager, with default value to 'env'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants