Hide credentials in job definition

Bonjour, :wave:

Does it possible to hide credentials in nomad job definition?

like:

    task "task1" {
      driver = "docker"

      config {
        image = "private_registry.tld:latest"

        auth {
          username = "{{with secret "database/data/dockerregistry/fqdn"}}{{.Data.data.username}}{{end}}"
          password = "{{with secret "database/data/dockerregistry/fqdn"}}{{.Data.data.password}}{{end}}"
        }

Thanks :slight_smile:

Yes, see this learn guide with an example of a job file.

the learn guide you posted is for credentials in the job @ fred-gb is asking for docker registry credentials. I will have to dig up the link but last time I saw this question you could do some hackery on the nomad client system but there is no current way to directly inject registry creds from the job file

Thanks @NegativeFeedback , that’s what I tried to explain.

found an issue to follow :slight_smile: