Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Adding image id for verification of task being launched #49

Closed
anuragagarwal561994 opened this issue Jan 19, 2018 · 1 comment
Closed

Comments

@anuragagarwal561994
Copy link

anuragagarwal561994 commented Jan 19, 2018

I was trying to build something similar but in general instead of verifying from the orchestrator whether a task has been launched with the given name, I was trying to use the image id of the container being launched.

If the two can be combined:

  1. If the given service or task has been launched
  2. The task has been launched with the given image id

Then it would be more secure to deliver correct secrets to correct containers. Which secrets are to be delivered usually depends on the image and suppose if a task with the same name is launched with different image the secrets can be restricted to be available.

This approach might introduce some more work from the side of the secrets manager because every time an image is updated the image id will change and so the person has to change the vault configuration but this will also prevent leaking secrets into containers that no longer requires it.

Or at least this can be controlled via a flag so that in development mode one can avoid changing the image ids time and again.

@nemosupremo
Copy link
Owner

In the current version of Gatekeeper, you can use the --use-image-name option to have your policy names be defined by the docker image running in the task. For example with a policy file such as:

{
	"mesos:myorg/myimage:v1":{
		"roles":["sample"],
		"num_uses":1
	}
}

you can limit tokens to only the myorg/myimage:v1 image. Or you can go broader with something like:

{
	"mesos:myorg/myimage:*":{
		"roles":["sample"],
		"num_uses":1
	}
}

which will deliver a token to any myorg/myimage of any version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants