Commit 9d4bc89
authored
refactor(pairing): use the guid as primary key for ownership vouchers (astarte-platform#1800)
originally, we had decided to allow multiple ownership vouchers for a
single device guid, with the motivation being that the rendezvous
server was supposed to be in charge of deciding the validity of
ownership vouchers and lift us from that job.
in practice, we implemented our application logic as if there was always
a single voucher for a guid, by simply adding `limit: 1` to all our
queries. this also added complexity and was investigated as a possible
source of bugs multiple times.
for our implementation, supporting multiple vouchers for each guid
doesn't really make sense anymore, as our vouchers are short-lived
anyway, so let's just allow a single voucher for a guid!
Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>1 parent 50a9287 commit 9d4bc89
File tree
6 files changed
+8
-14
lines changed- apps
- astarte_housekeeping
- lib/astarte_housekeeping/realms
- priv/migrations/realm
- test/support/helpers
- astarte_pairing
- lib/astarte_pairing
- test/support/helpers
- libs/astarte_data_access/lib/astarte_data_access/fdo
6 files changed
+8
-14
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
| 558 | + | |
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
249 | | - | |
250 | 247 | | |
251 | 248 | | |
252 | 249 | | |
253 | 250 | | |
254 | | - | |
| 251 | + | |
255 | 252 | | |
256 | 253 | | |
257 | 254 | | |
258 | 255 | | |
259 | 256 | | |
260 | | - | |
261 | 257 | | |
262 | 258 | | |
263 | 259 | | |
264 | | - | |
265 | | - | |
266 | 260 | | |
267 | 261 | | |
268 | 262 | | |
269 | 263 | | |
270 | | - | |
| 264 | + | |
271 | 265 | | |
272 | 266 | | |
273 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments