Skip to content

Support for Mongo Token rotation #1089

@PuneetPunamiya

Description

@PuneetPunamiya

Feature request

As of today to store the attestations to mongodb we need to set MONGO_SERVER_URL as an env to the chains controller. For ref: https://github.com/google/go-cloud/blob/master/docstore/mongodocstore/urls.go#L42-L60

But if the mongo token is rotated then as of today we again need to set the MONGO_SERVER_URL value so that chains controller uses the new value

Hence in order to get the rotated token values, there can be 2 ways

  • mongo server url is injected at a path in chains controller

    • For example using vault with chains where mongo creds are stored in vault, we can add this vault injector annotation vault.hashicorp.com/agent-inject-secret- in the chains controller pod
    • Next we add a mechanism in chains controller where the value of MONGO_SERVER_URL is set, by reading from a file path which is set by the user with a new config called MONGO_SERVER_URL_PATH
    • Whenever the value of the path will be changed the value will be reset for mongo server url
  • mongo server url is mounted via secret / configmap, so that when it's updated, chains updates as well

In bot the cases, the common is reading mongo server url from a path

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions