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

🚀 Feature: Moving the social media environment variables to the DB #210

Open
1 task done
nevo-david opened this issue Sep 8, 2024 · 5 comments
Open
1 task done

Comments

@nevo-david
Copy link
Contributor

🔖 Feature description

We should move the environment variables of the social media environment to the DB

🎤 Why is this feature needed ?

It would be easier to manage the entire system like that.
This is mostly good because you won't need to deploy the system everytime you update a social media keys.

✌️ How do you aim to achieve this?

  1. Create a new table for keys
  2. Create a CRUD for the super admin to manage all the keys (private + public).
  3. Create a view for the super admin to manage the keys.
  4. Save them into a new table (encrypted)
  5. inject the keys into the IAuthenticator providers.
  6. In-case some of the keys were not provided, you won't be able to load this social media.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

@Prithwi32
Copy link

@nevo-david I would like to work on this issue, could you assign me this issue under devfestAI....and for any queries while implementing, where I can reach out?

@prathamesh424
Copy link
Contributor

@nevo-david assign this issue to me

@jamesread
Copy link
Collaborator

You can ask questions here, or in dev-support on discord.

Before we assign the issue, can either of you explain how you would implement this?

@prathamesh424
Copy link
Contributor

@jamesread :

  1. Create a database table to store social media keys (public and private) for each platform.
  2. Build a simple interface for the super admin to add, update, or delete keys.
  3. Encrypt private keys before storing them in the database for security.
  4. Use the database keys in the authentication process
  5. Show a management view where the user can easily see and manage all keys.
  6. Check for missing keys before using any social media integration, so that incomplete setups don’t break the app.
  7. Secure access so only authorized users can manage the keys.

@jamesread
Copy link
Collaborator

Yep, you're absolutely thinking about this right. :-) Assigning this to you, good luck!

I would say not to worry about encrypting the various API keys as that will make your implementation quite a lot harder, instead people can just opt go encrypt all of postgres, which does not require any code changes.

This is quite a major change, so please check in regularly with updates so we can check you're not creating issues that might not be accepted.

Please use a general settings table in the database, as we'll probably want to store site wide things in the future, more than API keys.

@nevo-david FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants