diff --git a/src/agent/samples/policy/yaml/deployment/deployment-busybox.yaml b/src/agent/samples/policy/yaml/deployment/deployment-busybox.yaml index 037c7ff511c8..9b28065b3bdb 100644 --- a/src/agent/samples/policy/yaml/deployment/deployment-busybox.yaml +++ b/src/agent/samples/policy/yaml/deployment/deployment-busybox.yaml @@ -13,9 +13,11 @@ spec: labels: app: busybox-deployment annotations: - io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCmltcG9ydCBpbnB1dAoKIyBEZWZhdWx0IHZhbHVlcywgcmV0dXJuZWQgYnkgT1BBIHdoZW4gcnVsZXMgY2Fubm90IGJlIGV2YWx1YXRlZCB0byB0cnVlLgpkZWZhdWx0IEFkZEFSUE5laWdoYm9yc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBBZGRTd2FwUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENsb3NlU3RkaW5SZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgRGVzdHJveVNhbmRib3hSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBFeGVjUHJvY2Vzc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBHZXRPT01FdmVudFJlcXVlc3QgOj0gdHJ1ZQpkZWZhdWx0IEd1ZXN0RGV0YWlsc1JlcXVlc3QgOj0gdHJ1ZQpkZWZhd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J1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0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mRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291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bGxvd19tb3VudF9wb2ludCAyOiBtb3VudDIgPSIsIG1vdW50MikKCiAgICBtb3VudDIgPT0gaV9zdG9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBs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91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgInNoIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiCiAgICAgICAgICBdLAogICAgICAgICAgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzL2ZzL2Nncm91cCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiY2dyb3VwIiwKICAgICAgICAgICAgInR5cGVfIjogImNncm91cCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJlbGF0aW1lIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RzJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvdGVybWluYXRpb24tbG9nIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRlcm1pbmF0aW9uLWxvZyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RuYW1lIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RuYW1lJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9rdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50IiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXNlcnZpY2VhY2NvdW50JCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRva2VucyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9jb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci1uYW1lIjogImJ1c3lib3gtZGVwbG95bWVudCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAiY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5pbWFnZS1uYW1lIjogIm1jci5taWNyb3NvZnQuY29tL2Frcy9lMmUvbGlicmFyeS1idXN5Ym94Om1hc3Rlci4yMjAzMTQuMS1saW51eC1hbWQ2NCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkc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0sCiAgICAidmlydGlvX2Jsa19zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1sb2NhbC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1wcmVtaXVtLWNzaSIKICAgIF0sCiAgICAic21iX3N0b3JhZ2VfY2xhc3NlcyI6IFsKICAgICAgImNjLWF6dXJlZmlsZS1jc2kiLAogICAgICAiY2MtYXp1cmVmaWxlLXByZW1pdW0tY3NpIgogICAgXQogIH0sCiAgInNhbmRib3giOiB7CiAgICAic3RvcmFnZXMiOiBbCiAgICAgIHsKICAgICAgICAiZHJpdmVyIjogImVwaGVtZXJhbCIsCiAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgInNvdXJjZSI6ICJzaG0iLAogICAgICAgICJmc3R5cGUiOiAidG1wZnMiLAogICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAibW9kZT0xNzc3IiwKICAgICAgICAgICJzaXplPTY3MTA4ODY0IgogICAgICAgIF0sCiAgICAgICAgIm1vdW50X3BvaW50IjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgIH0KICAgIF0KICB9LAogICJyZXF1ZXN0X2RlZmF1bHRzIjogewogICAgIkNyZWF0ZUNvbnRhaW5lclJlcXVlc3QiOiB7CiAgICAgICJhbGxvd19lbnZfcmVnZXgiOiBbCiAgICAgICAgIl5IT1NUTkFNRT0kKGRuc19sYWJlbCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1A9dGNwOi8vJChpcHY0X2EpOiQoaXBfcCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1BfUFJPVE89dGNwJCIsCiA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PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5ub3RhdGlvbnMuCmFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKSB7CiAgICBwcmludCgiYWxsb3dfYW5ubyAxOiBzdGFydCIpCgogICAgbm90IGlfb2NpLkFubm90YXRpb25zCgogICAgcHJpbnQoImFsbG93X2F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F9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0gcmVwbGFjZShyZWdleDEsICIkKHNmcHJlZml4KSIsIHBvbGljeV9kYXRhLmNvbW1vbi5zZnByZWZpeCkKICAgIHJlZ2V4MyA6PSByZXBsYWNlKHJlZ2V4MiwgIiQoY3BhdGgpIiwgcG9saWN5X2Rh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AgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJvIiwKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJub2V4ZWMiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9zYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJzYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWxvZy1kaXJlY3RvcnkiOiAiXi92YXIvbG9nL3BvZHMvJChzYW5kYm94LW5hbWVzcGFjZSlfJChzYW5kYm94LW5hbWUpX1swLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiLAogICAgICAgICAgIm5lcmRjdGwvbmV0d29yay1uYW1lc3BhY2UiOiAiXi92YXIvcnVuL25ldG5zL2NuaS1bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJvdmVybGF5ZnMiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogImZ1c2UzLmthdGEtb3ZlcmxheSIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIjVhNWFhZDgwMDU1ZmYyMDAxMmE1MGRjMjVmOGRmN2EyOTkyNDQ3NDMyNGQ2NWY3ZDUzMDZlZThlZTI3ZmY3MWQiLAogICAgICAgICAgICAiODE3MjUwZjFhM2UzMzZkYTc2ZjViZDNmYTc4NGUxYjI2ZDk1OWI5YzEzMTg3NjgxNWJhMjYwNDA0OGI3MGMxOCIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0sCiAgICB7CiAgICAgICJPQ0kiOiB7CiAgICAgICAgIlZlcnNpb24iOiAiMS4xLjAtcmMuMSIsCiAgICAgICAgIlByb2Nlc3MiOiB7CiAgICAgICAgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMTAwMCwKICAgICAgICAgICAgIkdJRCI6IDAsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAic2giCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIiwKICAgICAgICAgICAgIkhPU1ROQU1FPSQoaG9zdC1uYW1lKSIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMvZnMvY2dyb3VwIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJjZ3JvdXAiLAogICAgICAgICAgICAidHlwZV8iOiAiY2dyb3VwIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicmVsYXRpbWUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdHMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdHMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi90ZXJtaW5hdGlvbi1sb2ciLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdGVybWluYXRpb24tbG9nJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdG5hbWUiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdG5hbWUkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2t1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpc2VydmljZWFjY291bnQkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdG9rZW5zJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX2NvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiOiAiYnVzeWJveC1kZXBsb3ltZW50IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJjb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmltYWdlLW5hbWUiOiAibWNyLm1pY3Jvc29mdC5jb20vYWtzL2UyZS9saWJyYXJ5LWJ1c3lib3g6bWFzdGVyLjIyMDMxNC4xLWxpbnV4LWFtZDY0IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDEpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKG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FuZGJveC9zdG9yYWdlIiwKICAgICJpcHY0X2EiOiAiKCgyNVswLTVdfCgyWzAtNF18MVxcZHxbMS05XXwpXFxkKVxcLj9cXGIpezR9IiwKICAgICJpcF9wIjogIlswLTldezEsNX0iLAogICAgInN2Y19uYW1lIjogIltBLVowLTlfXFwuXFwtXSsiLAogICAgImRuc19sYWJlbCI6ICJbYS16QS1aMC05X1xcLlxcLV0rIiwKICAgICJkZWZhdWx0X2NhcHMiOiBbCiAgICAgICJDQVBfQ0hPV04iLAogICAgICAiQ0FQX0RBQ19PVkVSUklERSIsCiAgICAgICJDQVBfRlNFVElEIiwKICAgICAgIkNBUF9GT1dORVIiLAogICAgICAiQ0FQX01LTk9EIiwKICAgICAgIkNBUF9ORVRfUkFXIiwKICAgICAgIkNBUF9TRVRHSUQiLAogICAgICAiQ0FQX1NFVFVJRCIsCiAgICAgICJDQVBfU0VURkNBUCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTkVUX0JJTkRfU0VSVklDRSIsCiAgICAgICJDQVBfU1lTX0NIUk9PVCIsCiAgICAgICJDQVBfS0lMTCIsCiAgICAgICJDQVBfQVVESVRfV1JJVEUiCiAgICBdLAogICAgInByaXZpbGVnZWRfY2FwcyI6IFsKICAgICAgIkNBUF9DSE9XTiIsCiAgICAgICJDQVBfREFDX09WRVJSSURFIiwKICAgICAgIkNBUF9EQUNfUkVBRF9TRUFSQ0giLAogICAgICAiQ0FQX0ZPV05FUiIsCiAgICAgICJDQVBfRlNFVElEIiwKICAgICAgIkNBUF9LSUxMIiwKICAgICAgIkNBUF9TRVRHSUQiLAogICAgICAiQ0FQX1NFVFVJRCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTElOVVhfSU1NVVRBQkxFIiwKICAgICAgIkNBUF9ORVRfQklORF9TRVJWSUNFIiwKICAgICAgIkNBUF9ORVRfQlJPQURDQVNUIiwKICAgICAgIkNBUF9ORVRfQURNSU4iLAogICAgICAiQ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yZWZpbGUtcHJlbWl1bS1jc2kiCiAgICBdCiAgfSwKICAic2FuZGJveCI6IHsKICAgICJzdG9yYWdlcyI6IFsKICAgICAgewogICAgICAgICJkcml2ZXIiOiAiZXBoZW1lcmFsIiwKICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAic291cmNlIjogInNobSIsCiAgICAgICAgImZzdHlwZSI6ICJ0bXBmcyIsCiAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICJtb2RlPTE3NzciLAogICAgICAgICAgInNpemU9NjcxMDg4NjQiCiAgICAgICAgXSwKICAgICAgICAibW91bnRfcG9pbnQiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgfQogICAgXQogIH0sCiAgInJlcXVlc3RfZGVmYXVsdHMiOiB7CiAgICAiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCI6IHsKICAgICAgImFsbG93X2Vudl9yZWdleCI6IFsKICAgICAgICAiXkhPU1ROQU1FPSQoZG5zX2xhYmVsKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUD10Y3A6Ly8kKGlwdjRfYSk6JChpcF9wKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUF9QUk9UTz10Y3AkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1BfUE9SVD0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQX0FERFI9JChpcHY0X2EpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX0hPU1Q9JChpcHY0X2EpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX1BPUlQ9JChpcF9wKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfU0VSVklDRV9QT1JUXyQoZG5zX2xhYmVsKT0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUPXRjcDovLyQoaXB2NF9hKTokKGlwX3ApJCIsCiAgICAgICAgIl5BWlVSRV9DTElFTlRfSUQ9W0EtRmEtZjAtOS1dKiQiLAogICAgICAgICJeQVpVUkVfVEVOQU5UX0lEPVtBLUZhLWYwLTktXSokIiwKICAgICAgICAiXkFaVVJFX0ZFREVSQVRFRF9UT0tFTl9GSUxFPS92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zL2F6dXJlLWlkZW50aXR5LXRva2VuJCIsCiAgICAgICAgIl5BWlVSRV9BVVRIT1JJVFlfSE9TVD1odHRwczovL2xvZ2luXFwubWljcm9zb2Z0b25saW5lXFwuY29tLyQiCiAgICAgIF0KICAgIH0sCiAgICAiQ29weUZpbGVSZXF1ZXN0IjogWwogICAgICAiJChzZnByZWZpeCkiCiAgICBdLAogICAgIkV4ZWNQcm9jZXNzUmVxdWVzdCI6IHsKICAgICAgImNvbW1hbmRzIjogW10sCiAgICAgICJyZWdleCI6IFtdCiAgICB9LAogICAgIkNsb3NlU3RkaW5SZXF1ZXN0IjogZmFsc2UsCiAgICAiUmVhZFN0cmVhbVJlcXVlc3QiOiB0cnVlLAogICAgIlVwZGF0ZUVwaGVtZXJhbE1vdW50c1JlcXVlc3QiOiBmYWxzZSwKICAgICJXcml0ZVN0cmVhbVJlcXVlc3QiOiBmYWxzZQogIH0KfQ== spec: runtimeClassName: kata-cc + securityContext: + runAsUser: 1000 shareProcessNamespace: true containers: - image: "mcr.microsoft.com/aks/e2e/library-busybox:master.220314.1-linux-amd64" diff --git a/src/agent/samples/policy/yaml/job/test-job.yaml b/src/agent/samples/policy/yaml/job/test-job.yaml index bfc54471c067..5cea0d514123 100644 --- a/src/agent/samples/policy/yaml/job/test-job.yaml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nB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5ub3RhdGlvbnMuCmFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKSB7CiAgICBwcmludCgiYWxsb3dfYW5ubyAxOiBzdGFydCIpCgogICAgbm90IGlfb2NpLkFubm90YXRpb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vd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0gcmVwbGFjZShyZWdleDEsICIkKHNmcHJlZml4KSIsIHBvbGljeV9kYXRhLmNvbW1vbi5zZnByZWZpeCkKICAgIHJlZ2V4MyA6PSByZXBsYWNlKHJlZ2V4MiwgI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p9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50M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gICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgInNoIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiLAogICAgICAgICAgICAiSk9CX0NPTVBMRVRJT05fSU5ERVg9JCh0b2RvLWFubm90YXRpb24pIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJzaCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAiY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5pbWFnZS1uYW1lIjogInJlZ2lzdHJ5Lms4cy5pby9lMmUtdGVzdC1pbWFnZXMvYnVzeWJveDoxLjI5LTIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3Vy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F9TWVNfUkVTT1VSQ0UiLAogICAgICAiQ0FQX1NZU19USU1FIiwKICAgICAgIkNBUF9TWVNfVFRZX0NPTkZJRyIsCiAgICAgICJDQVBfTUtOT0QiLAogICAgICAiQ0FQX0xFQVNFIiwKICAgICAgIkNBUF9BVURJVF9XUklURSIsCiAgICAgICJDQVBfQVVESVRfQ09OVFJPTCIsCiAgICAgICJDQVBfU0VURkNBUCIsCiAgICAgICJDQVBfTUFDX09WRVJSSURFIiwKICAgICAgIkNBUF9NQUNfQURNSU4iLAogICAgICAiQ0FQX1NZU0xPRyIsCiAgICAgICJDQVBfV0FLRV9BTEFSTSIsCiAgICAgICJDQVBfQkxPQ0tfU1VTUEVORCIsCiAgICAgICJDQVBfQVVESVRfUkVBRCIsCiAgICAgICJDQVBfUEVSRk1PTiIsCiAgICAgICJDQVBfQlBGIiwKICAgICAgIkNBUF9DSEVDS1BPSU5UX1JFU1RPUkUiCiAgICBdLAogICAgInZpcnRpb19ibGtfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtbG9jYWwtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtcHJlbWl1bS1jc2kiCiAgICBdLAogICAgInNtYl9zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1henVyZWZpbGUtY3NpIiwKICAgICAgImNjLWF6dXJlZmlsZS1wcmVtaXVtLWNzaSIKICAgIF0KICB9LAogICJzYW5kYm94IjogewogICAgInN0b3JhZ2VzIjogWwogICAgICB7CiAgICAgICAgImRyaXZlciI6ICJlcGhlbWVyYWwiLAogICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICJzb3VyY2UiOiAic2htIiwKICAgICAgICAiZnN0eXBlIjogInRtcGZzIiwKICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAibm9kZXYiLAogICAgICAg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WFkb25seSkKICAgIHBfb2NpLlJvb3QuUmVhZG9ubHkgPT0gaV9vY2kuUm9vdC5SZWFkb25seQoKICAgIGFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKQoKICAgIHBfc3RvcmFnZXMgOj0gcF9jb250YWluZXIuc3RvcmFnZXMKICAgIGFsbG93X2J5X2Fubm8ocF9vY2ksIGlfb2NpLCBwX3N0b3JhZ2VzLCBpX3N0b3JhZ2VzKQoKICAgIGFsbG93X2xpbnV4KHBfb2NpLCBpX29jaSkKCiAgICBwcmludCgiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdDogdHJ1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICA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YWxsb3dfcm9vdF9wYXRoOiBwX3BhdGgyID0iLCBwX3BhdGgyKQoKICAgIHBfcGF0aDMgOj0gcmVwbGFjZShwX3BhdGgyLCAiJChidW5kbGUtaWQpIiwgYnVuZGxlX2lkKQogICAgcHJpbnQoImFsbG93X3Jvb3RfcGF0aDogcF9wYXRoMyA9IiwgcF9wYXRoMykKCiAgICBwX3BhdGgzID09IGlfcGF0aAoKICAgIHByaW50KCJhbGxvd19yb290X3BhdGg6IHRydWUiKQp9CgojIGRldmljZSBtb3VudHMKYWxsb3dfbW91bnQocF9vY2ksIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogIC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AgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMTIzLAogICAgICAgICAgICAiR0lEIjogNjU1MzUsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAiL3BhdXNlIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicm8iLAogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgIm5vZXhlYyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX3NhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogInNhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbG9nLWRpcmVjdG9yeSI6ICJeL3Zhci9sb2cvcG9kcy8kKHNhbmRib3gtbmFtZXNwYWNlKV8kKHNhbmRib3gtbmFtZSlfWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIsCiAgICAgICAgICAibmVyZGN0bC9uZXR3b3JrLW5hbWVzcGFjZSI6ICJeL3Zhci9ydW4vbmV0bnMvY25pLVswLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiNWE1YWFkODAwNTVmZjIwMDEyYTUwZGMyNWY4ZGY3YTI5OTI0NDc0MzI0ZDY1ZjdkNTMwNmVlOGVlMjdmZjcxZCIsCiAgICAgICAgICAgICI4MTcyNTBmMWEzZTMzNmRhNzZmNWJkM2ZhNzg0ZTFiMjZkOTU5YjljMTMxODc2ODE1YmEyNjA0MDQ4YjcwYzE4IgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0KICAgICAgXSwKICAgICAgInNhbmRib3hfcGlkbnMiOiBmYWxzZSwKICAgICAgImV4ZWNfY29tbWFuZHMiOiBbXQogICAgfSwKICAgIHsKICAgICAgIk9DSSI6IHsKICAgICAgICAiVmVyc2lvbiI6ICIxLjEuMC1yYy4xIiwKICAgICAgICAiUHJvY2VzcyI6IHsKICAgICAgICAgICJUZXJtaW5hbCI6IGZhbHNlLAogICAgICAgICAgIlVzZXIiOiB7CiAgICAgICAgICAgICJVSUQiOiAxMjMsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgInNoIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiLAogICAgICAgICAgICAiSk9CX0NPTVBMRVRJT05fSU5ERVg9JCh0b2RvLWFubm90YXRpb24pIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJzaCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAiY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5pbWFnZS1uYW1lIjogInJlZ2lzdHJ5Lms4cy5pby9lMmUtdGVzdC1pbWFnZXMvYnVzeWJveDoxLjI5LTIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiNGQwNjUzZjdjN2UzZjQ5YjQ5MDA2YTlmNGU4MTNhYTExNjZjNTMyYTM0YTc2NTBhZmE2ZmFhNTIyNmYxZWM1ZiIsCiAgICAgICAgICAgICJiZDViYjM4NzA5ZDI5NDNhMzZhMDJlNDU0ZTM0ZDNkNmNhYTIzODVmYjE0MGQ3ZjE3OTdmZDBhMjdhOTM3ZGRiIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0KICAgICAgXSwKICAgICAgInNhbmRib3hfcGlkbnMiOiBmYWxzZSwKICAgICAgImV4ZWNfY29tbWFuZHMiOiBbXQogICAgfQogIF0sCiAgImNvbW1vbiI6IHsKICAgICJjcGF0aCI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zaGFyZWQvY29udGFpbmVycyIsCiAgICAic2ZwcmVmaX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mFnZWQtcHJlbWl1bS1jc2kiCiAgICBdLAogICAgInNtYl9zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1henVyZWZpbGUtY3NpIiwKICAgICAgImNjLWF6dXJlZmlsZS1wcmVtaXVtLWNzaSIKICAgIF0KICB9LAogICJzYW5kYm94IjogewogICAgInN0b3JhZ2VzIjogWwogICAgICB7CiAgICAgICAgImRyaXZlciI6ICJlcGhlbWVyYWwiLAogICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICJzb3VyY2UiOiAic2htIiwKICAgICAgICAiZnN0eXBlIjogInRtcGZzIiwKICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgIm1vZGU9MTc3NyIsCiAgICAgICAgICAic2l6ZT02NzEwODg2NCIKICAgICAgICBdLAogICAgICAgICJtb3VudF9wb2ludCI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICB9CiAgICBdCiAgfSwKICAicmVxdWVzdF9kZWZhdWx0cyI6IHsKICAgICJDcmVhdGVDb250YWluZXJSZXF1ZXN0IjogewogICAgICAiYWxsb3dfZW52X3JlZ2V4IjogWwogICAgICAgICJeSE9TVE5BTUU9JChkbnNfbGFiZWwpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQPXRjcDovLyQoaXB2NF9hKTokKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQX1BST1RPPXRjcCQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUF9QT1JUPSQoaXBfcCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1BfQUREUj0kKGlwdjRfYSkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1NFUlZJQ0VfSE9TVD0kKGlwdjRfYSkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1NFUlZJQ0VfUE9SVD0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX1BPUlRfJChkbnNfbGFiZWwpPSQoaXBfcCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlQ9dGNwOi8vJChpcHY0X2EpOiQoaXBfcCkkIiwKICAgICAgICAiXkFaVVJFX0NMSUVOVF9JRD1bQS1GYS1mMC05LV0qJCIsCiAgICAgICAgIl5BWlVSRV9URU5BTlRfSUQ9W0EtRmEtZjAtOS1dKiQiLAogICAgICAgICJeQVpVUkVfRkVERVJBVEVEX1RPS0VOX0ZJTEU9L3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMvYXp1cmUtaWRlbnRpdHktdG9rZW4kIiwKICAgICAgICAiXkFaVVJFX0FVVEhPUklUWV9IT1NUPWh0dHBzOi8vbG9naW5cXC5taWNyb3NvZnRvbmxpbmVcXC5jb20vJCIKICAgICAgXQogICAgfSwKICAgICJDb3B5RmlsZVJlcXVlc3QiOiBbCiAgICAgICIkKHNmcHJlZml4KSIKICAgIF0sCiAgICAiRXhlY1Byb2Nlc3NSZXF1ZXN0IjogewogICAgICAiY29tbWFuZHMiOiBbXSwKICAgICAgInJlZ2V4IjogW10KICAgIH0sCiAgICAiQ2xvc2VTdGRpblJlcXVlc3QiOiBmYWxzZSwKICAgICJSZWFkU3RyZWFtUmVxdWVzdCI6IHRydWUsCiAgICAiVXBkYXRlRXBoZW1lcmFsTW91bnRzUmVxdWVzdCI6IGZhbHNlLAogICAgIldyaXRlU3RyZWFtUmVxdWVzdCI6IGZhbHNlCiAgfQp9 spec: restartPolicy: Never runtimeClassName: kata-cc + securityContext: + runAsUser: 123 containers: - name: sh image: "registry.k8s.io/e2e-test-images/busybox:1.29-2" diff --git a/src/agent/samples/policy/yaml/kubernetes/conformance/netexecrc.yaml b/src/agent/samples/policy/yaml/kubernetes/conformance/netexecrc.yaml index 99fc2752fe01..b145edc8b6d0 100644 --- a/src/agent/samples/policy/yaml/kubernetes/conformance/netexecrc.yaml +++ b/src/agent/samples/policy/yaml/kubernetes/conformance/netexecrc.yaml @@ -10,9 +10,11 @@ spec: labels: app: netexec annotations: - io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCmltcG9ydCBpbnB1dAoKIyBEZWZhdWx0IHZhbHVlcywgcmV0dXJuZWQgYnkgT1BBIHdoZW4gcnVsZXMgY2Fubm90IGJlIGV2YWx1YXRlZCB0byB0cnVlLgpkZWZhdWx0IEFkZEFSUE5laWdoYm9yc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBBZGRTd2FwUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENsb3NlU3RkaW5SZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgRGVzdHJveVNhbmRib3hSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBFeGVjUHJvY2Vzc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBHZXRPT01FdmVudFJlcXVlc3QgOj0gdHJ1ZQpkZWZhdWx0IEd1ZXN0RGV0YWlsc1JlcXVlc3QgOj0gdHJ1ZQpkZW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ogdHJ1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZ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1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQ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CJhbGxvd19tb3VudF9wb2ludCAyOiBtb3VudDIgPSIsIG1vdW50MikKCiAgICBtb3VudDIgPT0gaV9zdG9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZ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luOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgIi9hZ25ob3N0IiwKICAgICAgICAgICAgIm5ldGV4ZWMiCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIiwKICAgICAgICAgICAgIkhPU1ROQU1FPSQoaG9zdC1uYW1lKSIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMvZnMvY2dyb3VwIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJjZ3JvdXAiLAogICAgICAgICAgICAidHlwZV8iOiAiY2dyb3VwIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicmVsYXRpbWUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdHMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdHMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi90ZXJtaW5hdGlvbi1sb2ciLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdGVybWluYXRpb24tbG9nJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdG5hbWUiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdG5hbWUkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2t1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpc2VydmljZWFjY291bnQkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdG9rZW5zJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX2NvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiOiAibmV0ZXhlYyIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAiY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5pbWFnZS1uYW1lIjogInJlZ2lzdHJ5Lms4cy5pby9lMmUtdGVzdC1pbWFnZXMvYWduaG9zdDoyLjMyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDEpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMSkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDIpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMikiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDMpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMykiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDQpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyNCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDUpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyNSkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDYpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyNikiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDcpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyNykiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAi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VBRCIsCiAgICAgICJDQVBfUEVSRk1PTiIsCiAgICAgICJDQVBfQlBGIiwKICAgICAgIkNBUF9DSEVDS1BPSU5UX1JFU1RPUkUiCiAgICBdLAogICAgInZpcnRpb19ibGtfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtbG9jYWwtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtcHJlbWl1bS1jc2kiCiAgICBdLAogICAgInNtYl9zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1henVyZWZpbGUtY3NpIiwKICAgICAgImNjLWF6dXJlZmlsZS1wcmVtaXVtLWNzaSIKICAgIF0KICB9LAogICJzYW5kYm94IjogewogICAgInN0b3JhZ2VzIjogWwogICAgICB7CiAgICAgICAgImRyaXZlciI6ICJlcGhlbWVyYWwiLAogICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICJzb3VyY2UiOiAic2htIiwKICAgICAgICAiZnN0eXBlIjogInRtcGZzIiwKICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgIm1vZGU9MTc3NyIsCiAgICAgICAgICAic2l6ZT02NzEwODg2NCIKICAgICAgICBdLAogICAgICAgICJtb3VudF9wb2ludCI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICB9CiAgICBdCiAgfSwKICAicmVxdWVzdF9kZWZhdWx0cyI6IHsKICAgICJDcmVhdGVDb250YWluZXJSZXF1ZXN0IjogewogICAgICAiYWxsb3dfZW52X3JlZ2V4IjogWwogICAgICAgICJeSE9TVE5BTUU9JChkbnNfbGFiZWwpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQPXRjcDovLyQoaXB2NF9h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NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5ub3RhdGlvbnMuCmFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKSB7Ci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21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0gcmVwbGFjZShyZWdleDEsICIkKHNmcHJlZml4KSIsIHBvbGljeV9kYX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9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJ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AgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJvIiwKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJub2V4ZWMiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9zYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJzYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWxvZy1kaXJlY3RvcnkiOiAiXi92YXIvbG9nL3BvZHMvJChzYW5kYm94LW5hbWVzcGFjZSlfJChzYW5kYm94LW5hbWUpX1swLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiLAogICAgICAgICAgIm5lcmRjdGwvbmV0d29yay1uYW1lc3BhY2UiOiAiXi92YXIvcnVuL25ldG5zL2NuaS1bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJvdmVybGF5ZnMiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogImZ1c2UzLmthdGEtb3ZlcmxheSIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIjVhNWFhZDgwMDU1ZmYyMDAxMmE1MGRjMjVmOGRmN2EyOTkyNDQ3NDMyNGQ2NWY3ZDUzMDZlZThlZTI3ZmY3MWQiLAogICAgICAgICAgICAiODE3MjUwZjFhM2UzMzZkYTc2ZjViZDNmYTc4NGUxYjI2ZDk1OWI5YzEzMTg3NjgxNWJhMjYwNDA0OGI3MGMxOCIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0sCiAgICB7CiAgICAgICJPQ0kiOiB7CiAgICAgICAgIlZlcnNpb24iOiAiMS4xLjAtcmMuMSIsCiAgICAgICAgIlByb2Nlc3MiOiB7CiAgICAgICAgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMSwKICAgICAgICAgICAgIkdJRCI6IDAsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAiL2Fnbmhvc3QiLAogICAgICAgICAgICAibmV0ZXhlYyIKICAgICAgICAgIF0sCiAgICAgICAgICAiRW52IjogWwogICAgICAgICAgICAiUEFUSD0vdXNyL2xvY2FsL3NiaW46L3Vzci9sb2NhbC9iaW46L3Vzci9zYmluOi91c3IvYmluOi9zYmluOi9iaW4iLAogICAgICAgICAgICAiSE9TVE5BTUU9JChob3N0LW5hbWUpIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJuZXRleGVjIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJjb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmltYWdlLW5hbWUiOiAicmVnaXN0cnkuazhzLmlvL2UyZS10ZXN0LWltYWdlcy9hZ25ob3N0OjIuMzIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMSkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIxKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMikiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIyKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMykiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIzKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoNCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXI0KSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoNSkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXI1KSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoNikiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXI2KSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoNykiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXI3KSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwK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3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9CiAgXSwKICAiY29tbW9uIjogewogICAgImNwYXRoIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NoYXJlZC9jb250YWluZXJzIiwKICAgICJzZnByZWZpeCI6ICJeJChjcGF0aCkvJChidW5kbGUtaWQpLVthLXowLTldezE2fS0iLAogICAgInNwYXRoIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc3RvcmFnZSIsCiAgICAiaXB2NF9hIjogIigoMjVbMC01XXwoMlswLTRdfDFcXGR8WzEtOV18KVxcZClcXC4/XFxiKXs0fSIsCiAgICAiaXBfcCI6ICJbMC05XXsxLDV9IiwKICAgICJzdmNfbmFtZSI6ICJbQS1aMC05X1xcLlxcLV0rIiwKICAgICJkbnNfbGFiZWwiOiAiW2EtekEtWjAtOV9cXC5cXC1dKyIsCiAgICAiZGVmYXVsdF9jYXBzIjogWwogICAgICAiQ0FQX0NIT1dOIiwKICAgICAgIkNBUF9EQUNfT1ZFUlJJREUiLAogICAgICAiQ0FQX0ZTRVRJRCIsCiAgICAgICJDQVBfRk9XTkVSIiwKICAgICAgIkNBUF9NS05PRCIsCiAgICAgICJDQVBfTkVUX1JBVyIsCiAgICAgICJDQVBfU0VUR0lEIiwKICAgICAgIkNBUF9TRVRVSUQiLAogICAgICAiQ0FQX1NFVEZDQVAiLAogICAgICAiQ0FQX1NFVFBDQVAiLAogICAgICAiQ0FQX05FVF9CSU5EX1NFUlZJQ0UiLAogICAgICAiQ0FQX1NZU19DSFJPT1QiLAogICAgICAiQ0FQX0tJTEwiLAogICAgICAiQ0FQX0FVRElUX1dSSVRFIgogICAgXSwKICAgICJwcml2aWxlZ2VkX2NhcHMiOiBbCiAgICAgICJDQVBfQ0hPV04iLAogICAgICAiQ0FQX0RBQ19PVkVSUklERSIsCiAgICAgICJD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AgIkNBUF9QRVJGTU9OIiwKICAgICAgIkNBUF9CUEYiLAogICAgICAiQ0FQX0NIRUNLUE9JTlRfUkVTVE9SRSIKICAgIF0sCiAgICAidmlydGlvX2Jsa19zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1sb2NhbC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1wcmVtaXVtLWNzaSIKICAgIF0sCiAgICAic21iX3N0b3JhZ2VfY2xhc3NlcyI6IFsKICAgICAgImNjLWF6dXJlZmlsZS1jc2kiLAogICAgICAiY2MtYXp1cmVmaWxlLXByZW1pdW0tY3NpIgogICAgXQogIH0sCiAgInNhbmRib3giOiB7CiAgICAic3RvcmFnZXMiOiBbCiAgICAgIHsKICAgICAgICAiZHJpdmVyIjogImVwaGVtZXJhbCIsCiAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgInNvdXJjZSI6ICJzaG0iLAogICAgICAgICJmc3R5cGUiOiAidG1wZnMiLAogICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAibW9kZT0xNzc3IiwKICAgICAgICAgICJzaXplPTY3MTA4ODY0IgogICAgICAgIF0sCiAgICAgICAgIm1vdW50X3BvaW50IjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgIH0KICAgIF0KICB9LAogICJyZXF1ZXN0X2RlZmF1bHRzIjogewogICAgIkNyZWF0ZUNvbnRhaW5lclJlcXVlc3QiOiB7CiAgICAgICJhbGxvd19lbnZfcmVnZXgiOiBbCiAgICAgICAgIl5IT1NUTkFNRT0kKGRuc19sYWJlbCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1A9dGNwOi8vJChpcHY0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ZXN0IjogdHJ1ZSwKICAgICJVcGRhdGVFcGhlbWVyYWxNb3VudHNSZXF1ZXN0IjogZmFsc2UsCiAgICAiV3JpdGVTdHJlYW1SZXF1ZXN0IjogZmFsc2UKICB9Cn0= spec: runtimeClassName: kata-cc + securityContext: + runAsUser: 1 containers: - name: netexec image: "registry.k8s.io/e2e-test-images/agnhost:2.32" diff --git a/src/agent/samples/policy/yaml/kubernetes/fixtures/daemon.yaml b/src/agent/samples/policy/yaml/kubernetes/fixtures/daemon.yaml index 5ad97014af70..03e6fd617124 100644 --- a/src/agent/samples/policy/yaml/kubernetes/fixtures/daemon.yaml +++ b/src/agent/samples/policy/yaml/kubernetes/fixtures/daemon.yaml @@ -15,9 +15,11 @@ spec: daemon: prom-node-exp katacontainers.io/kata-runtime: "true" annotations: - io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCmltcG9ydCBpbnB1dAoKIyBEZWZhdWx0IHZhbHVlcywgcmV0dXJuZWQgYnkgT1BBIHdoZW4gcnVsZXMgY2Fubm90IGJlIGV2YWx1YXRlZCB0byB0cnVlLgpkZWZhdWx0IEFkZEFSUE5laWdoYm9yc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBBZGRTd2FwUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENsb3NlU3RkaW5SZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZX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lfb2NpKQoKICAgIHBfc3RvcmFnZXMgOj0gcF9jb250YWluZXIuc3RvcmFnZXMKICAgIGFsbG93X2J5X2Fubm8ocF9vY2ksIGlfb2NpLCBwX3N0b3JhZ2VzLCBpX3N0b3JhZ2VzKQoKICAgIGFsbG93X2xpbnV4KHBfb2NpLCBpX29jaSkKCiAgICBwcmludCgiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdDogdHJ1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0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kbGUtaWQpIiwgYnVuZGxlX2lkKQogICAgcHJpbnQoImFsbG93X3Jvb3RfcGF0aDogcF9wYXRoMyA9IiwgcF9wYXRoMykKCiAgICBwX3BhdGgzID09IGlfcGF0aAoKICAgIHByaW50KCJhbGxvd19yb290X3BhdGg6IHRydWUiKQp9CgojIGRldmljZSBtb3VudHMKYWxsb3dfbW91bnQocF9vY2ksIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnR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2NTUzNSwKICAgICAgICAgICAgIkFkZGl0aW9uYWxHaWRzIjogW10sCiAgICAgICAgICAgICJVc2VybmFtZSI6ICIiCiAgICAgICAgICB9LAogICAgICAgICAgIkFyZ3MiOiBbCiAgICAgICAgICAgICIvcGF1c2UiCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgInNoIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiCiAgICAgICAgICBdLAogICAgICAgICAgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzL2ZzL2Nncm91cCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiY2dyb3VwIiwKICAgICAgICAgICAgInR5cGVfIjogImNncm91cCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJlbGF0aW1lIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RzJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvdGVybWluYXRpb24tbG9nIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRlcm1pbmF0aW9uLWxvZyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RuYW1lIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RuYW1lJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9rdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50IiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXNlcnZpY2VhY2NvdW50JCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRva2VucyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9jb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci1uYW1lIjogImMiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogImNvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuaW1hZ2UtbmFtZSI6ICJtY3IubWljcm9zb2Z0LmNvbS9ha3MvZTJlL2xpYnJhcnktYnVzeWJveDptYXN0ZXIuMjIwMzE0LjEtbGludXgtYW1kNjQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMSkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIxKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiMmMzNDJhMTM3ZTY5M2M3ODk4YWVjMzZkYTEwNDdmMTkxZGM3YzE2ODdlNjYxOThhZGFjYzQzOWNmNGFkZjM3OToyNTcwZTNhMTllMWJmMjBkZGRhNDU0OThhOTYyN2Y2MTU1NWQyZDZjMDE0NzliOWI3NjQ2MGI2NzliMjdkNTUyIiwKICAgICAgICAgICAgIjg1NjhjNzBjMGNjZmUwMDUxMDkyZTgxOGRhNzY5MTExYTU5ODgyY2QxOWRkNzk5ZDNiY2E1ZmZhODI3OTEwODA6YjY0M2I2MjE3NzQ4OTgzODMwYjI2YWMxNGEzNWEzMzIyZGQ1MjhjMDA5NjNlYWFkZDkxZWY1NWY1MTNkYzczZiIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0KICBdLAogICJjb21tb24iOiB7CiAgICAiY3BhdGgiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2hhcmVkL2NvbnRhaW5lcnMiLAogICAgInNmcHJlZml4IjogIl4kKGNwYXRoKS8kKGJ1bmRsZS1pZCktW2EtejAtOV17MTZ9LSIsCiAgICAic3BhdGgiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zdG9yYWdlIiwKICAgICJpcHY0X2EiOiAiKCgyNVswLTVdfCgyWzAtNF18MVxcZHxbMS05XXwpXFxkKVxcLj9cXGIpezR9IiwKICAgICJpcF9wIjogIlswLTldezEsNX0iLAogICAgInN2Y19uYW1lIjogIltBLVowLTlfXFwuXFwtXSsiLAogICAgImRuc19sYWJlbCI6ICJbYS16QS1aMC05X1xcLlxcLV0rIiwKICAgICJkZWZhdWx0X2NhcHMiOiBbCiAgICAgICJDQVBfQ0hPV04iLAogICAgICAiQ0FQX0RBQ19PVkVSUklERSIsCiAgICAgICJDQVBfRlNFVElEIiwKICAgICAgIkNBUF9GT1dORVIiLAogICAgICAiQ0FQX01LTk9EIiwKICAgICAgIkNBUF9ORVRfUkFXIiwKICAgICAgIkNBUF9TRVRHSUQiLAogICAgICAiQ0FQX1NFVFVJRCIsCiAgICAgICJDQVBfU0VURkNBUCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTkVUX0JJTkRfU0VSVklDRSIsCiAgICAgICJDQVBfU1lTX0NIUk9PVCIsCiAgICAgICJDQVBfS0lMTCIsCiAgICAgICJDQVBfQVVESVRfV1JJVEUiCiAgICBdLAogICAgInByaXZpbGVnZWRfY2FwcyI6IFsKICAgICAgIkNBUF9DSE9XTiIsCiAgICAgICJDQVBfREFDX09WRVJSSURFIiwKICAgICAgIkNBUF9EQUNfUkVBRF9TRUFSQ0giLAogICAgICAiQ0FQX0ZPV05FUiIsCiAgICAgICJDQVBfRlNFVElEIiwKICAgICAgIkNBUF9LSUxMIiwKICAgICAgIkNBUF9TRVRHSUQiLAogICAgICAiQ0FQX1NFVFVJRCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTElOVVhfSU1NVVRBQkxFIiwKICAgICAgIkNBUF9ORVRfQklORF9TRVJWSUNFIiwKICAgICAgIkNBUF9ORVRfQlJPQURDQVNUIiwKICAgICAgIkNBUF9ORVRfQURNSU4iLAogICAgICAiQ0FQX05FVF9SQVciLAogICAgICAiQ0FQX0lQQ19MT0NLIiwKICAgICAgIkNBUF9JUENfT1dORVIiLAogICAgICAiQ0FQX1NZU19NT0RVTEUiLAogICAgICAiQ0FQX1NZU19SQVdJTyIsCiAgICAgICJDQVBfU1lTX0NIUk9PVCIsCiAgICAgICJDQVBfU1lTX1BUUkFDRSIsCiAgICAgICJDQVBfU1lTX1BBQ0NUIiwKICAgICAgIkNBUF9TWVNfQURNSU4iLAogICAgICAiQ0FQX1NZU19CT09UIiwKICAgICAgIkNBUF9TWVNfTklDRSIsCiAgICAgICJDQVBfU1lTX1JFU09VUkNFIiwKICAgICAgIkNBUF9TWVNfVElNRSIsCiAgICAgICJDQVBfU1lTX1RUWV9DT05GSUciLAogICAgICAiQ0FQX01LTk9EIiwKICAgICAgIkNBUF9MRUFTRSIsCiAgICAgICJDQVBfQVVESVRfV1JJVEUiLAogICAgICAiQ0FQX0FVRElUX0NPTlRST0wiLAogICAgICAiQ0FQX1NFVEZDQVAiLAogICAgICAiQ0FQX01BQ19PVkVSUklERSIsCiAgICAgICJDQVBfTUFDX0FETUlOIiwKICAgICAgIkNBUF9TWVNMT0ciLAogICAgICAiQ0FQX1dBS0VfQUxBUk0iLAogICAgICAiQ0FQX0JMT0NLX1NVU1BFTkQiLAogICAgICAiQ0FQX0FVRElUX1JFQUQiLAogICAgICAiQ0FQX1BFUkZNT04iLAogICAgICAiQ0FQX0JQRiIsCiAgICAgICJDQVBfQ0hFQ0tQT0lOVF9SRVNUT1JFIgogICAgXSwKICAgICJ2aXJ0aW9fYmxrX3N0b3JhZ2VfY2xhc3NlcyI6IFsKICAgICAgImNjLWxvY2FsLWNzaSIsCiAgICAgICJjYy1tYW5hZ2VkLWNzaSIsCiAgICAgICJjYy1tYW5hZ2VkLXByZW1pdW0tY3NpIgogICAgXSwKICAgICJzbWJfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtYXp1cmVmaWxlLWNzaSIsCiAgICAgICJjYy1henVyZWZpbGUtcHJlbWl1bS1jc2kiCiAgICBdCiAgfSwKICAic2FuZGJveCI6IHsKICAgICJzdG9yYWdlcyI6IFsKICAgICAgewogICAgICAgICJkcml2ZXIiOiAiZXBoZW1lcmFsIiwKICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAic291cmNlIjogInNobSIsCiAgICAgICAgImZzdHlwZSI6ICJ0bXBmcyIsCiAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICJtb2RlPTE3NzciLAogICAgICAgICAgInNpemU9NjcxMDg4NjQiCiAgICAgICAgXSwKICAgICAgICAibW91bnRfcG9pbnQiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgfQogICAgXQogIH0sCiAgInJlcXVlc3RfZGVmYXVsdHMiOiB7CiAgICAiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCI6IHsKICAgICAgImFsbG93X2Vudl9yZWdleCI6IFsKICAgICAgICAiXkhPU1ROQU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bmVyUmVxdWVzdDogdHJ1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSI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IGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgx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ZCkKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAyOiBtb3VudDIgPSIsIG1vdW50MikKCiAgICBtb3VudDIgPT0gaV9zdG9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgI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xvY2FsL3NiaW46L3Vzci9sb2NhbC9iaW46L3Vzci9zYmluOi91c3IvYmluOi9zYmluOi9iaW4iCiAgICAgICAgICBdLAogICAgICAgICAgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJvIiwKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJub2V4ZWMiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9zYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJzYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWxvZy1kaXJlY3RvcnkiOiAiXi92YXIvbG9nL3BvZHMvJChzYW5kYm94LW5hbWVzcGFjZSlfJChzYW5kYm94LW5hbWUpX1swLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiLAogICAgICAgICAgIm5lcmRjdGwvbmV0d29yay1uYW1lc3BhY2UiOiAiXi92YXIvcnVuL25ldG5zL2NuaS1bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJvdmVybGF5ZnMiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogImZ1c2UzLmthdGEtb3ZlcmxheSIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIjVhNWFhZDgwMDU1ZmYyMDAxMmE1MGRjMjVmOGRmN2EyOTkyNDQ3NDMyNGQ2NWY3ZDUzMDZlZThlZTI3ZmY3MWQiLAogICAgICAgICAgICAiODE3MjUwZjFhM2UzMzZkYTc2ZjViZDNmYTc4NGUxYjI2ZDk1OWI5YzEzMTg3NjgxNWJhMjYwNDA0OGI3MGMxOCIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0sCiAgICB7CiAgICAgICJPQ0kiOiB7CiAgICAgICAgIlZlcnNpb24iOiAiMS4xLjAtcmMuMSIsCiAgICAgICAgIlByb2Nlc3MiOiB7CiAgICAgICAgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMTAwMCwKICAgICAgICAgICAgIkdJRCI6IDAsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAic2giCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIiwKICAgICAgICAgICAgIkhPU1ROQU1FPSQoaG9zdC1uYW1lKSIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMvZnMvY2dyb3VwIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJjZ3JvdXAiLAogICAgICAgICAgICAidHlwZV8iOiAiY2dyb3VwIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicmVsYXRpbWUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdHMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdHMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi90ZXJtaW5hdGlvbi1sb2ciLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdGVybWluYXRpb24tbG9nJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdG5hbWUiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdG5hbWUkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2t1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpc2VydmljZWFjY291bnQkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdG9rZW5zJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX2NvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiOiAiYyIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAiY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5pbWFnZS1uYW1lIjogIm1jci5taWNyb3NvZnQuY29tL2Frcy9lMmUvbGlicmFyeS1idXN5Ym94Om1hc3Rlci4yMjAzMTQuMS1saW51eC1hbWQ2NCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwK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cnRpb19ibGtfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtbG9jYWwtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtY3NpIiwKICAgICAgImNjLW1hbmFnZWQtcHJlbWl1bS1jc2kiCiAgICBdLAogICAgInNtYl9zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1henVyZWZpbGUtY3NpIiwKICAgICAgImNjLWF6dXJlZmlsZS1wcmVtaXVtLWNzaSIKICAgIF0KICB9LAogICJzYW5kYm94IjogewogICAgInN0b3JhZ2VzIjogWwogICAgICB7CiAgICAgICAgImRyaXZlciI6ICJlcGhlbWVyYWwiLAogICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICJzb3VyY2UiOiAic2htIiwKICAgICAgICAiZnN0eXBlIjogInRtcGZzIiwKICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgIm1vZGU9MTc3NyIsCiAgICAgICAgICAic2l6ZT02NzEwODg2NCIKICAgICAgICBdLAogICAgICAgICJtb3VudF9wb2ludCI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICB9CiAgICBdCiAgfSwKICAicmVxdWVzdF9kZWZhdWx0cyI6IHsKICAgICJDcmVhdGVDb250YWluZXJSZXF1ZXN0IjogewogICAgICAiYWxsb3dfZW52X3JlZ2V4IjogWwogICAgICAgICJeSE9TVE5BTUU9JChkbnNfbGFiZWwpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQPXRjcDovLyQoaXB2NF9hKTokKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQX1BST1RPPXRjcCQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9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6IGZhbHNlCiAgfQp9 spec: runtimeClassName: kata-cc + securityContext: + runAsUser: 1000 tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists diff --git a/src/agent/samples/policy/yaml/replica-set/replica-busy.yaml b/src/agent/samples/policy/yaml/replica-set/replica-busy.yaml index 82ebd0fcc97c..f06a25722ac6 100644 --- a/src/agent/samples/policy/yaml/replica-set/replica-busy.yaml +++ b/src/agent/samples/policy/yaml/replica-set/replica-busy.yaml @@ -14,9 +14,11 @@ spec: labels: app: replica1 annotations: - io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCmltcG9ydCBpbnB1dAoKIyBEZWZhdWx0IHZhbHVlcywgcmV0dXJuZWQgYnkgT1BBIHdoZW4gcnVsZXMgY2Fubm90IGJlIGV2YWx1YXRlZCB0byB0cnVlLgpkZWZhdWx0IEFkZEFSUE5laWdoYm9yc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBBZGRTd2FwUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENsb3NlU3RkaW5SZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgRGVzdHJveVNhbmRib3hSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBFeGVjUHJvY2Vzc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBHZXRPT01FdmVudFJlcXV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G93X2xpbnV4KHBfb2NpLCBpX29jaSkKCiAgICBwcmludCgiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdDogdHJ1ZSIpCn0KCmFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiA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hdGg6IHRydWUiKQp9CgojIGRldmljZSBtb3VudHMKYWxsb3dfbW91bnQocF9vY2ksIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bn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iA6PSByZXBsYWNlKG1vdW50MSwgIiQoYnVuZGxlLWlkKSIsIGJ1bmRsZV9pZCkKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAyOiBtb3VudDIgPSIsIG1vdW50MikKCiAgICBtb3VudDIgPT0gaV9zdG9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJp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AgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgInNoIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiLAogICAgICAgICAgICAiR0VUX0hPU1RTX0ZST009ZG5zIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJidXN5IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJjb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmltYWdlLW5hbWUiOiAibWNyLm1pY3Jvc29mdC5jb20vYWtzL2UyZS9saWJyYXJ5LWJ1c3lib3g6bWFzdGVyLjIyMDMxNC4xLWxpbnV4LWFtZDY0IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDEpIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMSkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJvdmVybGF5ZnMiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogImZ1c2UzLmthdGEtb3ZlcmxheSIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIjJjMzQyYTEzN2U2OTNjNzg5OGFlYzM2ZGExMDQ3ZjE5MWRjN2MxNjg3ZTY2MTk4YWRhY2M0MzljZjRhZGYzNzk6MjU3MGUzYTE5ZTFiZjIwZGRkYTQ1NDk4YTk2MjdmNjE1NTVkMmQ2YzAxNDc5YjliNzY0NjBiNjc5YjI3ZDU1MiIsCiAgICAgICAgICAgICI4NTY4YzcwYzBjY2ZlMDA1MTA5MmU4MThkYTc2OTExMWE1OTg4MmNkMTlkZDc5OWQzYmNhNWZmYTgyNzkxMDgwOmI2NDNiNjIxNzc0ODk4MzgzMGIyNmFjMTRhMzVhMzMyMmRkNTI4YzAwOTYzZWFhZGQ5MWVmNTVmNTEzZGM3M2YiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9CiAgXSwKICAiY29tbW9uIjogewogICAgImNwYXRoIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NoYXJlZC9jb250YWluZXJzIiwKICAgICJzZnByZWZpeCI6ICJeJChjcGF0aCkvJChidW5kbGUtaWQpLVthLXowLTldezE2fS0iLAogICAgInNwYXRoIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc3RvcmFnZSIsCiAgICAiaXB2NF9hIjogIigoMjVbMC01XXwoMlswLTRdfDFcXGR8WzEtOV18KVxcZClcXC4/XFxiKXs0fSIsCiAgICAiaXBfcCI6ICJbMC05XXsxLDV9IiwKICAgICJzdmNfbmFtZSI6ICJbQS1aMC05X1xcLlxcLV0rIiwKICAgICJkbnNfbGFiZWwiOiAiW2EtekEtWjAtOV9cXC5cXC1dKyIsCiAgICAiZGVmYXVsdF9jYXBzIjogWwogICAgICAiQ0FQX0NIT1dOIiwKICAgICAgIkNBUF9EQUNfT1ZFUlJJREUiLAogICAgICAiQ0FQX0ZTRVRJRCIsCiAgICAgICJDQVBfRk9XTkVSIiwKICAgICAgIkNBUF9NS05PRCIsCiAgICAgICJDQVBfTkVUX1JBVyIsCiAgICAgICJDQVBfU0VUR0lEIiwKICAgICAgIkNBUF9TRVRVSUQiLAogICAgICAiQ0FQX1NFVEZDQVAiLAogICAgICAiQ0FQX1NFVFBDQVAiLAogICAgICAiQ0FQX05FVF9CSU5EX1NFUlZJQ0UiLAogICAgICAiQ0FQX1NZU19DSFJPT1QiLAogICAgICAiQ0FQX0tJTEwiLAogICAgICAiQ0FQX0FVRElUX1dSSVRFIgogICAgXSwKICAgICJwcml2aWxlZ2VkX2NhcHMiOiBbCiAgICAgICJDQVBfQ0hPV04iLAogICAgICAiQ0FQX0RBQ19PVkVSUklERSIsCiAgICAgICJ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ICAgIkNBUF9QRVJGTU9OIiwKICAgICAgIkNBUF9CUEYiLAogICAgICAiQ0FQX0NIRUNLUE9JTlRfUkVTVE9SRSIKICAgIF0sCiAgICAidmlydGlvX2Jsa19zdG9yYWdlX2NsYXNzZXMiOiBbCiAgICAgICJjYy1sb2NhbC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1jc2kiLAogICAgICAiY2MtbWFuYWdlZC1wcmVtaXVtLWNzaSIKICAgIF0sCiAgICAic21iX3N0b3JhZ2VfY2xhc3NlcyI6IFsKICAgICAgImNjLWF6dXJlZmlsZS1jc2kiLAogICAgICAiY2MtYXp1cmVmaWxlLXByZW1pdW0tY3NpIgogICAgXQogIH0sCiAgInNhbmRib3giOiB7CiAgICAic3RvcmFnZXMiOiBbCiAgICAgIHsKICAgICAgICAiZHJpdmVyIjogImVwaGVtZXJhbCIsCiAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgInNvdXJjZSI6ICJzaG0iLAogICAgICAgICJmc3R5cGUiOiAidG1wZnMiLAogICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAibW9kZT0xNzc3IiwKICAgICAgICAgICJzaXplPTY3MTA4ODY0IgogICAgICAgIF0sCiAgICAgICAgIm1vdW50X3BvaW50IjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgIH0KICAgIF0KICB9LAogICJyZXF1ZXN0X2RlZmF1bHRzIjogewogICAgIkNyZWF0ZUNvbnRhaW5lclJlcXVlc3QiOiB7CiAgICAgICJhbGxvd19lbnZfcmVnZXgiOiBbCiAgICAgICAgIl5IT1NUTkFNRT0kKGRuc19sYWJlbCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1A9dGNwOi8vJChpcHY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F0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5ub3RhdGlvbnMuCmFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKSB7CiAgICB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50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0gcmVwbGFjZShyZWdleDEsICIkKHNmcHJlZml4KSIsIHBvbGljeV9kYXRhLm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dlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQ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N3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJvIiwKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJub2V4ZWMiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9zYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJzYW5kYm94IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWlkIjogIl5bYS16MC05XXs2NH0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LWxvZy1kaXJlY3RvcnkiOiAiXi92YXIvbG9nL3BvZHMvJChzYW5kYm94LW5hbWVzcGFjZSlfJChzYW5kYm94LW5hbWUpX1swLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiLAogICAgICAgICAgIm5lcmRjdGwvbmV0d29yay1uYW1lc3BhY2UiOiAiXi92YXIvcnVuL25ldG5zL2NuaS1bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIgogICAgICAgIH0sCiAgICAgICAgIkxpbnV4IjogewogICAgICAgICAgIk5hbWVzcGFjZXMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJpcGMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogInV0cyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAibW91bnQiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfQogICAgICAgICAgXSwKICAgICAgICAgICJNYXNrZWRQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2FjcGkiLAogICAgICAgICAgICAiL3Byb2MvYXNvdW5kIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiLAogICAgICAgICAgICAiL3Byb2Mvc2NzaSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2J1cyIsCiAgICAgICAgICAgICIvcHJvYy9mcyIsCiAgICAgICAgICAgICIvcHJvYy9pcnEiLAogICAgICAgICAgICAiL3Byb2Mvc3lzIiwKICAgICAgICAgICAgIi9wcm9jL3N5c3JxLXRyaWdnZXIiCiAgICAgICAgICBdCiAgICAgICAgfQogICAgICB9LAogICAgICAic3RvcmFnZXMiOiBbCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJibGsiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogInRhciIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIiQoaGFzaDApIgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGxheWVyMCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgImRyaXZlciI6ICJvdmVybGF5ZnMiLAogICAgICAgICAgImRyaXZlcl9vcHRpb25zIjogW10sCiAgICAgICAgICAic291cmNlIjogIiIsCiAgICAgICAgICAiZnN0eXBlIjogImZ1c2UzLmthdGEtb3ZlcmxheSIsCiAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgIjVhNWFhZDgwMDU1ZmYyMDAxMmE1MGRjMjVmOGRmN2EyOTkyNDQ3NDMyNGQ2NWY3ZDUzMDZlZThlZTI3ZmY3MWQiLAogICAgICAgICAgICAiODE3MjUwZjFhM2UzMzZkYTc2ZjViZDNmYTc4NGUxYjI2ZDk1OWI5YzEzMTg3NjgxNWJhMjYwNDA0OGI3MGMxOCIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0sCiAgICB7CiAgICAgICJPQ0kiOiB7CiAgICAgICAgIlZlcnNpb24iOiAiMS4xLjAtcmMuMSIsCiAgICAgICAgIlByb2Nlc3MiOiB7CiAgICAgICAgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMCwKICAgICAgICAgICAgIkdJRCI6IDAsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAic2giCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIiwKICAgICAgICAgICAgIkhPU1ROQU1FPSQoaG9zdC1uYW1lKSIsCiAgICAgICAgICAgICJHRVRfSE9TVFNfRlJPTT1kbnMiCiAgICAgICAgICBdLAogICAgICAgICAgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzL2ZzL2Nncm91cCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiY2dyb3VwIiwKICAgICAgICAgICAgInR5cGVfIjogImNncm91cCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJlbGF0aW1lIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RzJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvdGVybWluYXRpb24tbG9nIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRlcm1pbmF0aW9uLWxvZyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RuYW1lIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RuYW1lJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9rdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50IiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXNlcnZpY2VhY2NvdW50JCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRva2VucyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9jb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci1uYW1lIjogImJ1c3kiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogImNvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuaW1hZ2UtbmFtZSI6ICJtY3IubWljcm9zb2Z0LmNvbS9ha3MvZTJlL2xpYnJhcnktYnVzeWJveDptYXN0ZXIuMjIwMzE0LjEtbGludXgtYW1kNjQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMSkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIxKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiMmMzNDJhMTM3ZTY5M2M3ODk4YWVjMzZkYTEwNDdmMTkxZGM3YzE2ODdlNjYxOThhZGFjYzQzOWNmNGFkZjM3OToyNTcwZTNhMTllMWJmMjBkZGRhNDU0OThhOTYyN2Y2MTU1NWQyZDZjMDE0NzliOWI3NjQ2MGI2NzliMjdkNTUyIiwKICAgICAgICAgICAgIjg1NjhjNzBjMGNjZmUwMDUxMDkyZTgxOGRhNzY5MTExYTU5ODgyY2QxOWRkNzk5ZDNiY2E1ZmZhODI3OTEwODA6YjY0M2I2MjE3NzQ4OTgzODMwYjI2YWMxNGEzNWEzMzIyZGQ1MjhjMDA5NjNlYWFkZDkxZWY1NWY1MTNkYzczZiIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJzYW5kYm94X3BpZG5zIjogZmFsc2UsCiAgICAgICJleGVjX2NvbW1hbmRzIjogW10KICAgIH0KICBdLAogICJjb21tb24iOiB7CiAgICAiY3BhdGgiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2hhcmVkL2NvbnRhaW5lcnMiLAogICA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5hZ2VkLXByZW1pdW0tY3NpIgogICAgXSwKICAgICJzbWJfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtYXp1cmVmaWxlLWNzaSIsCiAgICAgICJjYy1henVyZWZpbGUtcHJlbWl1bS1jc2kiCiAgICBdCiAgfSwKICAic2FuZGJveCI6IHsKICAgICJzdG9yYWdlcyI6IFsKICAgICAgewogICAgICAgICJkcml2ZXIiOiAiZXBoZW1lcmFsIiwKICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAic291cmNlIjogInNobSIsCiAgICAgICAgImZzdHlwZSI6ICJ0bXBmcyIsCiAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICJtb2RlPTE3NzciLAogICAgICAgICAgInNpemU9NjcxMDg4NjQiCiAgICAgICAgXSwKICAgICAgICAibW91bnRfcG9pbnQiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgfQogICAgXQogIH0sCiAgInJlcXVlc3RfZGVmYXVsdHMiOiB7CiAgICAiQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCI6IHsKICAgICAgImFsbG93X2Vudl9yZWdleCI6IFsKICAgICAgICAiXkhPU1ROQU1FPSQoZG5zX2xhYmVsKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUD10Y3A6Ly8kKGlwdjRfYSk6JChpcF9wKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUF9QUk9UTz10Y3AkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1BfUE9SVD0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQX0FERFI9JChpcHY0X2EpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX0hPU1Q9JChpcHY0X2EpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX1BPUlQ9JChpcF9wKSQiLAogICAgICAgICJeJChzdmNfbmFtZSlfU0VSVklDRV9QT1JUXyQoZG5zX2xhYmVsKT0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUPXRjcDovLyQoaXB2NF9hKTokKGlwX3ApJCIsCiAgICAgICAgIl5BWlVSRV9DTElFTlRfSUQ9W0EtRmEtZjAtOS1dKiQiLAogICAgICAgICJeQVpVUkVfVEVOQU5UX0lEPVtBLUZhLWYwLTktXSokIiwKICAgICAgICAiXkFaVVJFX0ZFREVSQVRFRF9UT0tFTl9GSUxFPS92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zL2F6dXJlLWlkZW50aXR5LXRva2VuJCIsCiAgICAgICAgIl5BWlVSRV9BVVRIT1JJVFlfSE9TVD1odHRwczovL2xvZ2luXFwubWljcm9zb2Z0b25saW5lXFwuY29tLyQiCiAgICAgIF0KICAgIH0sCiAgICAiQ29weUZpbGVSZXF1ZXN0IjogWwogICAgICAiJChzZnByZWZpeCkiCiAgICBdLAogICAgIkV4ZWNQcm9jZXNzUmVxdWVzdCI6IHsKICAgICAgImNvbW1hbmRzIjogW10sCiAgICAgICJyZWdleCI6IFtdCiAgICB9LAogICAgIkNsb3NlU3RkaW5SZXF1ZXN0IjogZmFsc2UsCiAgICAiUmVhZFN0cmVhbVJlcXVlc3QiOiB0cnVlLAogICAgIlVwZGF0ZUVwaGVtZXJhbE1vdW50c1JlcXVlc3QiOiBmYWxzZSwKICAgICJXcml0ZVN0cmVhbVJlcXVlc3QiOiBmYWxzZQogIH0KfQ== spec: runtimeClassName: kata-cc + securityContext: + runAsUser: 0 containers: - name: busy image: "mcr.microsoft.com/aks/e2e/library-busybox:master.220314.1-linux-amd64" diff --git a/src/agent/samples/policy/yaml/stateful-set/web.yaml b/src/agent/samples/policy/yaml/stateful-set/web.yaml index 1b80438ad03a..44a3013c583a 100644 --- a/src/agent/samples/policy/yaml/stateful-set/web.yaml +++ b/src/agent/samples/policy/yaml/stateful-set/web.yaml @@ -29,7 +29,7 @@ spec: labels: app: nginx annotations: - io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCmltcG9ydCBpbnB1dAoKIyBEZWZhdWx0IHZhbHVlcywgcmV0dXJuZWQgYnkgT1BBIHdoZW4gcnVsZXMgY2Fubm90IGJlIGV2YWx1YXRlZCB0byB0cnVlLgpkZWZhdWx0IEFkZEFSUE5laWdoYm9yc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBBZGRTd2FwUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENsb3NlU3RkaW5SZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgRGVzdHJveVNhbmRib3hSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBFeGVjUHJvY2Vzc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBHZXRPT01FdmVudFJlcXVlc3QgOj0gdHJ1ZQpkZWZhdWx0IEd1ZXN0RGV0YWlsc1JlcXVlc3QgOj0gdHJ1ZQpkZWZhdWx0IExpc3RJbnRlcmZhY2V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NyZWF0ZV9jb250YWluZXJfaW5wdXQgewogICAgcHJpbnQoImFsbG93X2NyZWF0ZV9jb250YWluZXJfaW5wdXQ6IGlucHV0ID0iLCBpbnB1dCkKCiAgICBjb3VudChpbnB1dC5zaGFyZWRfbW91bnRzKSA9PSAwCiAgICBpc19udWxsKGlucHV0LnN0cmluZ191c2VyKQoKICAgIGlfb2NpIDo9IGlucHV0Lk9DSQogICAgaXNfbnVsbChpX29jaS5Ib29rcykKICAgIGlzX251bGwoaV9vY2kuU29sYXJpcykKICAgIGlzX251bGwoaV9vY2kuV2luZG93cykKCiAgICBpX2xpbnV4IDo9IGlfb2NpLkxpbnV4CiAgICBjb3VudChpX2xpbnV4LkdJRE1hcHBpbmdzKSA9PSAwCiAgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5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pZCkgewogICAgcHJpbnQoImFsbG93X21vdW50OiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHNvbWUgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIHByaW50KCJhbGxvd19tb3VudDogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0g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OiBtb3VudDIgPSIsIG1vdW50MikKCiAgICBtb3VudDIgPT0gaV9zdG9yYWdlLm1vdW50X3BvaW50CgogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDI6IHRydWUiKQp9CmFsbG93X21vdW50X3BvaW50KHBfc3RvcmFnZSwgaV9zdG9yYWdlLCBidW5kbGVfaWQsIHNhbmRib3hfaWQsIGxheWVyX2lkcykgewogICAgcF9zdG9yYWdlLmZzdHlwZSA9PSAibG9jYWwiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MiA9IiwgbW91bnQyKQoKICAgIG1vdW50MyA6PSByZXBsYWNlKG1vdW50MiwgIiQoc2FuZGJveC1pZCkiLCBzYW5kYm94X2lkKQogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDM6IG1vdW50MyA9IiwgbW91bnQzKQoKICAgIHJlZ2V4Lm1hdGNoKG1vdW50MywgaV9zdG9yYWdlLm1vdW50X3BvaW50KQoKICAgIHByaW50KCJhbGxvd19tb3VudF9wb2ludCAzOiB0cnVlIikKfQphbGxvd19tb3VudF9wb2ludChwX3N0b3JhZ2UsIGlfc3RvcmFnZSwgYnVuZGxlX2lkLCBzYW5kYm94X2lkLCBsYXllcl9pZHMpIHsKICAgIHBfc3RvcmFnZS5mc3R5cGUgPT0gImJpbmQiCgogICAgbW91bnQxIDo9IHBfc3RvcmFnZS5tb3VudF9wb2ludAogICAgcHJpbnQoImFsbG93X21vdW50X3BvaW50IDQ6IG1vdW50MSA9IiwgbW91bnQxKQoKICAgIG1vdW50MiA6PSByZXBsYWNlKG1vdW50MSwgIiQoY3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Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDAsCiAgICAgICAgICAgICJHSUQiOiAwLAogICAgICAgICAgICAiQWRkaXRpb25hbEdpZHMiOiBbXSwKICAgICAgICAgICAgIlVzZXJuYW1lIjogIiIKICAgICAgICAgIH0sCiAgICAgICAgICAiQXJncyI6IFsKICAgICAgICAgICAgIi9iaW4vc2giLAogICAgICAgICAgICAiLWMiLAogICAgICAgICAgICAid2hpbGUgdHJ1ZTsgZG8gZWNobyAkKHNhbmRib3gtbmFtZSk7IHNsZWVwIDEwOyBkb25lIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIsCiAgICAgICAgICAgICJIT1NUTkFNRT0kKGhvc3QtbmFtZSkiLAogICAgICAgICAgICAiTUVUQV9OQU1FPSQoc2FuZGJveC1uYW1lKSIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIlJvb3QiOiB7CiAgICAgICAgICAiUGF0aCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgIlJlYWRvbmx5IjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMvZnMvY2dyb3VwIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJjZ3JvdXAiLAogICAgICAgICAgICAidHlwZV8iOiAiY2dyb3VwIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicmVsYXRpbWUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdHMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdHMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi90ZXJtaW5hdGlvbi1sb2ciLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdGVybWluYXRpb24tbG9nJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvaG9zdG5hbWUiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaG9zdG5hbWUkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9yZXNvbHYuY29uZiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClyZXNvbHYuY29uZiQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2t1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpc2VydmljZWFjY291bnQkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpdG9rZW5zJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi91c3Ivc2hhcmUvbmdpbngvaHRtbCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClodG1sJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX2NvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiOiAibmdpbngiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogImNvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuaW1hZ2UtbmFtZSI6ICJtY3IubWljcm9zb2Z0LmNvbS9henVyZWxpbnV4L2Jhc2Uvbmdpbng6MS4yNSIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gxKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjEpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gyKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjIpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gzKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjMpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2g0KSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjQpIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICJjZjVmMjZkNzBjNWM3MzQ0MzUzYWRlNGUwNmYyMDI2MTYzMjFlZmRlYmQxMjFjYjVjNTVhYWY1NzM4NDY3MzQ2OmRkMGRlNjc4ZDQyMzk0MDU0YTQyODU3ZDJlYTc3MTBlMWM2ZGMwNmRiMjg1MDE0OGNlOThlNGU3MjBiMTgzMGE6YTFkNzc3NzRjMTk3YmM3ZTBmN2UwMzBjZDE1YzMwMjdiMjY4MWI1MzdmMGIyYWU0NzUzZWZjYmI5MWY1MDhmNDo2ZTY3MzNiYWNjNTdiNWJkZDNmOGZh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S1wcmVtaXVtLWNzaSIKICAgIF0KICB9LAogICJzYW5kYm94IjogewogICAgInN0b3JhZ2VzIjogWwogICAgICB7CiAgICAgICAgImRyaXZlciI6ICJlcGhlbWVyYWwiLAogICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICJzb3VyY2UiOiAic2htIiwKICAgICAgICAiZnN0eXBlIjogInRtcGZzIiwKICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgIm1vZGU9MTc3NyIsCiAgICAgICAgICAic2l6ZT02NzEwODg2NCIKICAgICAgICBdLAogICAgICAgICJtb3VudF9wb2ludCI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICB9CiAgICBdCiAgfSwKICAicmVxdWVzdF9kZWZhdWx0cyI6IHsKICAgICJDcmVhdGVDb250YWluZXJSZXF1ZXN0IjogewogICAgICAiYWxsb3dfZW52X3JlZ2V4IjogWwogICAgICAgICJeSE9TVE5BTUU9JChkbnNfbGFiZWwpJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQPXRjcDovLyQoaXB2NF9hKTokKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9QT1JUXyQoaXBfcClfVENQX1BST1RPPXRjcCQiLAogICAgICAgICJeJChzdmNfbmFtZSlfUE9SVF8kKGlwX3ApX1RDUF9QT1JUPSQoaXBfcCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlRfJChpcF9wKV9UQ1BfQUREUj0kKGlwdjRfYSkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1NFUlZJQ0VfSE9TVD0kKGlwdjRfYSkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1NFUlZJQ0VfUE9SVD0kKGlwX3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AgICBjb3VudChpX2xpbnV4Lk1vdW50TGFiZWwpID09IDAKICAgIGNvdW50KGlfbGludXguUmVzb3VyY2VzLkRldmljZXMpID09IDAKICAgIGNvdW50KGlfbGludXguUm9vdGZzUHJvcGFnYXRpb24pID09IDAKICAgIGNvdW50KGlfbGludXguVUlETWFwcGluZ3MpID09IDAKICAgIGlzX251bGwoaV9saW51eC5JbnRlbFJkdCkKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuQmxvY2tJTykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuTmV0d29yaykKICAgIGlzX251bGwoaV9saW51eC5SZXNvdXJjZXMuUGlkcykKICAgIGlzX251bGwoaV9saW51eC5TZWNjb21wKQogICAgaV9saW51eC5TeXNjdGwgPT0ge30KCiAgICBpX3Byb2Nlc3MgOj0gaV9vY2kuUHJvY2VzcwogICAgY291bnQoaV9wcm9jZXNzLlNlbGludXhMYWJlbCkgPT0gMAogICAgY291bnQoaV9wcm9jZXNzLlVzZXIuVXNlcm5hbWUpID09IDAKCiAgICBwcmludCgiYWxsb3dfY3JlYXRlX2NvbnRhaW5lcl9pbnB1dDogdHJ1ZSIpCn0KCiMgUmVqZWN0IHVuZXhwZWN0ZWQgYW5ub3RhdGlvbnMuCmFsbG93X2Fubm8ocF9vY2ksIGlfb2NpKSB7CiAgICBwcmludCgiYWxsb3dfYW5ubyAxOiBzdGFydCIpCgogICAgbm90IGlfb2NpLkFubm90YXRpb25zCgogICAgcHJpbnQoImFsbG93X2Fubm8gMTogdHJ1ZSIpCn0KYWxsb3dfYW5ubyhwX29jaSwgaV9vY2kpIHsKICAgIHByaW50KCJhbGxvd19hbm5vIDI6IHAgQW5ub3RhdGlvbnMgPSIsIHBfb2NpLkFubm90YXRpb25zKQogICAgcHJpbnQoImFsbG93X2Fubm8gMjogaSBBbm5vdGF0aW9ucyA9IiwgaV9vY2kuQW5ub3RhdGlvbnMpCgogICAgaV9rZXlzIDo9IG9iamVjdC5rZXlzKG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YXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwX21vdW50ID09IGlfbW91bnQKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgogICAgcF9tb3VudC50eXBlXyA9PSBpX21vdW50LnR5cGVfCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vdW50IDI6IHRydWUiKQp9Cgptb3VudF9zb3VyY2VfYWxsb3dzKHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkgewogICAgcmVnZXgxIDo9IHBfbW91bnQuc291cmNlCiAgICByZWdleDIgOj0gcmVwbGFjZShyZWdleDEsICIkKHNmcHJlZml4KSIsIHBvbGljeV9kYXRhLmNvbW1vbi5zZnByZWZpeCkKICAgIHJlZ2V4MyA6PSByZXBsYWNlKHJlZ2V4MiwgIiQoY3BhdGgpIiwgcG9saWN5X2RhdGEuY29tbW9uLmNwYXRoKQogICAgcmVnZXg0IDo9IHJlcGxhY2UocmVnZXgzLCAiJChidW5kbGUtaWQpIiwgYnVuZGxlX2lkKQoKICAgIHByaW50KCJtb3VudF9zb3VyY2VfYWxsb3dzIDE6IHJlZ2V4NCA9IiwgcmVnZXg0KQogICAgcmVnZXgubWF0Y2gocmVnZXg0LCBpX21vdW50LnNvdXJjZSkKCiAgICBwcmludCgibW91bnRfc291cmNlX2FsbG93c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ZUVwaGVtZXJhbE1vdW50c1JlcXVlc3QgPT0gdHJ1ZQp9CgpXcml0ZVN0cmVhbVJlcXVlc3QgewogICAgcG9saWN5X2RhdGEucmVxdWVzdF9kZWZhdWx0cy5Xcml0ZVN0cmVhbVJlcXVlc3QgPT0gdHJ1ZQp9Cgpwb2xpY3lfZGF0YSA6PSB7CiAgImNvbnRhaW5lcnMiOiBbCiAgICB7CiAgICAgICJPQ0kiOiB7CiAgICAgICAgIlZlcnNpb24iOiAiMS4xLjAtcmMuMSIsCiAgICAgICAgIlByb2Nlc3MiOiB7CiAgICAgICAgICAiVGVybWluYWwiOiBmYWxzZSwKICAgICAgICAgICJVc2VyIjogewogICAgICAgICAgICAiVUlEIjogMjIyMjIsCiAgICAgICAgICAgICJHSUQiOiA2NTUzNSwKICAgICAgICAgICAgIkFkZGl0aW9uYWxHaWRzIjogW10sCiAgICAgICAgICAgICJVc2VybmFtZSI6ICIiCiAgICAgICAgICB9LAogICAgICAgICAgIkFyZ3MiOiBbCiAgICAgICAgICAgICIvcGF1c2UiCiAgICAgICAgICBdLAogICAgICAgICAgIkVudiI6IFsKICAgICAgICAgICAgIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IHRydWUKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IHRydWUKICAgICAgICB9LAogICAgICAgICJNb3VudHMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvcHJvYyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAicHJvYyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJwcm9jIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2RldiIsCiAgICAgICAgICAgICJzb3VyY2UiOiAidG1wZnMiLAogICAgICAgICAgICAidHlwZV8iOiAidG1wZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAic3RyaWN0YXRpbWUiLAogICAgICAgICAgICAgICJtb2RlPTc1NSIsCiAgICAgICAgICAgICAgInNpemU9NjU1MzZrIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9wdHMiLAogICAgICAgICAgICAic291cmNlIjogImRldnB0cyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJkZXZwdHMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibmV3aW5zdGFuY2UiLAogICAgICAgICAgICAgICJwdG14bW9kZT0wNjY2IiwKICAgICAgICAgICAgICAibW9kZT0wNjIwIiwKICAgICAgICAgICAgICAiZ2lkPTUiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3NobSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvbXF1ZXVlIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJtcXVldWUiLAogICAgICAgICAgICAidHlwZV8iOiAibXF1ZXVlIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAic3lzZnMiLAogICAgICAgICAgICAidHlwZV8iOiAic3lzZnMiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJybyIsCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAibm9leGVjIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2Rfc2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLXR5cGUiOiAic2FuZGJveCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1sb2ctZGlyZWN0b3J5IjogIl4vdmFyL2xvZy9wb2RzLyQoc2FuZGJveC1uYW1lc3BhY2UpXyQoc2FuZGJveC1uYW1lKV9bMC05YS1mXXs4fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXs0fS1bMC05YS1mXXsxMn0kIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5zYW5kYm94LW5hbWVzcGFjZSI6ICJkZWZhdWx0IiwKICAgICAgICAgICJuZXJkY3RsL25ldHdvcmstbmFtZXNwYWNlIjogIl4vdmFyL3J1bi9uZXRucy9jbmktWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvc3lzL2Zpcm13YXJlIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICI1YTVhYWQ4MDA1NWZmMjAwMTJhNTBkYzI1ZjhkZjdhMjk5MjQ0NzQzMjRkNjVmN2Q1MzA2ZWU4ZWUyN2ZmNzFkIiwKICAgICAgICAgICAgIjgxNzI1MGYxYTNlMzM2ZGE3NmY1YmQzZmE3ODRlMWIyNmQ5NTliOWMxMzE4NzY4MTViYTI2MDQwNDhiNzBjMTgiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAic2FuZGJveF9waWRucyI6IGZhbHNlLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9LAogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDIyMjIyLAogICAgICAgICAgICAiR0lEIjogMCwKICAgICAgICAgICAgIkFkZGl0aW9uYWxHaWRzIjogW10sCiAgICAgICAgICAgICJVc2VybmFtZSI6ICIiCiAgICAgICAgICB9LAogICAgICAgICAgIkFyZ3MiOiBbCiAgICAgICAgICAgICIvYmluL3NoIiwKICAgICAgICAgICAgIi1jIiwKICAgICAgICAgICAgIndoaWxlIHRydWU7IGRvIGVjaG8gJChzYW5kYm94LW5hbWUpOyBzbGVlcCAxMDsgZG9uZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiRW52IjogWwogICAgICAgICAgICAiUEFUSD0vdXNyL2xvY2FsL3NiaW46L3Vzci9sb2NhbC9iaW46L3Vzci9zYmluOi91c3IvYmluOi9zYmluOi9iaW4iLAogICAgICAgICAgICAiSE9TVE5BTUU9JChob3N0LW5hbWUpIiwKICAgICAgICAgICAgIk1FVEFfTkFNRT0kKHNhbmRib3gtbmFtZSkiCiAgICAgICAgICBdLAogICAgICAgICAgIkN3ZCI6ICIvIiwKICAgICAgICAgICJDYXBhYmlsaXRpZXMiOiB7CiAgICAgICAgICAgICJBbWJpZW50IjogW10sCiAgICAgICAgICAgICJCb3VuZGluZyI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiRWZmZWN0aXZlIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJJbmhlcml0YWJsZSI6IFtdLAogICAgICAgICAgICAiUGVybWl0dGVkIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICAiTm9OZXdQcml2aWxlZ2VzIjogZmFsc2UKICAgICAgICB9LAogICAgICAgICJSb290IjogewogICAgICAgICAgIlBhdGgiOiAiJChjcGF0aCkvJChidW5kbGUtaWQpIiwKICAgICAgICAgICJSZWFkb25seSI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzL2ZzL2Nncm91cCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiY2dyb3VwIiwKICAgICAgICAgICAgInR5cGVfIjogImNncm91cCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJlbGF0aW1lIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RzJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvdGVybWluYXRpb24tbG9nIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRlcm1pbmF0aW9uLWxvZyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL2hvc3RuYW1lIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KWhvc3RuYW1lJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9ldGMvcmVzb2x2LmNvbmYiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpcmVzb2x2LmNvbmYkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Zhci9ydW4vc2VjcmV0cy9rdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50IiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXNlcnZpY2VhY2NvdW50JCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJybyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMvYXp1cmUvdG9rZW5zIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXRva2VucyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdXNyL3NoYXJlL25naW54L2h0bWwiLAogICAgICAgICAgICAic291cmNlIjogIiQoc2ZwcmVmaXgpaHRtbCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJBbm5vdGF0aW9ucyI6IHsKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmJ1bmRsZV9wYXRoIjogIi9ydW4vY29udGFpbmVyZC9pby5jb250YWluZXJkLnJ1bnRpbWUudjIudGFzay9rOHMuaW8vJChidW5kbGUtaWQpIiwKICAgICAgICAgICJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIjogInBvZF9jb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci1uYW1lIjogIm5naW54IiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItdHlwZSI6ICJjb250YWluZXIiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmltYWdlLW5hbWUiOiAibWNyLm1pY3Jvc29mdC5jb20vYXp1cmVsaW51eC9iYXNlL25naW54OjEuMjUiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbmFtZXNwYWNlIjogImRlZmF1bHQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9rY29yZSIsCiAgICAgICAgICAgICIvcHJvYy9rZXlzIiwKICAgICAgICAgICAgIi9wcm9jL2xhdGVuY3lfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfbGlzdCIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy9zY2hlZF9kZWJ1ZyIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIiwKICAgICAgICAgICAgIi9zeXMvZmlybXdhcmUiCiAgICAgICAgICBdLAogICAgICAgICAgIlJlYWRvbmx5UGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMSkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIxKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMikiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIyKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMykiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIzKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoNCkiCiAgICAgICAgICBd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gICJDQVBfU0VURkNBUCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTkVUX0JJTkRfU0VSVklDRSIsCiAgICAgICJDQVBfU1lTX0NIUk9PVCIsCiAgICAgICJDQVBfS0lMTCIsCiAgICAgICJDQVBfQVVESVRfV1JJVEUiCiAgICBdLAogICAgInByaXZpbGVnZWRfY2FwcyI6IFsKICAgICAgIkNBUF9DSE9XTiIsCiAgICAgICJDQVBfREFDX09WRVJSSURFIiwKICAgICAgIkNBUF9EQUNfUkVBRF9TRUFSQ0giLAogICAgICAiQ0FQX0ZPV05FUiIsCiAgICAgICJDQVBfRlNFVElEIiwKICAgICAgIkNBUF9LSUxMIiwKICAgICAgIkNBUF9TRVRHSUQiLAogICAgICAiQ0FQX1NFVFVJRCIsCiAgICAgICJDQVBfU0VUUENBUCIsCiAgICAgICJDQVBfTElOVVhfSU1NVVRBQkxFIiwKICAgICAgIkNBUF9ORVRfQklORF9TRVJWSUNFIiwKICAgICAgIkNBUF9ORVRfQlJPQURDQVNUIiwKICAgICAgIkNBUF9ORVRfQURNSU4iLAogICAgICAiQ0FQX05FVF9SQVciLAogICAgICAiQ0FQX0lQQ19MT0NLIiwKICAgICAgIkNBUF9JUENfT1dORVIiLAogICAgICAiQ0FQX1NZU19NT0RVTEUiLAogICAgICAiQ0FQX1NZU19SQVdJTyIsCiAgICAgICJDQVBfU1lTX0NIUk9PVCIsCiAgICAgICJDQVBfU1lTX1BUUkFDRSIsCiAgICAgICJDQVBfU1lTX1BBQ0NUIiwKICAgICAgIkNBUF9TWVNfQURNSU4iLAogICAgICAiQ0FQX1NZU19CT09UIiwKICAgICAgIkNBUF9TWVNfTklDRSIsCiAgICAgICJDQVBfU1lTX1JFU09VUkNFIiwKICAgICAgIkNBUF9TWVNfVElNRSIsCiAgICAgICJDQVBfU1lTX1RUWV9DT05GSUciLAogICAgICAiQ0FQX01LTk9EIiwKICAgICAgIkNBUF9MRUFTRSIsCiAgICAgICJDQVBfQVVESVRfV1JJVEUiLAogICAgICAiQ0FQX0FVRElUX0NPTlRST0wiLAogICAgICAiQ0FQX1NFVEZDQVAiLAogICAgICAiQ0FQX01BQ19PVkVSUklERSIsCiAgICAgICJDQVBfTUFDX0FETUlOIiwKICAgICAgIkNBUF9TWVNMT0ciLAogICAgICAiQ0FQX1dBS0VfQUxBUk0iLAogICAgICAiQ0FQX0JMT0NLX1NVU1BFTkQiLAogICAgICAiQ0FQX0FVRElUX1JFQUQiLAogICAgICAiQ0FQX1BFUkZNT04iLAogICAgICAiQ0FQX0JQRiIsCiAgICAgICJDQVBfQ0hFQ0tQT0lOVF9SRVNUT1JFIgogICAgXSwKICAgICJ2aXJ0aW9fYmxrX3N0b3JhZ2VfY2xhc3NlcyI6IFsKICAgICAgImNjLWxvY2FsLWNzaSIsCiAgICAgICJjYy1tYW5hZ2VkLWNzaSIsCiAgICAgICJjYy1tYW5hZ2VkLXByZW1pdW0tY3NpIgogICAgXSwKICAgICJzbWJfc3RvcmFnZV9jbGFzc2VzIjogWwogICAgICAiY2MtYXp1cmVmaWxlLWNzaSIsCiAgICAgICJjYy1henVyZWZpbGUtcHJlbWl1bS1jc2kiCiAgICBdCiAgfSwKICAic2FuZGJveCI6IHsKICAgICJzdG9yYWdlcyI6IFsKICAgICAgewogICAgICAgICJkcml2ZXIiOiAiZXBoZW1lcmFsIiwKICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAic291cmNlIjogInNobSIsCiAgICAgICAgImZzdHlwZSI6ICJ0bXBmcyIsCiAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICJtb2RlPTE3NzciLAogICAgICAgICAgInNpemU9NjcxMDg4NjQiCiAgICAgICAgXSwKICAgICAgICAibW91bnRfcG9pbnQiOiAiL3J1bi9rYXRhLWNvbnRhaW5lcnMvc2FuZGJveC9zaG0iLA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ljcm9zb2Z0b25saW5lXFwuY29tLyQiCiAgICAgIF0KICAgIH0sCiAgICAiQ29weUZpbGVSZXF1ZXN0IjogWwogICAgICAiJChzZnByZWZpeCkiCiAgICBdLAogICAgIkV4ZWNQcm9jZXNzUmVxdWVzdCI6IHsKICAgICAgImNvbW1hbmRzIjogW10sCiAgICAgICJyZWdleCI6IFtdCiAgICB9LAogICAgIkNsb3NlU3RkaW5SZXF1ZXN0IjogZmFsc2UsCiAgICAiUmVhZFN0cmVhbVJlcXVlc3QiOiB0cnVlLAogICAgIlVwZGF0ZUVwaGVtZXJhbE1vdW50c1JlcXVlc3QiOiBmYWxzZSwKICAgICJXcml0ZVN0cmVhbVJlcXVlc3QiOiBmYWxzZQogIH0KfQ== spec: runtimeClassName: kata-cc affinity: @@ -42,6 +42,8 @@ spec: values: - foo topologyKey: kubernetes.io/hostname + securityContext: + runAsUser: 22222 containers: - name: nginx image: "mcr.microsoft.com/azurelinux/base/nginx:1.25" diff --git a/src/tools/genpolicy/src/daemon_set.rs b/src/tools/genpolicy/src/daemon_set.rs index 5b18d96d9415..65c5db08beed 100644 --- a/src/tools/genpolicy/src/daemon_set.rs +++ b/src/tools/genpolicy/src/daemon_set.rs @@ -143,4 +143,8 @@ impl yaml::K8sResource for DaemonSet { } false } + + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } diff --git a/src/tools/genpolicy/src/deployment.rs b/src/tools/genpolicy/src/deployment.rs index f1b8e8d80f49..be2ffd647455 100644 --- a/src/tools/genpolicy/src/deployment.rs +++ b/src/tools/genpolicy/src/deployment.rs @@ -141,4 +141,8 @@ impl yaml::K8sResource for Deployment { } false } + + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } diff --git a/src/tools/genpolicy/src/job.rs b/src/tools/genpolicy/src/job.rs index ebe4cc871ff7..b48d4480346b 100644 --- a/src/tools/genpolicy/src/job.rs +++ b/src/tools/genpolicy/src/job.rs @@ -115,4 +115,8 @@ impl yaml::K8sResource for Job { } false } + + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } diff --git a/src/tools/genpolicy/src/pod.rs b/src/tools/genpolicy/src/pod.rs index 2ea8fdb9be84..16d633aa2b29 100644 --- a/src/tools/genpolicy/src/pod.rs +++ b/src/tools/genpolicy/src/pod.rs @@ -95,7 +95,7 @@ pub struct PodSpec { topologySpreadConstraints: Option>, #[serde(skip_serializing_if = "Option::is_none")] - securityContext: Option, + pub securityContext: Option, #[serde(skip_serializing_if = "Option::is_none")] priorityClassName: Option, @@ -310,9 +310,9 @@ struct SeccompProfile { /// See Reference / Kubernetes API / Workload Resources / Pod. #[derive(Clone, Debug, Serialize, Deserialize)] -struct PodSecurityContext { +pub struct PodSecurityContext { #[serde(skip_serializing_if = "Option::is_none")] - runAsUser: Option, + pub runAsUser: Option, // TODO: additional fields. } @@ -880,11 +880,7 @@ impl yaml::K8sResource for Pod { } fn get_process_fields(&self, process: &mut policy::KataProcess) { - if let Some(context) = &self.spec.securityContext { - if let Some(uid) = context.runAsUser { - process.User.UID = uid.try_into().unwrap(); - } - } + yaml::get_process_fields(process, &self.spec.securityContext); } } diff --git a/src/tools/genpolicy/src/replica_set.rs b/src/tools/genpolicy/src/replica_set.rs index 094daf1da4cf..12e515ad8203 100644 --- a/src/tools/genpolicy/src/replica_set.rs +++ b/src/tools/genpolicy/src/replica_set.rs @@ -113,4 +113,8 @@ impl yaml::K8sResource for ReplicaSet { } false } + + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } diff --git a/src/tools/genpolicy/src/replication_controller.rs b/src/tools/genpolicy/src/replication_controller.rs index 55788a45c2e0..e6279fbac5c4 100644 --- a/src/tools/genpolicy/src/replication_controller.rs +++ b/src/tools/genpolicy/src/replication_controller.rs @@ -115,4 +115,8 @@ impl yaml::K8sResource for ReplicationController { } false } + + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } diff --git a/src/tools/genpolicy/src/stateful_set.rs b/src/tools/genpolicy/src/stateful_set.rs index 4c55f59ec3e8..f5f9fe5bdbb9 100644 --- a/src/tools/genpolicy/src/stateful_set.rs +++ b/src/tools/genpolicy/src/stateful_set.rs @@ -194,6 +194,9 @@ impl yaml::K8sResource for StatefulSet { } false } + fn get_process_fields(&self, process: &mut policy::KataProcess) { + yaml::get_process_fields(process, &self.spec.template.spec.securityContext); + } } impl StatefulSet { diff --git a/src/tools/genpolicy/src/yaml.rs b/src/tools/genpolicy/src/yaml.rs index 378374dbf249..105bd8628b86 100644 --- a/src/tools/genpolicy/src/yaml.rs +++ b/src/tools/genpolicy/src/yaml.rs @@ -73,8 +73,8 @@ pub trait K8sResource { fn use_host_network(&self) -> bool; fn use_sandbox_pidns(&self) -> bool; fn get_process_fields(&self, _process: &mut policy::KataProcess) { - // Just Pods can have a PodSecurityContext field, so the other - // resources can use this default get_process_fields implementation. + // No need to implement support for securityContext or similar fields + // for some of the K8s resource types. } } @@ -339,3 +339,14 @@ fn handle_unused_field(path: &str, silent_unsupported_fields: bool) { panic!("Unsupported field: {}", path); } } + +pub fn get_process_fields( + process: &mut policy::KataProcess, + security_context: &Option, +) { + if let Some(context) = security_context { + if let Some(uid) = context.runAsUser { + process.User.UID = uid.try_into().unwrap(); + } + } +}