psss / did

What did you do last week, month, year?
https://did.readthedocs.io/
GNU General Public License v2.0
246 stars 104 forks source link

Allow all plugins to fetch secrets from files #278

Closed kwk closed 1 year ago

kwk commented 1 year ago

Some plugins like the Jira one allowed to store their token used for authentication within a file and have you point to the file using the token_file config option. I liked that idea because it makes did config files much more shareable amongst team members.

That's why I've added the token-in-file mechanism to all plugins. The google plugin also stores a client_it and client_secret that you can also put into a file now by specifying client_id_file and client_secret_file.

I've added tests for the get_token function and for the github plugin to utilize this function when running in a Github action because then the environment variable GITHUB_TOKEN is set and can be tested when putting it in a token file only for it to be consumed then.

lgtm-com[bot] commented 1 year ago

This pull request introduces 1 alert and fixes 1 when merging 53efa9426db94e0b6878a794ddcebc810f7df318 into f3a408130f2e255f0e64f852d101da79fe32a62b - view on LGTM.com

new alerts:

fixed alerts:

lgtm-com[bot] commented 1 year ago

This pull request fixes 1 alert when merging 9f285bf90f7d10a9fcf1c48306d0563ef05acb7d into f3a408130f2e255f0e64f852d101da79fe32a62b - view on LGTM.com

fixed alerts:

lgtm-com[bot] commented 1 year ago

This pull request fixes 1 alert when merging b1f68f70fe965112f091a3971c91c28e6bcf2dce into f3a408130f2e255f0e64f852d101da79fe32a62b - view on LGTM.com

fixed alerts:

kwk commented 1 year ago

@psss in order to fix the error with copr, you'd have to merge this PR first: https://github.com/psss/did/pull/284

kwk commented 1 year ago

@psss I've rebased this patch after #284 landed and the errors with the man page are gone now. I would appreciate if you can give it another review and merged the PR. Please squash the commits when merging as they are mostly fix-up commits. I suggest to use the PR description as commit message.

psss commented 1 year ago

Great, thanks! Squashed and rebased.

kwk commented 1 year ago

Great, thanks! Squashed and rebased.

Oh, I thought you'd squash when you merge in one go. I'm doing this with the drop down in the github merge button. But it depends on your workflow I guess. Thank you.