You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dagger cloud cannot be configured without caching #7079
In #6835, we finally removed _EXPERIMENTAL_DAGGER_CLOUD_TOKEN, and replaced it with DAGGER_CLOUD_TOKEN.
However, we were exploiting an undocumented use of this - we could use DAGGER_CLOUD_TOKEN to enable cloud cache + telemetry, while we could use _EXPERIMENTAL_DAGGER_CLOUD_TOKEN to just enable telemetry for security reasons. We want all PRs to use telemetry (so we can get traces), but we don't want all PRs to use caching - since that could introduce potential cache poisoning attacks.
We've hit this on upgrading our runners to use v0.11.1 - the new value is used for both.
Technically this might be doable - the token usage is used in two places:
On the engine it's used as the cache service token
On the client it's used as the telemetry token
The two usages appear completely separate to me. But, we'd need to set two different tokens, one to set on a github runners for cache service, and another to set on the client for the cache service. (I'm not sure if/how we do this).
Additionally, this would only work for us because we provision our engine separately - if we were relying on auto-engine provisioning, we wouldn't be able to rely on this.
We want all PRs to use telemetry (so we can get traces), but we don't want all PRs to use caching - since that could introduce potential cache poisoning attacks.
In a CI environment, given that a token needs to be set up as a secret, PR's from non-contributors shouldn't have access to start the engine with the cache service enabled. Having said that, because our engines are self-hosted and the token is set at the runner level, this currently represents a security issue as you're correctly pointing out.
Activity
jedevc commentedon Apr 11, 2024
cc @vito @marcosnils
jedevc commentedon Apr 11, 2024
Ideally we'd have something like https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect, for running in CI, similar to how Depot does.
Then we could allow automatically provision short lived tokens into Github, and allow automatic scoping for PR environments.
marcosnils commentedon Apr 11, 2024
In a CI environment, given that a token needs to be set up as a secret, PR's from non-contributors shouldn't have access to start the engine with the cache service enabled. Having said that, because our engines are self-hosted and the token is set at the runner level, this currently represents a security issue as you're correctly pointing out.
yes, I totally agree. We have an issue for it internally. We need to prioritize it 🙏