Conversation
a3e1e4d to
5e3e2a8
Compare
| exec(`yq w -i ${this.options.installerConfigPath} 'workspace.templates.default.spec.containers.(name==workspace).env[+].name' GITPOD_CONFIGCAT_SDK_KEY`); | ||
| exec(`yq w -i ${this.options.installerConfigPath} 'workspace.templates.default.spec.containers.(name==workspace).env.(name==GITPOD_CONFIGCAT_SDK_KEY).value' "${configcatKey}"`); |
There was a problem hiding this comment.
what's the a reason to put the key in an env variable? I know the key is public but in general I think is not a good practice to put secrets in env variables and also pollutes the shell environment, is it just to avoid copying it for the different clients that may use it (vscode/jetbrains/supervisor)?
There was a problem hiding this comment.
This is how we did with segment. (Even openvscode-server is using server API trackEvent)
gitpod/.werft/jobs/build/installer/installer.ts
Lines 263 to 264 in 867b11f
There was a problem hiding this comment.
yeah I see that, the same applies to it 🙂
There was a problem hiding this comment.
yeah I see that, the same applies to it 🙂
@jeanp413 I thought segment env var in workspace is not used by anyone. Maybe remove it after ask other teams if it affect something.
If we don't want configcat key to exists in env var, where should we put it and other secret in with third-party component?
- 👎 Inside build process will affect Self-Hosted images
- 👎 Inside env leak secret
- 👎 Inside API only make it a little bit harder to leak
- 👍 Ask server to provide API about configcat (experimental) like
trackEventAPI
There was a problem hiding this comment.
As the key is public, I thought it can be ok. ( I see dashboard just use it with a constant value here XD)
For segment's key GITPOD_ANALYTICS_SEGMENT_KEY, it's ok too because its value is refer to Production Untrusted project
gitpod/components/dashboard/src/experiments/client.ts
Lines 34 to 45 in 7dbfa49
There was a problem hiding this comment.
👍 Ask server to provide API about configcat (experimental) like trackEvent API
Should we change plan to add it to server API? It benefits other components like JetBrains Gateway to use it easier. But will take long time to change related codes.
Maybe an issue labels with tech-debt is good for all teams too. (And let go this PR 🙈
There was a problem hiding this comment.
No we should not go through server for it, but used ConfigCat directly.
There was a problem hiding this comment.
The good thing about env var is that it is available to all IDEs, so IDE can use it or fallback to non-production hardcoded inside. I think it is alright to continue with env var.
7dbfa49 to
9c1a5c1
Compare
Description
Related Issue(s)
Fixes #
How to test
With preview env of this PR
gitpod_experimental_portsView_enabledkey with team_ids labels appended with your team_idRelease Notes
Documentation
Werft options: