From 1098e76cba8cab2d44909dcee411a5e35ba779e4 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 19 Nov 2024 14:35:46 -0500 Subject: [PATCH] test(invocation): add command.Covers and subject consistency tests Also improve the maintainability of the tests by a) providing a set of fixed Personas and then generating a slew of valid delegation tokens, invalid delegation tokens and proof-chains thereof. --- did/didtest/crypto.go | 149 ++++++++ go.mod | 1 + go.sum | 2 + pkg/policy/policytest/policy.go | 20 ++ token/delegation/delegationtest/README.md | 5 + .../delegationtest/data/TokenAliceBob.dagcbor | Bin 0 -> 333 bytes .../delegationtest/data/TokenBobCarol.dagcbor | Bin 0 -> 333 bytes .../delegationtest/data/TokenCarolDan.dagcbor | Bin 0 -> 333 bytes ...okenCarolDanInvalidExpandedCommand.dagcbor | Bin 0 -> 325 bytes .../data/TokenCarolDanInvalidExpired.dagcbor | Bin 0 -> 337 bytes .../data/TokenCarolDanInvalidInactive.dagcbor | Bin 0 -> 342 bytes .../data/TokenCarolDanInvalidSubject.dagcbor | Bin 0 -> 333 bytes ...okenCarolDanValidAttenuatedCommand.dagcbor | Bin 0 -> 345 bytes .../delegationtest/data/TokenDanErin.dagcbor | Bin 0 -> 333 bytes ...TokenDanErinInvalidExpandedCommand.dagcbor | Bin 0 -> 325 bytes .../data/TokenDanErinInvalidExpired.dagcbor | Bin 0 -> 337 bytes .../data/TokenDanErinInvalidInactive.dagcbor | Bin 0 -> 342 bytes .../data/TokenDanErinInvalidSubject.dagcbor | Bin 0 -> 333 bytes ...TokenDanErinValidAttenuatedCommand.dagcbor | Bin 0 -> 345 bytes .../data/TokenErinFrank.dagcbor | Bin 0 -> 333 bytes ...kenErinFrankInvalidExpandedCommand.dagcbor | Bin 0 -> 325 bytes .../data/TokenErinFrankInvalidExpired.dagcbor | Bin 0 -> 337 bytes .../TokenErinFrankInvalidInactive.dagcbor | Bin 0 -> 342 bytes .../data/TokenErinFrankInvalidSubject.dagcbor | Bin 0 -> 333 bytes ...kenErinFrankValidAttenuatedCommand.dagcbor | Bin 0 -> 345 bytes token/delegation/delegationtest/doc.go | 33 ++ .../delegationtest/generator_test.go | 224 ++++++++++++ token/delegation/delegationtest/token.go | 120 +++++++ token/delegation/delegationtest/token_gen.go | 240 +++++++++++++ token/delegation/delegationtest/token_test.go | 32 ++ token/invocation/invocation_test.go | 321 ++++-------------- token/invocation/invocationtest/field.go | 39 --- 32 files changed, 891 insertions(+), 295 deletions(-) create mode 100644 did/didtest/crypto.go create mode 100644 pkg/policy/policytest/policy.go create mode 100644 token/delegation/delegationtest/README.md create mode 100644 token/delegation/delegationtest/data/TokenAliceBob.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenBobCarol.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDan.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDanInvalidExpandedCommand.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDanInvalidExpired.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDanInvalidInactive.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDanInvalidSubject.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenCarolDanValidAttenuatedCommand.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErin.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErinInvalidExpandedCommand.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErinInvalidExpired.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErinInvalidInactive.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErinInvalidSubject.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenDanErinValidAttenuatedCommand.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrank.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrankInvalidExpandedCommand.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrankInvalidExpired.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrankInvalidInactive.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrankInvalidSubject.dagcbor create mode 100644 token/delegation/delegationtest/data/TokenErinFrankValidAttenuatedCommand.dagcbor create mode 100644 token/delegation/delegationtest/doc.go create mode 100644 token/delegation/delegationtest/generator_test.go create mode 100644 token/delegation/delegationtest/token.go create mode 100644 token/delegation/delegationtest/token_gen.go create mode 100644 token/delegation/delegationtest/token_test.go delete mode 100644 token/invocation/invocationtest/field.go diff --git a/did/didtest/crypto.go b/did/didtest/crypto.go new file mode 100644 index 0000000..b06928e --- /dev/null +++ b/did/didtest/crypto.go @@ -0,0 +1,149 @@ +// Package didtest provides Personas that can be used for testing. Each +// Persona has a name, crypto.PrivKey and associated crypto.PubKey and +// did.DID. +package didtest + +import ( + "sync" + "testing" + + "github.com/libp2p/go-libp2p/core/crypto" + "github.com/stretchr/testify/require" + "github.com/ucan-wg/go-ucan/did" +) + +const ( + alicePrivKeyCfg = "CAESQHdNJLBBiuc1AdwPHBkubB2KS1p0cv2JEF7m8tfwtrcm5ajaYPm+XmVCmtcHOF2lGDlmaiDA7emfwD3IrcyES0M=" + bobPrivKeyCfg = "CAESQHBz+AIop1g+9iBDj+ufUc/zm9/ry7c6kDFO8Wl/D0+H63V9hC6s9l4npf3pYEFCjBtlR0AMNWMoFQKSlYNKo20=" + carolPrivKeyCfg = "CAESQPrCgkcHnYFXDT9AlAydhPECBEivEuuVx9dJxLjVvDTmJIVNivfzg6H4mAiPfYS+5ryVVUZTHZBzvMuvvvG/Ks0=" + danPrivKeyCfg = "CAESQCgNhzofKhC+7hW6x+fNd7iMPtQHeEmKRhhlduf/I7/TeOEFYAEflbJ0sAhMeDJ/HQXaAvsWgHEbJ3ZLhP8q2B0=" + erinPrivKeyCfg = "CAESQKhCJo5UBpQcthko8DKMFsbdZ+qqQ5oc01CtLCqrE90dF2GfRlrMmot3WPHiHGCmEYi5ZMEHuiSI095e/6O4Bpw=" + frankPrivKeyCfg = "CAESQDlXPKsy3jHh7OWTWQqyZF95Ueac5DKo7xD0NOBE5F2BNr1ZVxRmJ2dBELbOt8KP9sOACcO9qlCB7uMA1UQc7sk=" +) + +// Persona is a generic participant used for cryptographic testing. +type Persona int + +// The provided Personas were selected from the first few generic +// participants listed in this [table]. +// +// [table]: https://en.wikipedia.org/wiki/Alice_and_Bob#Cryptographic_systems +const ( + PersonaAlice Persona = iota + PersonaBob + PersonaCarol + PersonaDan + PersonaErin + PersonaFrank +) + +var ( + once sync.Once + privKeys = make(map[Persona]crypto.PrivKey, 6) + err error +) + +// DID returns a did.DID based on the Persona's Ed25519 public key. +func (p Persona) DID(t *testing.T) did.DID { + t.Helper() + + did, err := did.FromPrivKey(p.PrivKey(t)) + require.NoError(t, err) + + return did +} + +// Name returns the username of the Persona. +func (p Persona) Name(t *testing.T) string { + t.Helper() + + name, ok := map[Persona]string{ + PersonaAlice: "Alice", + PersonaBob: "Bob", + PersonaCarol: "Carol", + PersonaDan: "Dan", + PersonaErin: "Erin", + PersonaFrank: "Frank", + }[p] + if !ok { + t.Fatal("Unknown persona:", p) + } + + return name +} + +// PrivKey returns the Ed25519 private key for the Persona. +func (p Persona) PrivKey(t *testing.T) crypto.PrivKey { + t.Helper() + + once.Do(func() { + for persona, privKeyCfg := range privKeyCfgs(t) { + privKeyMar, err := crypto.ConfigDecodeKey(privKeyCfg) + if err != nil { + return + } + + privKey, err := crypto.UnmarshalPrivateKey(privKeyMar) + if err != nil { + return + } + + privKeys[persona] = privKey + } + }) + require.NoError(t, err) + + return privKeys[p] +} + +// PrivKeyConfig returns the marshaled and encoded Ed25519 private key +// for the Persona. +func (p Persona) PrivKeyConfig(t *testing.T) string { + t.Helper() + + return privKeyCfgs(t)[p] +} + +// PubKey returns the Ed25519 public key for the Persona. +func (p Persona) PubKey(t *testing.T) crypto.PubKey { + t.Helper() + + return p.PrivKey(t).GetPublic() +} + +// PubKeyConfig returns the marshaled and encoded Ed25519 public key +// for the Persona. +func (p Persona) PubKeyConfig(t *testing.T) string { + pubKeyMar, err := crypto.MarshalPublicKey(p.PrivKey(t).GetPublic()) + require.NoError(t, err) + + return crypto.ConfigEncodeKey(pubKeyMar) +} + +func privKeyCfgs(t *testing.T) map[Persona]string { + t.Helper() + + return map[Persona]string{ + PersonaAlice: alicePrivKeyCfg, + PersonaBob: bobPrivKeyCfg, + PersonaCarol: carolPrivKeyCfg, + PersonaDan: danPrivKeyCfg, + PersonaErin: erinPrivKeyCfg, + PersonaFrank: frankPrivKeyCfg, + } +} + +// Personas returns an (alphabetically) ordered list of the defined +// Persona values. +func Personas(t *testing.T) []Persona { + t.Helper() + + return []Persona{ + PersonaAlice, + PersonaBob, + PersonaCarol, + PersonaDan, + PersonaErin, + PersonaFrank, + } +} diff --git a/go.mod b/go.mod index 2193ff4..51d0d0e 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/ucan-wg/go-ucan go 1.23 require ( + github.com/dave/jennifer v1.7.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 github.com/ipfs/go-cid v0.4.1 github.com/ipld/go-ipld-prime v0.21.0 diff --git a/go.sum b/go.sum index 82932d5..b7534ef 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= +github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/pkg/policy/policytest/policy.go b/pkg/policy/policytest/policy.go new file mode 100644 index 0000000..4afd5f3 --- /dev/null +++ b/pkg/policy/policytest/policy.go @@ -0,0 +1,20 @@ +// Package policytest provides values and functions that are useful when +// testing code that relies on Policies. +package policytest + +import ( + "testing" + + "github.com/stretchr/testify/require" + "github.com/ucan-wg/go-ucan/pkg/policy" +) + +// EmptyPolicy provides a policy with no statements for testing purposes. +func EmptyPolicy(t *testing.T) policy.Policy { + t.Helper() + + pol, err := policy.FromDagJson("[]") + require.NoError(t, err) + + return pol +} diff --git a/token/delegation/delegationtest/README.md b/token/delegation/delegationtest/README.md new file mode 100644 index 0000000..406875d --- /dev/null +++ b/token/delegation/delegationtest/README.md @@ -0,0 +1,5 @@ +# delegationtest + +See the package documentation for instructions on how to use the generated +tokens as well as information on how to regenerate the code if changes have +been made. diff --git a/token/delegation/delegationtest/data/TokenAliceBob.dagcbor b/token/delegation/delegationtest/data/TokenAliceBob.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..2122c4d06d05135f9e6fe8dc1190f77b9d9c26c4 GIT binary patch literal 333 zcmZpQa7bSe8vXk4wZ~;2uPrZLpkRK=FL;;onM*%!$uC>-bD_n)!c7Yt=F6Jilj43` z{WtBdInP-iKK7cs@3x*utP5Bd&AKQt!^Pw+V_|V=a$=r-N=~|ip`L-Bfo@T@u%_T-T_m$fWela>M-65W{>RQ5@ptE2mt$d)xvz0SazTDhLvnFx68T1?=H=%lr}{83 PGBLBTvaxe;a&ZFydZ2+A literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenBobCarol.dagcbor b/token/delegation/delegationtest/data/TokenBobCarol.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..8d68e2bd1b8a69edd800e8ae047f5bd0ad66da11 GIT binary patch literal 333 zcmZpQa0s1sLC5DL=fWd_tYY6Jg*}4S_6r%A7Mrd97uqj$<7>cawPz(4q&KW9ykvN- z_V!zosfnrW^98>e{JXaQ*38>inHMEyxR|_UEG#ZfPR!F!$w_xG)HBdC&@D>VGhCjW zSejB{k&>BWm7Q8?Rb}RzonBgyoRMMbQC{kim=SCqSzPIAk>pdFXy{vHQDBtm?H80$ zSr%Lti-LN%haG&|dVGhCjW zSejB{k&>BWm7Q8?Rb}RzotI=@ndOt8SZV5>=;f1bQEBLEW|kk2?d)ilnq{2rXr7vF zk!6}2WLl7&oSdASQmCI=QIMFIlA5BQm!F%Nmza|b6!?~$SzL^2aC&J$az=)!M|r77 zVn(oeWO1ddMUqcxqM>h*MS)SKw_i|3Wm#}pkYllBUUETxPD65WX%eatrKQ=~M#b4K z5k7%==6>GBt{IkDzIiE;X=N@>6&2Yf=>?f7UXF!H=Dx-Ssd@Q%$*DdJj7-cdtZeKY HoLt-h`u%%n literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenCarolDanInvalidExpandedCommand.dagcbor b/token/delegation/delegationtest/data/TokenCarolDanInvalidExpandedCommand.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..c8bb4b36b745345ce736269161e913a34c90a5df GIT binary patch literal 325 zcmZpQaQJDs=h*EN!AI;r?oeH~nrXx2`{ADgrtdCY*pj2Kw(Y&Zu021Ua@YU=r_xj1 zaCXOvRJSGCzRYT$1hZamHu@Mak$q8OhKtEt#=_##-2Lp=jM1KpxzJ;UY6 ziKQtO7Acu2R@teQR#j%c*?CFkm03RdiIt}AiC#Y07L|ssW@h;T+0Kq;saeL^j^?S^ z7FnjbL8b-S$;rvNDVh4I6$OcTDXA&RK*qP^%;I8H1Jg?jk~1<)J<3Zx5;KC$Ba16t zEs}gn6AgWfEDDS=z5RkRD$9b)f*gx2^O6hla~hJ1OOsHIC@sy-HY(0`iSP-`Gxzg0 zcFnNN^36+$Oe=G7s;I~=NiWDu@p3FoGWRtuNX^U7OHTD+U}R!uVP#|I;N;>40H(Ek A=Kufz literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenCarolDanInvalidExpired.dagcbor b/token/delegation/delegationtest/data/TokenCarolDanInvalidExpired.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..09d95dcca90d7ecd2474493649d8c9d752dc9e7e GIT binary patch literal 337 zcmZpQaF}#CL`ctjOY+TQU8>tEK6312Ub@t<=;>Pb@7o^NF8WzyI8&ne-1oM{n)?kB zjV6Em^~`qJ3grWOpS7GHz21I*3g@E43>TBPjD^Le$%%RTDLLs5hI$5i2D(MbdWOrB z6H8MnEK)L4tg=%pt*Xp?v-6V7E3vularHkQwsG{D+&_xQc_d&^YU{u^AdBCfdW$LHkb60GmDE+4NosENY2PG z^(Zg(NX!T}k1VcqwMg$S z+o(9(CBi2#&)m=3*fqm4%Qr72GOf(TsiGpgB)uRr#mliU$=uhtAT=*PFFDnRfsu)s Mg_Vt+gOiIJ0Ajs?3IG5A literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenCarolDanInvalidInactive.dagcbor b/token/delegation/delegationtest/data/TokenCarolDanInvalidInactive.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..fae7e2195ab6cd4f0c8dcea375c30e475209abc0 GIT binary patch literal 342 zcmZpQaEQ#{w0wBm`kazpY+dK?GQl31T#q2%vI#~@nw z2sV!_u5`6X@+nO;^ewU|Fv|4y3(BZ03oZ+CEVj%`&Pz&@+9N64kX(?T(~w+TnuKar zX=!%0QE|3Qgim0exu3VOYldZ(Z(d4dTA7PeMMZW=dO>E2mt$d)xvz0SYF>U`a;gsl PBNH)^cTzb<{EJJ^*&Gqe_&Nc}tkJ35stT9q_zOY?% z&bRsRd*7B-O6}ZUq93Sk`(xv2{zZuyE+%go3yVvW6Z7;_a?%|P^$he3bc>Sp43{S- zmZnr#q-3U8Wv5nJRhju_=Ovj}X8GhNR+_pedii8qR2sUPndJv$J3E@CW*KKYnx|%4 zWSQm$nHFRxCnx8o6zZo|6eQ-Qq^9WS<>zMRCFUdp1->O`78j!$oL*XxoRMMbQC{ki zm=SCqSzPIAk>pdFXy{vHQDBtm?H80$Sr%Lt;kaJ1@z+GRr4FvC`B%(aR^>qSDaS%q%}3+u6}9HOn~L(L6QV zBFi*4$h06kIXO8ur9wtOwW1&~FC{faKQBKwGcPemKe41FHLoBHLT{A4ReDhKw)5=_&Dk`!|(hD+Eyc`RY%zcduQuFfj Tl2d&c7@3$^SlQS)IJvk1e6fRG literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenDanErin.dagcbor b/token/delegation/delegationtest/data/TokenDanErin.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..baaac2e0e316a0ff2af3946baf9adf359c462c6f GIT binary patch literal 333 zcmZpQaL8MHZ_(ouQZCn2UYJ+3wK6!*J=XQ~1n)d;4=91``l!{+#zQum7 zXq~x|*ZJH0{qh?Gt+;0^oxiJF%eE*n!^Pw+V_|V=a$=r-N=~|ip`L-Bfo@T~y1uTx0V}r?67r-26P(h|m7imD3VsQf6C zz+@Mn{0vL4q~zq>ltTT~ih{(vl++acy!_nEyu_Sjpuo4}%;I8HgY%NiE3vulamYba~hJ1OOsHIC@sy-HY(0` ziSP-`Gxzg0cFnNN^36+$Oe=G7s;I~=NiWDu@p3FoGWRtuNX^U7OHTD+U}R!uVP#|I I;N;>40O9a{)c^nh literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenDanErinInvalidExpandedCommand.dagcbor b/token/delegation/delegationtest/data/TokenDanErinInvalidExpandedCommand.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..777c0aaee08ed24ea1908cd3bbeb8d511994fafe GIT binary patch literal 325 zcmZpQaCrXegM19b{ux_~Ki+Ozm#}(i=3M`%q;k7_kF6Jk_PjqAzdG`>&!6C|>UAtE z>4EYL_Zt=+esIuQk2l5bM{n#r?nQ|iE+%go3yVvW6Z7;_a?%|P^$he3bc>Sp43{S- zmZnr#q-3U8Wv5nJRhju_ryE7&8k<)-g_Zi|=I6Oaltw0-o0KL+dOPM;R8{y!mWa_6@6eQ-Qq^2YT8Q+pKi;GbW%u6z_%<{=ktTc5`^zzBJs5Epn zGs_Ric6KyN%`(n*G*8X8$TH0hGA+nXPA0s5sjt!Y44#+|S$C zHN!H?H!meJt<1%#q9VH_y&yBi%ds%Y+}F4uH7`FeIn{@Ok%^gwm5rT)lZzVwM$CF( literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenDanErinInvalidExpired.dagcbor b/token/delegation/delegationtest/data/TokenDanErinInvalidExpired.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..ba90840528194bed2e6f34278b25790b0b0cf819 GIT binary patch literal 337 zcmZpQaHz{%VJ!2j-chUWZP($%8&5b5rG8zSQ2$l5BW+#9p44?umWx)`-kJV*`6N~E z_%~nosRw=U)A?FIMe+1g8>60h&P9nCE+%go3yVvW6Z7;_a?%|P^$he3bc>Sp43{S- zmZnr#q-3U8Wv5nJRhju_ryE7&8k<)-g_Zi|=I6Oaltw0-o0KL+dOPM;R8{y!m6zZo|6eQ-Qq^9WS<>zMRCFUdp1*Fn#F6kv_78j!$o|j}^ndOt8 zSZV5>=;f1bQEBLEW|kk2?d)ilnq{2rXr7vFk!6}2WLl7&oLrEf(~w+TnuKaZX=!%0 zQE|3Qgim0exu3VOYldZ(Z(d4dTA7PeMMZW=dO>E2mt$d)xvz0SYF>U`a;gslBNH%eckj||u6+fr-}N)PcRb!A7Fx@2pSxzscLs*i*DuJKf#)l zbF_BiE7mVxoU`{{I_2|hi_(OJ+=~)3Tuk0F78aK#C+6v=KW)6=oTgG8Lmi9 zEKRAfNXbmG%1*7csxtG0vADb!D`C`impNlnqu%g@csOUy|I3Vch>EG|YhI4{Y(GRr4FvC`B% z(aR^>qSDaS%q%}3+u6}9HOn~L(L6QVBFi*4$h06kIXN#WO=^#%a6@uIeojMjacL5& zS*4}f*+#|LE)hO~dFFoJ#;zHbS-yEGk!fWvP8Ai|CFup3DPE3+N#?%B1*v)YdC93h Q42(?7EUawo9GqO-0K>C@tN;K2 literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenDanErinInvalidSubject.dagcbor b/token/delegation/delegationtest/data/TokenDanErinInvalidSubject.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..ba61f8d33054241db7356a140880ce0cd925d912 GIT binary patch literal 333 zcmZpQa9H@^-s{+&!WT(7n8S)g~g@GiFx`dIq43DdIow1x<$!)hRc%^ zOH(Q=QZiGlvQsOqs?2<|(~Tl>jm;~a!b*K}^YdIIN+XlaO-hp@y&ZEasw#Y=@}o=w zlU;oBGc3K5l9O{&3iVSf3KH{DQd9Kv@^dru5_6J)0^gD|i;GbW&Py_{%<{=ktTc5` z^zzBJs5EpnGs_Ric6KyN%`(n*G*8X8$TH0hGA+nXPAw`*`Y8 GaRUHNG=8lB literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenDanErinValidAttenuatedCommand.dagcbor b/token/delegation/delegationtest/data/TokenDanErinValidAttenuatedCommand.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..639958545ec1698075a0c3b7c53f4427bad73755 GIT binary patch literal 345 zcmZpQaOh3!N=fh4xiMcd)k?rbKjQ8FYx_C){(hcgsJz13JN23S|C(pSp43{S- zmZnr#q-3U8Wv5nJRhju_ryE7&8k<)-g_Zi|=I6Oaltw0-o0KL+dOPM;R8{y!mRLJP3Rum-WrKG0l=jG>S<|XFnCzh0?=9MOvq^2YT<-R3n78j#h zl9yy&ndOt8SZV5>=;f1bQEBLEW|kk2?d)ilnq{2rXr7vFk!6}2WLl7&oLrEf(~w+T znuKaZX=!%0QE|3Qgim0exu3VOYldZ(Z(d4dTA7PeMMZW=dO>E2mt$d)xvz0SYF>U` Ta;gslBNHm;lGi0(MoQrt*-xYMVcq2;5(D%Cl$ft;X#_D*~k~#Md0}UCRH{ z%vf)R^{E@nms@PmOxUj!cc#gWVNqg+i^*HY!s628#610!oOB06Jp(-h-J)bY!{y0| zr70B_DVZr&*{PLQRc5}~nHJ>{ZlU3Ymd2q;Ie{fyNf>}xZ93N{j|DwbU7n8S)g~g@GiFx`dIq43DdIow1x<$!)hRc%^ zOH(Q=QZiGlvQsOqs?2<|GcC#^+(N?(EsaBy%CiC!3o9a>-Q1FsOH(6K%DjDY%Y!}A zDtx_tj04=Alaq5(GWAm{3KH{DQd5$FjBm-A#l@%wrW-}%8k<)-g_Zi|=I6Oaltw0- zo0KL+dOPM;R8{y!VGhCjW zSejB{k&>BWm7Q8?Rb}RzooP`X;T9TRXlWdpRGt->SXdG1?BGBt{IkDzIiE;X=N@>6&2Yf=>?f7UXF!H=Dx-Ssd@Q%$*DdJj7-cd LtZeKYoLt-h2%UcO literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenErinFrankInvalidInactive.dagcbor b/token/delegation/delegationtest/data/TokenErinFrankInvalidInactive.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..ae90da155a2303bfdc6eb65e89aa1a30a3f21975 GIT binary patch literal 342 zcmZpQa8UX&XMIVGhC6J zSejB{k&>BWm7Q8?Rb}RzooP`X;T9TRXlWdpRGt->SXdG1?B|vyF|H@D>E($t8QGH;*U@?ej& z3SVy@;{bQ(T(~Tl>jm;~a!b*K} z^YdIIN+XlaO-hp@y&ZEasw#Y=@}o=wlU;oBGc3K5k_+;48j_1klTeK)^9smyjf#p) zO3y4e%r6Zw%m)(1A#P3{Ucn{BmiYx4Va0yw$w9f16``ql`FY8yJ`9XZ%q*;I>>Qk2 F+yFQid$j-n literal 0 HcmV?d00001 diff --git a/token/delegation/delegationtest/data/TokenErinFrankValidAttenuatedCommand.dagcbor b/token/delegation/delegationtest/data/TokenErinFrankValidAttenuatedCommand.dagcbor new file mode 100644 index 0000000000000000000000000000000000000000..822aa18f24481a40f1359ccd5ecac1704f3fd8d7 GIT binary patch literal 345 zcmZpQaL94-jnm*PR#YmAJ`t(0OeyfQ(y4sb>AdWbevepH_p0o+P-T~pSKc1#;m0JY zaLagA$*+`ok6xE2ZO!}i>h=}pMTr?MCT|%Fi%XLe^Yl}4(j5%-4D<|ii<0#WmnSEd zrc_v@WTseUr&d~3nfYdCT9ik)g@zYe8iyv8X9Xq}Rzy0xxg{r;rbeWcdHdv+2YaMd z_;YC+DVA$mpk56eQ-Qq^9WS<>zMRCFbZSmXxICl_r*?rX&O9z9nZC7o%E| zZWNJgY+mUUR_dFZpXVA;8kuZvQkoR$?U-9pRpA?zA7v7l?BbK3Vd<5WT#%pBkX&4v zgla@-X?C_zakfi@Phg(8pSQ7VhGmv-UP@$InTu0JMRrMgL1v1VV_}lHuW>