Skip to content

nv2 sign & validate shouldn't require cn = registry name #56

@SteveLasker

Description

@SteveLasker

We're recently decoupled the CN from the registry name as part of the signing and validation.
However, docker nv2 notary sign attempts to match CN with the registry name:

openssl req \
  -x509 \
  -sha256 \
  -nodes \
  -newkey rsa:2048 \
  -days 365 \
  -subj "/CN=registry.wabbit-networks.io/O=wabbit-networks inc/C=US/ST=Washington/L=Seattle" \
  -addext "subjectAltName=DNS:registry.wabbit-networks.io" \
  -keyout ./wabbit-networks.key \
  -out ./wabbit-networks.crt

Followd by:

docker notary sign \
  --key ./wabbit-networks.key \
  --cert ./wabbit-networks.crt \
  localhost:5000/net-monitor:v1

Fails with:

Generating Docker mainfest: localhost:5000/net-monitor:v1
Signing sha256:0da7b8db631b5faeff09f6217de7ac47bdcd53e0e7a15cec559a8140ac164f5c
2021/04/23 17:44:13 x509: certificate is valid for registry.wabbit-networks.io, not localhost

Expected

Signing to not validate against the CN

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions