bbc / nmos-registration

AMWA NMOS IS-04 Registration API Service
Apache License 2.0
6 stars 2 forks source link

Backend allows a duplicate resource id to be added to the registry with a different type #2

Open garethsb opened 6 years ago

garethsb commented 6 years ago

The etcd-based implementation uses type and id as a composite key. See https://github.com/bbc/nmos-registration/blob/master/nmosregistration/etcd_backend.py.

This means that a POST to /resource with a duplicate resource id for a different type is currently accepted.

Please tell me we agree these UUIDs need to be truly unique, not unique per type!

Thanks to @rhastie for discovering this issue.

andrewbonney commented 6 years ago

Yes that does seem like a bug. I doubt we've ever attempted to validate that so far.