Attaching a script to act as a workaround for this issue. Instructions to use it:
1- be sure to have handy the snap ID of the gating snap, the account ID of the publisher of the gating snap, the snap ID of the gated snap and the gated revision that it's being revoked
2- be sure you have access to a valid, store-registered key belonging to the publisher of the gating snap
3- install "surl" (source code at https://github.com/Roadmaster/surl/), which is a CLI helper to make macaroon-authenticated requests against the store APIs
$ sudo snap install surl
3- obtain a suitable macaroon with the right permissions to (later) upload the new assertion to the store:
$ surl -a store-token -e <publisher-email> -p package_access -p package_release -s production
4- generate and sign a new (local) revision of the validation assertion revoking a previous validation (this will create a file that you can review later, nothing will be pushed to the store yet):
Attaching a script to act as a workaround for this issue. Instructions to use it:
1- be sure to have handy the snap ID of the gating snap, the account ID of the publisher of the gating snap, the snap ID of the gated snap and the gated revision that it's being revoked
2- be sure you have access to a valid, store-registered key belonging to the publisher of the gating snap
3- install "surl" (source code at https:/ /github. com/Roadmaster/ surl/), which is a CLI helper to make macaroon- authenticated requests against the store APIs
$ sudo snap install surl
3- obtain a suitable macaroon with the right permissions to (later) upload the new assertion to the store:
$ surl -a store-token -e <publisher-email> -p package_access -p package_release -s production
4- generate and sign a new (local) revision of the validation assertion revoking a previous validation (this will create a file that you can review later, nothing will be pushed to the store yet):
$ python3 revoke_assertion.py <publisher- account- id> <gating-snap-id> <gated-snap-id> <gated-revision> --key <key-name>
5- Review the output and execute the printed surl command
Example of a run:
$ python3 revoke_assertion.py AfdTtIZrrGjK2D0 xQgvZmGJiVIt6Y3 cd ivnP3NKZiyReJIJ dlzXBRxxl4n3Skc nC 99T7MUlRhtI3U0Q Fgl5mXXESAiSwt7 76 9437 --key validations-test
** Please review the assertion before submitting it to the store, assertion was signed and stored in:
/home/ nessita/ ivnP3NKZiyReJIJ dlzXBRxxl4n3Skc nC-99T7MUlRhtI3 U0QFgl5mXXESAiS wt776-9437- r3.assertion
** After assertion review, submit it to the store with:
surl -a store-token -X PUT https:/ /dashboard. snapcraft. io//dev/ api/snaps/ ivnP3NKZiyReJIJ dlzXBRxxl4n3Skc nC/validations -d '{"assertion": "type: validation\ nauthority- id: AfdTtIZrrGjK2D0 xQgvZmGJiVIt6Y3 cd\nrevision: 3\nseries: 16\nsnap-id: ivnP3NKZiyReJIJ dlzXBRxxl4n3Skc nC\napproved- snap-id: 99T7MUlRhtI3U0Q Fgl5mXXESAiSwt7 76\napproved- snap-revision: 9437\nrevoked: true\ntimestamp: 2021-01- 20T14:28: 59.663730Z\ nsign-key- sha3-384: 39Yykj3WyH- fL3h-Q_ 3YSlDlEj- XUlT-SxYd6qTJL4 dN3BP2Q0rGRO2lQ m7XZiEm\ n\nAcLBcwQAAQoA HRYhBJAtR/ 3peIgjQB/ uhd0t1+ KrVFrbBQJgCD4rA AoJEN0t1+ KrVFrbyfMP/ j1g\nWnUDvSMpuA J4hOzI5U3Qt/ j9mzhNnpXKw/ OuLH3rYGRWEQFMl RZHRc6myOlEZovh ORkhy/WJjszR\ nP9WA4uNXOzFnZc /dfj74AQwBio5Jq MqBcGoIMZi6AgmJ 4tyJAJkvxz/ lrGLqXftMa9/ Yv+bC9tN8\ nqHnyBaKc7rjxEj XfeAljBhZbl/ ovUlPb+ /cCrYIS4gc3rvoA hB8SDboG6h4SVCC zyquyU+ MogZQ9\ nH3GYw8jKhjrfVM Jd/jexanLH2dhAf u4vL7so7yO6VnkE eDMg8W00EA75i8v XUnHi4XrboUvu2t F2\njbJmbPAiyL/ C3XDo6eCOZovZE3 q7KJaNIwhkig278 x1VzCiy+ yhq0rbrMgXx8/ AqGkGIHE80d3Th\ n5Z95QiUObTkW3k IjyDhUYLuy4dG5i kstE7DUC1pL0mzN MZwhTwJzhXZM7HY bwXGFtZC8Jx+ CxuMR\nPql1k0jO k4NKHktFaQ5D8AR R0rdU9HGuzkqpOO as9D9tuigOXw8U2 gIEdHpWHJJCvPkG 1PzRblkx\ nBAf45pob9ujVZc kUAtBGsmyGrNsJo Gk7JitYEhcgJd9K QqU21sZeV/ XyGgW4wd8L9X7DJ JxdwutP\ n1qbxzgCaSFCtDR v7MJWHnhnBkWAoE DGXThdEWLXesPEK NDn1bGpL9lDldqh HumAdsXnSKaET\ n"}'