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

✨ Enhancement: Api keys and other secrets should be loaded in env #514

Closed
maverox opened this issue Mar 11, 2024 · 22 comments · Fixed by #527
Closed

✨ Enhancement: Api keys and other secrets should be loaded in env #514

maverox opened this issue Mar 11, 2024 · 22 comments · Fixed by #527
Assignees
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@maverox
Copy link
Contributor

maverox commented Mar 11, 2024

Is your feature request related to a problem? Please describe

Not necessarily but i think it can result into a problem as it's not a good practice i presume for apiKeys or any keys to remain out int the open.

Describe the solution you'd like

to use dotenv package to load them from an env file

Describe alternatives you've considered

using env files to store such variables
and use dotenv to load them

Additional context

Yes, I would like to get assigned and assisted!

@maverox maverox added Status: Triage This is the initial status for an issue that requires triage. ✨ Enhancement Indicates that the issue suggests an improvement or new feature. labels Mar 11, 2024
Copy link

Welcome to the JSON Schema Community. We are so excited you are here! Thanks a lot for reporting your first issue!! 🎉🎉 Please make sure to take a look to our contributors guide if you plan on opening a pull request. For more details check out README.md file.

@gregsdennis
Copy link
Member

gregsdennis commented Mar 11, 2024

@maverox We should already be hiding any keys in repo secrets, which are then loaded into env vars.

If you've noticed some keys that we've already exposed, please contact @benjagm in a Slack DM.

DO NOT list exposed secrets in a public forum as that only increases visibility.

@maverox
Copy link
Contributor Author

maverox commented Mar 11, 2024

Arey you suggesting i change my issue and make it less specific?
because i didn't exposed the secret itself
But i will do as you say

@gregsdennis
Copy link
Member

Arey you suggesting i change my issue and make it less specific?
because i didn't exposed the secret itself

No, but you exposed where to find it.

@maverox
Copy link
Contributor Author

maverox commented Mar 11, 2024

I have removed those specifics from my message, and also informed him.
I was just trying to help.

Can you please guide me as to what i should do now?

@maverox maverox changed the title ✨ Enhancement: Api keys and other secrets should be loaded in env instead of hardcoding them in source ✨ Enhancement: Api keys and other secrets should be loaded in env Mar 11, 2024
@benjagm
Copy link
Collaborator

benjagm commented Mar 12, 2024

Thanks @maverox ! As you said it will be great to avoid this practice. In order to fix this we need to find a way of:

  • Use .env file.
  • Remove any hardcoded api key.
  • Make sure we can upload the production .env during our deployments in cloudflare.

@benjagm benjagm added Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Status: Available No one has claimed responsibility for resolving this issue. and removed Status: Triage This is the initial status for an issue that requires triage. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. labels Mar 12, 2024
@maverox
Copy link
Contributor Author

maverox commented Mar 12, 2024

@benjagm
I have attached pr #515 that hopefully covers your first two agenda points.
Please have a look and guide me!

@benjagm
Copy link
Collaborator

benjagm commented Mar 12, 2024

I have attached pr #515 that hopefully covers your first two agenda points.
Please have a look and guide me!

Your PR looks great but we need to fix and implement the 3 steps at the same time. Open to do some research for point 3?

@maverox
Copy link
Contributor Author

maverox commented Mar 12, 2024

Also Can you please make assign this to me and make this the mandatory task,
Mentioned in contributors guide for gsoc?

@maverox
Copy link
Contributor Author

maverox commented Mar 12, 2024

I have attached pr #515 that hopefully covers your first two agenda points.
Please have a look and guide me!

Your PR looks great but we need to fix and implement the 3 steps at the same time. Open to do some research for point 3?

Yes I will gladly do, i hope there's no hard deadline as it might take a while.

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Mar 12, 2024
@maverox
Copy link
Contributor Author

maverox commented Mar 20, 2024

@benjagm any advise on further steps that i might take, i am stuck at this moment.

@benjagm
Copy link
Collaborator

benjagm commented Mar 20, 2024

I know you are stuck Uzair. But unfortunately we can proceed with merging this until we have the cloudflare worked.

You have done great. This count as qualification task in this current state so dont worry. As soon as we have time for work the cloudflare part will complete this.

@aialok
Copy link
Collaborator

aialok commented May 14, 2024

Please assign this issue to me as I am currently working on it.
Thank you!

@benjagm
Copy link
Collaborator

benjagm commented May 14, 2024

Thanks Alok. All yours.

@maverox Huge thanks for the work done with this. Now finally are actively working on this again.

@benjagm benjagm assigned aialok and unassigned maverox May 14, 2024
@gregsdennis
Copy link
Member

I thought I had mentioned this before, but it doesn't appear so: Creating and setting secrets can only be done by an admin. Updating the GH action YAML can be done by anyone, but this particular task will need to be performed by one of us.

@aialok
Copy link
Collaborator

aialok commented May 14, 2024

Yes, most of the work has been done already. We don't really need to update anything in YAML or GitHub Action secrets. Setting up .env can be done by the admin who has access to the Cloudflare website project.
From my side, I need to update documentation of installation regarding the uses of .env while setting up project.

Screenshot from 2024-05-14 13-10-28

@benjagm
Copy link
Collaborator

benjagm commented May 14, 2024

I just created the variables in cloudflare:

Screenshot 2024-05-14 at 13 53 09

@aialok
Copy link
Collaborator

aialok commented May 14, 2024

Great ! I checkout the PR in my local everything working fine. We also need to dump the exposed api key so that others will not be able exploit it.

Thank you : )

@maverox
Copy link
Contributor Author

maverox commented May 14, 2024

Have I been unassigned because of inactivity?
Nonetheless, thank you @aialok for taking it up and continuing with the work!🙌.

@benjagm
Copy link
Collaborator

benjagm commented May 14, 2024

@maverox My apologies you are not unassigned!! As part of GSoC Alok is working in the CI CD project and finally we can integrate the great work you did.

You are completing the final step together!

@maverox
Copy link
Contributor Author

maverox commented May 14, 2024

That is really exciting, happy to be of any use.
Best of luck @aialok.

@aialok
Copy link
Collaborator

aialok commented May 15, 2024

Thank you @maverox for amazing work you have done : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
Status: Ready to Review
4 participants