Serializes upload state to an HMAC token for subsequent requests

To support clustered registry, upload UUIDs must be recognizable by
registries that did not issue the UUID. By creating an HMAC verifiable
upload state token, registries can validate upload requests that other
instances authorized. The tokenProvider interface could also use a redis
store or other system for token handling in the future.
This commit is contained in:
Brian Bland 2015-01-04 23:59:29 -08:00
parent c08c6c506e
commit 07ba5db168
10 changed files with 105 additions and 50 deletions

View file

@ -33,6 +33,12 @@ type Configuration struct {
// Addr specifies the bind address for the registry instance.
Addr string `yaml:"addr"`
} `yaml:"http"`
// Cluster contains configuration parameters for clustering the registry.
Cluster struct {
// Secret specifies the secret key which HMAC tokens are created with.
Secret string `yaml:"secret"`
} `yaml:"cluster"`
}
// v0_1Configuration is a Version 0.1 Configuration struct