Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat/sg: do not persist external secrets#63890

Merged
bobheadxi merged 2 commits into
mainfrom
sg-do-not-persist-external-secrets
Jul 18, 2024
Merged

feat/sg: do not persist external secrets#63890
bobheadxi merged 2 commits into
mainfrom
sg-do-not-persist-external-secrets

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jul 17, 2024

Copy link
Copy Markdown
Member

Secrets fetched from GSM should probably not be stored locally. As we increase the usage of fetching external secrets, this stuff is increasingly sensitive, particularly for SAMS stuff - every time it's used, we should ensure that the user has the required permissions, and also only store external secrets in-memory.

It looks like several other callsites make use of the persistence of other secrets e.g. those prompted from users, so this change specifically targets the GetExternal method. Additionally, I also added a check on load to delete any legacy external secrets that are stored to disk on load - we can remove this after a few weeks.

Test plan

Unit tests asserts old behaviour and new desired behaviour

sg start -cmd cody-gateway uses external secrets and works as expected

After running sg, sg secret list has no external secrets anymore

@bobheadxi bobheadxi requested review from a team July 17, 2024 21:13
@cla-bot cla-bot Bot added the cla-signed label Jul 17, 2024

@evict evict left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks for doing this. 🙏

@bobheadxi bobheadxi merged commit f6ce941 into main Jul 18, 2024
@bobheadxi bobheadxi deleted the sg-do-not-persist-external-secrets branch July 18, 2024 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants