To comply with allowing minimum permissions, we'd like to be able to authenticate to our docker registry with a token that provides the access to just push to a single namespace. The registry lets you generate tokens with specific scopes as JWT tokens. It would be useful if this library allowed the user to provide an already generated JWT bearer token that it would use for authentication.
e.g.
const namespace = 'internal'
const image = 'nginx'
# user provided function for generating a token
const token = await generateAccessToken([{ type: 'repository', name: `${namespace}/${image}`, actions: ['push', 'pull'] }])
const options: DockerTarPusherOptions = {
registryUrl: 'http://localhost:5000',
...
auth: {
token
}
}
To comply with allowing minimum permissions, we'd like to be able to authenticate to our docker registry with a token that provides the access to just push to a single namespace. The registry lets you generate tokens with specific scopes as JWT tokens. It would be useful if this library allowed the user to provide an already generated JWT bearer token that it would use for authentication.
e.g.