Samuele Pedroni
314b359bb3
asserts,snap: expose provenance on snap.Info and validate it
...
also introduce naming.ValidateProvenance,ValidProvenance and
a DefaultProvenance constant
2022-07-17 18:09:14 +02:00
Samuele Pedroni
44533f9cb6
many: introduce optional primary key provenance for snap-revision
2022-06-24 10:21:07 +02:00
Samuele Pedroni
bee5d6bcaf
asserts: simplify some of the optional primary keys with default code
2022-04-21 17:11:33 +02:00
Samuele Pedroni
e1bb531595
asserts,store: relax reportFetchAssertionsError logic
...
use a new AssertionType.AcceptablePrimaryKey to check whether a key
has enough entries allowing for the omission of optional primary key
headers
2022-04-06 14:17:12 +02:00
Samuele Pedroni
491ff56795
asserts: export MockOptionalPrimaryKey for usage in other packages
2022-04-06 14:17:12 +02:00
Samuele Pedroni
a5d271b8f7
asserts: Ref supports for optional primary key headers
...
including being built with a PrimaryKey omitting default values
introduce ReducePrimaryKey to omit default values, useful also when
dealing with systems that might not support given optional primary
keys yet
2022-04-06 14:17:12 +02:00
Samuele Pedroni
c885693492
asserts: support in HeadersFromPrimaryKey for omitted optional primary keys
2022-04-06 14:17:12 +02:00
Samuele Pedroni
98de63ac23
asserts: support optional primary keys in Find family
...
change PrimaryKeyFromHeaders to allow for omitted optional primary
keys
2022-04-06 14:17:12 +02:00
Samuele Pedroni
67ad4bcb85
asserts: clarify and simplify around optional primary key headers
...
clarify optional primary key headers and defaults, thanks @bboozzoo
simplify AssertionType.validate, thanks @stolowski
2022-04-05 10:04:48 +02:00
Samuele Pedroni
bf45d31d59
Merge remote-tracking branch 'upstream/master' into asserts-opt-primary-keys-1
...
fix conflict
2022-04-05 09:56:54 +02:00
Michael Vogt
53e100759f
Merge pull request #11502 from pedronis/disable-authority-delegation
...
asserts: minimal changes to disable authority-delegation before full revert
2022-03-15 15:00:00 +01:00
Samuele Pedroni
331724d76d
asserts: minimal changes to disable authority-delegation before full revert
...
authority-delegation might have been premature, disable until we might
decide for a full revert
2022-03-14 18:47:04 +01:00
Michael Vogt
439f267378
many: replace use of "sanity" for interface implementation checks
...
This commit replaces the use of "sanity" with more inclusive
naming. When `// sanity` is used to check if an interface is
implemented the comment `expected interface is implemented`
is used.
2022-03-14 17:35:33 +01:00
Samuele Pedroni
5b460c56d5
asserts: support and normalize optional primary keys when signing
2022-02-28 11:13:26 +01:00
Samuele Pedroni
4308154ed2
asserts: start supporting optional primary keys, fs backstore Put/Get
2022-02-28 11:13:26 +01:00
Paweł Stołowski
0fe92618b3
Add missing tests, remove account-id, check that authority matches
...
brand.
2022-02-21 16:07:50 +01:00
Paweł Stołowski
537b9b1612
Add preseed assertion type.
2022-02-21 16:07:49 +01:00
Samuele Pedroni
e600a66137
asserts: small cleanups in check(No)Authority
...
thanks @stolowski and @MiguelPires
2022-02-14 11:44:12 +01:00
Samuele Pedroni
ffbb0e404c
asserts: error consistency tweak
2022-02-11 15:24:41 +01:00
Samuele Pedroni
078cb5f74c
asserts: first-class support for formatting/encoding signatory-id
...
together with checks for it
2022-02-11 15:24:41 +01:00
Samuele Pedroni
130242ee7e
asserts: start supporting delegation when validating signatures
...
* start of basic test (failing here)
* start of signatory-id support
2022-02-03 11:22:12 +01:00
Samuele Pedroni
e1a856242e
asserts: finish the scaffold of authority-delegation
...
main missing things since/until support and device scope constraint
support
2022-01-28 13:11:53 +01:00
Samuele Pedroni
2bb8fbc4d1
asserts: start of authority-delegation
2022-01-28 13:11:53 +01:00
Samuele Pedroni
00c3b5201c
asserts: change behavior of alternative attribute matcher
...
change the behavior of an alt attribute matcher when matching against
a list of values to match the alternatives to each element and not
overall
this is the approach used by all other matchers against a list of
values
the old behavior was unused and as the new tests show the new behavior
is quite productive. if really needed expressing for different
variants of a list can still be done by expressing variants for one
full level up
to avoid uses of this confusing old snapd make sure format: 5 is used
to mark snap-declarations that use alt attribute matchers going
forward
2021-11-26 17:13:05 +01:00
Paweł Stołowski
cf75a47c6b
Tweak AtSequence comment, omit "?" in the string repr if sequence point
...
is not set.
2021-02-04 11:36:38 +00:00