jmrodri Bug 1763005 - add registry-proxy support (#184)
793517a Oct 21, 2019
Bug 1763005 - add registry-proxy support (#184)
* Bug 1763005 - add registry-proxy support

The registry-proxy GET /v2 returns a WWW-Authenticate header with only a
realm: .../v2/auth the APIV2Adapter simply gets a token for /v2/auth
which is not valid for registry-proxy which seems to require a scoped
token.

In this PR, we added a new RegistryProxyAdapter that now requires the
apbs to be listed in the configuration. For each of those images listed,
we will add them to the scope when we ask for the token. This allows the
broker access to fetch the apb images.

Also, added a test to ensure registry proxy errors when no images are defined
and added a unit test for getTokenWithScope.

* fix linter errors
793517a