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

Update naas.secret with new method #437

Closed
FlorentLvr opened this issue Jan 22, 2024 · 5 comments · Fixed by #438
Closed

Update naas.secret with new method #437

FlorentLvr opened this issue Jan 22, 2024 · 5 comments · Fixed by #438
Assignees
Labels
enhancement New feature or request

Comments

@FlorentLvr
Copy link
Contributor

No description provided.

@FlorentLvr FlorentLvr converted this from a draft issue Jan 22, 2024
@FlorentLvr FlorentLvr added the enhancement New feature or request label Jan 22, 2024
@Dr0p42
Copy link
Collaborator

Dr0p42 commented Feb 1, 2024

We need to make use of the new naas-python.secret SDK. The way we handle secrets should be as follow now:

As a user when I want to get a secret value:

- if the secret exists on api.naas.ai AND exists locally, then I remove the local version.
- If the secret exists on api.naas.ai I use that value.
- If the secret does not exists on api.naas.ai
 - If the secret exists locally
  - I take the local secret and create it on api.naas.ai.
  - I delete the local version of the secret.

As a user when I list secrets:

- First I sync local with api.naas.ai.
 - If the secret exists locally AND in api.naas.ai, I remove the local version of the secret.
 - If the secret exists locally and does not exists in api.naas.ai, I create it in api.naas.ai and I delete the local version.
- Then, I list the secrets existing in api.naas.ai only.

As a user when I want to create a secret:

- I create it on api.naas.ai.
- If the same secret name exists locally, I remove it.

As a user when I want to delete a secret:

- I remove it from api.naas.ai
- I remove it locally

Doing so, secrets should move from local to api smoothly.

This should allow us to do a drop in replacement of the way we store secret.

@FlorentLvr
Copy link
Contributor Author

@Dr0p42, sounds great!

@l-loic l-loic moved this from 🔖 Ready to 🏗 In progress in ⚡️ Product Roadmap Feb 2, 2024
@l-loic l-loic linked a pull request Feb 6, 2024 that will close this issue
@l-loic l-loic moved this from 🏗 In progress to 👀 In review in ⚡️ Product Roadmap Feb 7, 2024
@Dr0p42 Dr0p42 moved this from 👀 In review to 🛑 On Hold in ⚡️ Product Roadmap Feb 7, 2024
@Dr0p42
Copy link
Collaborator

Dr0p42 commented Feb 7, 2024

This issue needs jupyter-naas/naas-python#33 to be completed first

@Dr0p42
Copy link
Collaborator

Dr0p42 commented Feb 7, 2024

This issue is also blocked by this one: jupyter-naas/naas-python#32

@l-loic l-loic moved this from 🛑 On Hold to 👀 In review in ⚡️ Product Roadmap Feb 12, 2024
@Dr0p42
Copy link
Collaborator

Dr0p42 commented Feb 23, 2024

Addition @l-loic , can you add some logic to:

  • if /home/ftp/.naas/secrets.backup.json does not exists: copy /home/ftp/.naas/secrets.json /home/ftp/.naas/secrets.backup.json

This will ensure that we have a backup just in case.

@l-loic l-loic moved this from 👀 In review to 🏗 In progress in ⚡️ Product Roadmap Feb 26, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in ⚡️ Product Roadmap Mar 18, 2024
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
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants