From 963f30c20934d259cf610c2abd3c617cb5d5f572 Mon Sep 17 00:00:00 2001 From: Joy Wang <108701016+joyqvq@users.noreply.github.com> Date: Sat, 25 May 2024 07:35:49 +0800 Subject: [PATCH] feat: add more providers to devnet (#17759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description this added 4 new providers to devnet (aws test tenant, this will not move beyond devnet, main purpose is to serve as a AWS Cognito an example, Microsoft, Credenza3, KarrierOne) also fixes couple keytool ergo to simplify testing for zklogin vs multisig/zklogin depends on: https://github.com/MystenLabs/fastcrypto/pull/737 ## Test plan tested end to end with prover-dev (currently missing karrier one till they exposes a testing redirect url) ``` ==== aws "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_LPSLCkC3A ==== target/debug/sui keytool zk-login-enter-token --parsed-token eyJraWQiOiJrRjRGZU40emQ2Vk5ZREFkeERGYTRcL3FqcWpNS29vbnJ5WVp1S1RONzZkRT0iLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoibE9ta012RXQzZ0RTcEx2Q0FOUlJzdyIsInN1YiI6ImI0NzgxNDM4LWIwNjEtNzA5ZS1iNzRkLWQ4NDU5Yzg0M2NhNCIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV9MUFNMQ2tDM0EiLCJjb2duaXRvOnVzZXJuYW1lIjoiYjQ3ODE0MzgtYjA2MS03MDllLWI3NGQtZDg0NTljODQzY2E0Iiwibm9uY2UiOiJoVFBwZ0Y3WEFLYlczN3JFVVM2cEVWWnFtb0kiLCJhdWQiOiI2YzU2dDdyZTZla2dtdjIzbzd0bzhyMHNpYyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNzE1ODAwMzAyLCJleHAiOjE3MTU4MDM5MDIsImlhdCI6MTcxNTgwMDMwMiwianRpIjoiZWJiMmNkMzEtNjEwYS00ZDdkLTg3MGMtZmM3ZDdhYWZiZTE3IiwiZW1haWwiOiJqb3lAbXlzdGVubGFicy5jb20ifQ.dH0qsb4N4N0io7aulTYwZqcaKD5LNYtUc6gSolZdQZnlkUj7vsucVxL3cC8Pcl8ORuEa2wjTrOoZFWBH6qbZ9_uaxM_y_UFn68TkRFm7A42IoLEks5fausb8m6d7z_clJVk64610h4xJGXSvPlHGyg4bVgimFPOxvblA8-NOE10AMYx8yTzFYePus-m4WsLsYeY2t_ZKa-Wg7PRR72WjLuzx47UbdXd157CJQS5cP0NMWFCOc2i1jLnYgK2rdxFIA79Ut7JO-mVqKguBUwEnJpu8AnXPY5dO6SZRFYNNfNNEigJWwI23XVwWWaSPPNPnh3_aBVqMVUZ8_oytsj5FOg --max-epoch 10 --jwt-randomness 100681567828351849884072155819400689117 --kp-bigint 84029355920633174015103288781128426107680789454168570548782290541079926444544 --ephemeral-key-identifier 0xcc2196ee1fa156836daf9bb021d88d648a0023fa387e695d3701667a634a331f --network localnet User salt: 129390038577185583942388216820280642146 ZkLogin inputs: "{\"proofPoints\":{\"a\":[\"19980918537980869744687572469964337349825405376362188167910383044179510653833\",\"12249531555371442173051289145540228088155307753188082418695714220246079111102\",\"1\"],\"b\":[[\"1921082609633801942981160540918035570768246440894998964137765244270341203205\",\"19276039935580803267183234825303378152022828650685096772693266458616587369242\"],[\"476684281818678411384136804057657708782251771492330601330196896004197216391\",\"18133812313977174102436193170338442387156604014865119832554995079404708164810\"],[\"1\",\"0\"]],\"c\":[\"16337923935730369690293909432905869060500704541410614753862405651024745809175\",\"11731521936929813181955569079973007996191600034058540911920569484691100899979\",\"1\"]},\"issBase64Details\":{\"value\":\"CJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV9MUFNMQ2tDM0EiLC\",\"indexMod4\":1},\"headerBase64\":\"eyJraWQiOiJrRjRGZU40emQ2Vk5ZREFkeERGYTRcL3FqcWpNS29vbnJ5WVp1S1RONzZkRT0iLCJhbGciOiJSUzI1NiJ9\"}" Use single zklogin address as sender Sender: 0x0a8f8a57997e04cdccf31ce2ca0b760a5a385332a840397f98361f12e276b771 Faucet requested and created test transaction: "AAACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA4pbmUmbAPUQUJiiD/IIP6rSQDSRlzfjTCDUJ7WwfkeQCAAAAAAAAACB0Gx3E8xlIYTcxTukisntb3UCmADjf5NEGYz/2Qcm0LgEBAQEBAAEAAAqPileZfgTNzPMc4soLdgpaOFMyqEA5f5g2HxLidrdxAQGCd7yIpnIwSnVRJ0F8Qm+KhE8bgz4CqT6YlZG5DP3IAgAAAAAAAAAg3IuiUkO6BSjZPKpr6IMbV2nTw3RfennmxUtJia1199oKj4pXmX4EzczzHOLKC3YKWjhTMqhAOX+YNh8S4na3cegDAAAAAAAAQEtMAAAAAAAA" Single zklogin sig Serialized: "BQNNMTk5ODA5MTg1Mzc5ODA4Njk3NDQ2ODc1NzI0Njk5NjQzMzczNDk4MjU0MDUzNzYzNjIxODgxNjc5MTAzODMwNDQxNzk1MTA2NTM4MzNNMTIyNDk1MzE1NTUzNzE0NDIxNzMwNTEyODkxNDU1NDAyMjgwODgxNTUzMDc3NTMxODgwODI0MTg2OTU3MTQyMjAyNDYwNzkxMTExMDIBMQMCTDE5MjEwODI2MDk2MzM4MDE5NDI5ODExNjA1NDA5MTgwMzU1NzA3NjgyNDY0NDA4OTQ5OTg5NjQxMzc3NjUyNDQyNzAzNDEyMDMyMDVNMTkyNzYwMzk5MzU1ODA4MDMyNjcxODMyMzQ4MjUzMDMzNzgxNTIwMjI4Mjg2NTA2ODUwOTY3NzI2OTMyNjY0NTg2MTY1ODczNjkyNDICSzQ3NjY4NDI4MTgxODY3ODQxMTM4NDEzNjgwNDA1NzY1NzcwODc4MjI1MTc3MTQ5MjMzMDYwMTMzMDE5Njg5NjAwNDE5NzIxNjM5MU0xODEzMzgxMjMxMzk3NzE3NDEwMjQzNjE5MzE3MDMzODQ0MjM4NzE1NjYwNDAxNDg2NTExOTgzMjU1NDk5NTA3OTQwNDcwODE2NDgxMAIBMQEwA00xNjMzNzkyMzkzNTczMDM2OTY5MDI5MzkwOTQzMjkwNTg2OTA2MDUwMDcwNDU0MTQxMDYxNDc1Mzg2MjQwNTY1MTAyNDc0NTgwOTE3NU0xMTczMTUyMTkzNjkyOTgxMzE4MTk1NTU2OTA3OTk3MzAwNzk5NjE5MTYwMDAzNDA1ODU0MDkxMTkyMDU2OTQ4NDY5MTEwMDg5OTk3OQExZUNKcGMzTWlPaUpvZEhSd2N6cGNMMXd2WTI5bmJtbDBieTFwWkhBdWRYTXRaV0Z6ZEMweExtRnRZWHB2Ym1GM2N5NWpiMjFjTDNWekxXVmhjM1F0TVY5TVVGTk1RMnRETTBFaUxDAVxleUpyYVdRaU9pSnJSalJHWlU0MGVtUTJWazVaUkVGa2VFUkdZVFJjTDNGcWNXcE5TMjl2Ym5KNVdWcDFTMVJPTnpaa1JUMGlMQ0poYkdjaU9pSlNVekkxTmlKOU0xMTUyODEwODIxMTgwMTA0MzM3ODIyMzg1Njk5ODQ2OTQxMzQ0NzY3NjQyNDk4MjY3MTc0Mjk3OTE4MzM0NDEzMzc2MDE2NjkyMTE4NAoAAAAAAAAAYQDl9wVGdMQa7xjemqw5Ukpifgvu8xypaPdPVDPxnChc0klDrXZRpj++D2Oj58RLxT4ExOFO5sUiTbLuoKgUG7sIucbuFjDvPnERRKZI2wa7sihPcnTPvuU//O5QPMGkkgA=" ╭──────────┬────────────────────────────────────────────────╮ │ txDigest │ 9gvNALw2NQ17WchWvKGSEHBDsavEjMPkjNrJD4dWEPA2 │ ╰──────────┴────────────────────────────────────────────────╯ ==== microsoft "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0" ==== target/debug/sui keytool zk-login-enter-token --parsed-token eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N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nV0EJQVasvX0RRObEdlre7XJOIWVYV61ruhLdNBefCWLdjfK-U5527OyQ --max-epoch 10 --jwt-randomness 100681567828351849884072155819400689117 --kp-bigint 84029355920633174015103288781128426107680789454168570548782290541079926444544 --ephemeral-key-identifier 0xcc2196ee1fa156836daf9bb021d88d648a0023fa387e695d3701667a634a331f --network localnet User salt: 129390038577185583942388216820280642146 ZkLogin inputs: "{\"proofPoints\":{\"a\":[\"17843319203887799409179823780994907785911912955886824931137014260783239374555\",\"9306885203493468272149172164584329652382988035337378238852666694322002621661\",\"1\"],\"b\":[[\"16958232640446483410838192119723912501896986238555934427876821185516151484583\",\"2263600393503611195851455865535662736642368657040558054420063630048789304389\"],[\"8587878931400130044659218306769081322734247562317037332877307572302248727598\",\"673963469199659730051198888173090614199610609620289586510253896029697361474\"],[\"1\",\"0\"]],\"c\":[\"8454298844375171405800972960461128989588374893704838856309127562865579069511\",\"1270713187572364441541571483653343063156136877171721221307344244957952963774\",\"1\"]},\"issBase64Details\":{\"value\":\"CJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTE4ODA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLC\",\"indexMod4\":1},\"headerBase64\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlkyckpZUGU4YlBNY0pfa0F4cWg1M3kyY3V2SSJ9\"}" Use single zklogin address as sender Sender: 0xfd8ba0d39bdefbd0e0dba9a7eca7cdd0e1d102121fd8297d5feff45040e5e081 Faucet requested and created test transaction: "AAACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAzCCrd/jj1qUbgHMLpj087Z0bE+OS5zStNoyaYSF7+XACAAAAAAAAACAOpnKyqmDxW7cjwGHzepWqDlPpL5oUZRx3W9LvT8EoWwEBAQEBAAEAAP2LoNOb3vvQ4Nupp+ynzdDh0QISH9gpfV/v9FBA5eCBAU/Dj/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pSm9kSFJ3Y3pvdkwyeHZaMmx1TG0xcFkzSnZjMjltZEc5dWJHbHVaUzVqYjIwdk9URTRPREEwTUdRdE5tTTJOeTAwWXpWaUxXSXhNVEl0TXpaaE16QTBZalkyWkdGa0wzWXlMakFpTEMBVGV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWxreWNrcFpVR1U0WWxCTlkwcGZhMEY0Y1dnMU0za3lZM1YyU1NKOU0xMzYyNzM3MzE1NTMwOTgxNDc2NzU3Nzg1MDU5MzEzMzIyNzc0MzUzNDMyMzUwNjE3MjQ1OTY3MDA3OTE1NzYzMTAxMzM1MTQ1ODYzNwoAAAAAAAAAYQAEy7OWcr3iK0QAX1AKp9vow5V5HlOnrOiZnN0E8whrKojQJ9dN+ZgEXiLIWiEYPU8CK7nv3VKtKDUaEK1njAEIucbuFjDvPnERRKZI2wa7sihPcnTPvuU//O5QPMGkkgA=" ╭──────────┬───────────────────────────────────────────────╮ │ txDigest │ xSVwkjTzQJJxU177HXGCYA67btRyf9hUSKHCFNxkX24 │ ╰──────────┴───────────────────────────────────────────────╯ ==== credenza3 "https://accounts.credenza3.com" ==== target/debug/sui keytool zk-login-enter-token --parsed-token eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFfeGNBejhnalRWZm5pdnZSZjZXSEF6MDBpeUZodHNlcl9BVnVWeF8wRmMifQ.eyJpYXQiOjE3MTU4MDM1NjUsImV4cCI6MTcxNTgwNDE2NSwiYXVkIjoiNjU5NTRlYzVkMDNkYmEwMTk4YWMzNDNhIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5jcmVkZW56YTMuY29tIiwic3ViIjoiNjY0M2UzZGNkYTA0MTliZTg1NWMxMzU4Iiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBwaG9uZSIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJ0b2tlbl91c2UiOiJpZCIsIm5vbmNlIjoiaFRQcGdGN1hBS2JXMzdyRVVTNnBFVlpxbW9JIiwibG9naW5fdHlwZSI6ImNyZWRlbnRpYWxzIiwiZW1haWwiOiJqb3lAbXlzdGVubGFicy5jb20ifQ.ZjE9JiRIktvcAxbhAmT3iMAQodHTTV81TStCEQRrLQUgIb2PLpGdTQfYOdCwsbzlsVdwehWeBa9omWTyP8kydgzqg8_lbQUjljcymnaNy9ggu2yYTTaGDk3kNKAchfWuuamUWophOGTIVIkw82vqiB5_5HeNT_NzRALeZHi9G-6vFpry0GWctman6hwTAUJYeN_swM699HZ7hgnqX19vaIfXFwcfPkhKpLJG_SzmNzNJ4a4NpPWeJc2bkI5WqyjZSbDUYNgF0IuYE_LizKSIxV46ofXmD2Dw4cdrVmf2YhDrJ81AvBSdeyFRzZkYtp3VM7-yMY4-80XeXOJJdG3jKA --max-epoch 10 --jwt-randomness 100681567828351849884072155819400689117 --kp-bigint 84029355920633174015103288781128426107680789454168570548782290541079926444544 --ephemeral-key-identifier 0xcc2196ee1fa156836daf9bb021d88d648a0023fa387e695d3701667a634a331f --network localnet User salt: 129390038577185583942388216820280642146 ZkLogin inputs: "{\"proofPoints\":{\"a\":[\"3564326262953565182114756216556969682631725600405535564645713583325191986793\",\"2315352924412369357556650077950672713180175416950671539385060309755689558637\",\"1\"],\"b\":[[\"8483206883945386623689041318660305279866214625796925668909614624965236005138\",\"10233493135507484560101191000418758701336674462745851155750163293966797140177\"],[\"9775786353307179529770194415307452738084334900942100070582254419440218012938\",\"3310315034640045816219332484803068686747788489538815299572304186003883679879\"],[\"1\",\"0\"]],\"c\":[\"8467585488123274942170466867673994375525524318527536668801121270104824489778\",\"3482221260809208964930857950423795650572956289884025104720213460379545677803\",\"1\"]},\"issBase64Details\":{\"value\":\"wiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5jcmVkZW56YTMuY29tIiw\",\"indexMod4\":2},\"headerBase64\":\"eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFfeGNBejhnalRWZm5pdnZSZjZXSEF6MDBpeUZodHNlcl9BVnVWeF8wRmMifQ\"}" Use single zklogin address as sender Sender: 0x50eec7711c0c2699ea189e493c04b021943ae168c31f0711007bf45ecc15a76e Faucet requested and created test transaction: "AAACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA4wNaEl2w6SRBfxbW2V68L0UYS4shX2kTaW5781WmKjQCAAAAAAAAACC2/+DVmTLFKBlfr9SLab9Zzk5WojLxkJNp5uBJZrGTEwEBAQEBAAEAAFDux3EcDCaZ6hieSTwEsCGUOuFowx8HEQB79F7MFaduATw4TgphvrNGrBii6+8tu18A0EZnMv1s/2Wg1ddsQh/hAgAAAAAAAAAgD4kCB/WceywdSh4Z4J1KHNi0oQNmKXfuptEoeAnJbfxQ7sdxHAwmmeoYnkk8BLAhlDrhaMMfBxEAe/RezBWnbugDAAAAAAAAQEtMAAAAAAAA" Single zklogin sig Serialized: "BQNMMzU2NDMyNjI2Mjk1MzU2NTE4MjExNDc1NjIxNjU1Njk2OTY4MjYzMTcyNTYwMDQwNTUzNTU2NDY0NTcxMzU4MzMyNTE5MTk4Njc5M0wyMzE1MzUyOTI0NDEyMzY5MzU3NTU2NjUwMDc3OTUwNjcyNzEzMTgwMTc1NDE2OTUwNjcxNTM5Mzg1MDYwMzA5NzU1Njg5NTU4NjM3ATEDAkw4NDgzMjA2ODgzOTQ1Mzg2NjIzNjg5MDQxMzE4NjYwMzA1Mjc5ODY2MjE0NjI1Nzk2OTI1NjY4OTA5NjE0NjI0OTY1MjM2MDA1MTM4TTEwMjMzNDkzMTM1NTA3NDg0NTYwMTAxMTkxMDAwNDE4NzU4NzAxMzM2Njc0NDYyNzQ1ODUxMTU1NzUwMTYzMjkzOTY2Nzk3MTQwMTc3Akw5Nzc1Nzg2MzUzMzA3MTc5NTI5NzcwMTk0NDE1MzA3NDUyNzM4MDg0MzM0OTAwOTQyMTAwMDcwNTgyMjU0NDE5NDQwMjE4MDEyOTM4TDMzMTAzMTUwMzQ2NDAwNDU4MTYyMTkzMzI0ODQ4MDMwNjg2ODY3NDc3ODg0ODk1Mzg4MTUyOTk1NzIzMDQxODYwMDM4ODM2Nzk4NzkCATEBMANMODQ2NzU4NTQ4ODEyMzI3NDk0MjE3MDQ2Njg2NzY3Mzk5NDM3NTUyNTUyNDMxODUyNzUzNjY2ODgwMTEyMTI3MDEwNDgyNDQ4OTc3OEwzNDgyMjIxMjYwODA5MjA4OTY0OTMwODU3OTUwNDIzNzk1NjUwNTcyOTU2Mjg5ODg0MDI1MTA0NzIwMjEzNDYwMzc5NTQ1Njc3ODAzATE1d2lhWE56SWpvaWFIUjBjSE02THk5aFkyTnZkVzUwY3k1amNtVmtaVzU2WVRNdVkyOXRJaXcCamV5SjBlWEFpT2lKcWQzUWlMQ0poYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWxGZmVHTkJlamhuYWxSV1ptNXBkblpTWmpaWFNFRjZNREJwZVVab2RITmxjbDlCVm5WV2VGOHdSbU1pZlFNMjE0MzcyMjY3ODMyNDE5MDAzMzgyODQwNTM0NTgyNTg4NTA2NDg2MTE2OTk0MDIwODM0NjY3NzIwOTE4MjQ2ODMxNjIzMjAzMzgyMDUKAAAAAAAAAGEARQAqREhXAE10Aaja/3Wo8hA38lLEsYkIh7pm+SCxwHqHwSk3DpQ1VLIfbGi6xf+9OCR6u495hfTCC4wur9UGC7nG7hYw7z5xEUSmSNsGu7IoT3J0z77lP/zuUDzBpJIA" ╭──────────┬────────────────────────────────────────────────╮ │ txDigest │ FSe8dbC6nQq4aKMesVTMGiYHNMHKkmdRuW8QnQhkVM1X │ ╰──────────┴────────────────────────────────────────────────╯ ``` --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: --- Cargo.lock | 9 +-- Cargo.toml | 6 +- crates/sui-config/src/node.rs | 4 ++ ...ests__network_config_snapshot_matches.snap | 28 ++++++++++ crates/sui/src/keytool.rs | 42 +++++++++++++- crates/sui/src/zklogin_commands_util.rs | 56 ++++++++++++------- 6 files changed, 118 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 051cc5dea6af2..90d9819857a16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4342,7 +4342,7 @@ dependencies = [ [[package]] name = "fastcrypto" version = "0.1.8" -source = "git+https://github.com/MystenLabs/fastcrypto?rev=4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6#4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" +source = "git+https://github.com/MystenLabs/fastcrypto?rev=c101a5176799db3eb9c801b844e7add92153d291#c101a5176799db3eb9c801b844e7add92153d291" dependencies = [ "aes", "aes-gcm", @@ -4396,7 +4396,7 @@ dependencies = [ [[package]] name = "fastcrypto-derive" version = "0.1.3" -source = "git+https://github.com/MystenLabs/fastcrypto?rev=4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6#4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" +source = "git+https://github.com/MystenLabs/fastcrypto?rev=c101a5176799db3eb9c801b844e7add92153d291#c101a5176799db3eb9c801b844e7add92153d291" dependencies = [ "quote 1.0.35", "syn 1.0.107", @@ -4405,7 +4405,7 @@ dependencies = [ [[package]] name = "fastcrypto-tbls" version = "0.1.0" -source = "git+https://github.com/MystenLabs/fastcrypto?rev=4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6#4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" +source = "git+https://github.com/MystenLabs/fastcrypto?rev=c101a5176799db3eb9c801b844e7add92153d291#c101a5176799db3eb9c801b844e7add92153d291" dependencies = [ "bcs", "digest 0.10.7", @@ -4423,7 +4423,7 @@ dependencies = [ [[package]] name = "fastcrypto-zkp" version = "0.1.3" -source = "git+https://github.com/MystenLabs/fastcrypto?rev=4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6#4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" +source = "git+https://github.com/MystenLabs/fastcrypto?rev=c101a5176799db3eb9c801b844e7add92153d291#c101a5176799db3eb9c801b844e7add92153d291" dependencies = [ "ark-bls12-381", "ark-bn254", @@ -4444,6 +4444,7 @@ dependencies = [ "neptune", "num-bigint 0.4.4", "once_cell", + "regex", "reqwest", "schemars", "serde", diff --git a/Cargo.toml b/Cargo.toml index 6a7bf710f58f9..db44bdac33d11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -564,9 +564,9 @@ move-symbol-pool = { path = "external-crates/move/crates/move-symbol-pool" } move-abstract-interpreter = { path = "external-crates/move/crates/move-abstract-interpreter" } move-abstract-stack = { path = "external-crates/move/crates/move-abstract-stack" } -fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" } -fastcrypto-tbls = { git = "https://github.com/MystenLabs/fastcrypto", rev = "4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" } -fastcrypto-zkp = { git = "https://github.com/MystenLabs/fastcrypto", rev = "4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6", package = "fastcrypto-zkp" } +fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "c101a5176799db3eb9c801b844e7add92153d291" } +fastcrypto-tbls = { git = "https://github.com/MystenLabs/fastcrypto", rev = "c101a5176799db3eb9c801b844e7add92153d291" } +fastcrypto-zkp = { git = "https://github.com/MystenLabs/fastcrypto", rev = "c101a5176799db3eb9c801b844e7add92153d291", package = "fastcrypto-zkp" } # anemo dependencies anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "26d415eb9aa6a2417be3c03c57d6e93c30bd1ad7" } diff --git a/crates/sui-config/src/node.rs b/crates/sui-config/src/node.rs index 92c0a2c0faba1..2959c8684224d 100644 --- a/crates/sui-config/src/node.rs +++ b/crates/sui-config/src/node.rs @@ -214,6 +214,10 @@ pub fn default_zklogin_oauth_providers() -> BTreeMap> { "Apple".to_string(), "Slack".to_string(), "TestIssuer".to_string(), + "Microsoft".to_string(), + "KarrierOne".to_string(), + "Credenza3".to_string(), + "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A".to_string(), ]); let providers = BTreeSet::from([ "Google".to_string(), diff --git a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap index 977e15f783062..a562a2069af1d 100644 --- a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap @@ -108,9 +108,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -239,9 +243,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -370,9 +378,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -501,9 +513,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -632,9 +648,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -763,9 +783,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch @@ -894,9 +918,13 @@ validator_configs: - Twitch Unknown: - Apple + - "AwsTenant-region:us-east-1-tenant_id:us-east-1_LPSLCkC3A" + - Credenza3 - Facebook - Google - Kakao + - KarrierOne + - Microsoft - Slack - TestIssuer - Twitch diff --git a/crates/sui/src/keytool.rs b/crates/sui/src/keytool.rs index 30603d24c9f30..ed6c82a352ef7 100644 --- a/crates/sui/src/keytool.rs +++ b/crates/sui/src/keytool.rs @@ -253,7 +253,7 @@ pub enum KeyToolCommand { ephemeral_key_identifier: SuiAddress, #[clap(long, default_value = "devnet")] network: String, - #[clap(long, default_value = "true")] + #[clap(long, default_value = "false")] test_multisig: bool, #[clap(long, default_value = "false")] sign_with_sk: bool, @@ -1066,6 +1066,41 @@ impl KeyToolCommand { "$YOUR_AUTH_CODE", "39b955a118f2f21110939bf3dff1de90", )?; + let url_9 = get_oidc_url( + OIDCProvider::AwsTenant(( + "us-east-1".to_string(), + "zklogin-example".to_string(), + )), + &eph_pk_bytes, + max_epoch, + "6c56t7re6ekgmv23o7to8r0sic", + "https://www.sui.io/", + &jwt_randomness, + )?; + let url_10 = get_oidc_url( + OIDCProvider::Microsoft, + &eph_pk_bytes, + max_epoch, + "2e3e87cb-bf24-4399-ab98-48343d457124", + "https://www.sui.io", + &jwt_randomness, + )?; + let url_11 = get_oidc_url( + OIDCProvider::KarrierOne, + &eph_pk_bytes, + max_epoch, + "kns-dev", + "https://sui.io/", // placeholder + &jwt_randomness, + )?; + let url_12 = get_oidc_url( + OIDCProvider::Credenza3, + &eph_pk_bytes, + max_epoch, + "65954ec5d03dba0198ac343a", + "https://example.com/callback", + &jwt_randomness, + )?; println!("Visit URL (Google): {url}"); println!("Visit URL (Twitch): {url_2}"); println!("Visit URL (Facebook): {url_3}"); @@ -1075,6 +1110,11 @@ impl KeyToolCommand { println!("Visit URL (Slack): {url_7}"); println!("Token exchange URL (Slack): {url_8}"); + println!("Visit URL (AWS): {url_9}"); + println!("Visit URL (Microsoft): {url_10}"); + println!("Visit URL (KarrierOne): {url_11}"); + println!("Visit URL (Credenza3): {url_12}"); + println!("Finish login and paste the entire URL here (e.g. https://sui.io/#id_token=...):"); let parsed_token = read_cli_line()?; diff --git a/crates/sui/src/zklogin_commands_util.rs b/crates/sui/src/zklogin_commands_util.rs index 65ef9349f1126..38c4b6b26741f 100644 --- a/crates/sui/src/zklogin_commands_util.rs +++ b/crates/sui/src/zklogin_commands_util.rs @@ -7,7 +7,7 @@ use fastcrypto::encoding::{Base64, Encoding}; use fastcrypto::jwt_utils::parse_and_validate_jwt; use fastcrypto::traits::{EncodeDecodeBase64, KeyPair}; use fastcrypto_zkp::bn254::utils::get_proof; -use fastcrypto_zkp::bn254::utils::{gen_address_seed, get_salt, get_zk_login_address}; +use fastcrypto_zkp::bn254::utils::{gen_address_seed, get_salt}; use fastcrypto_zkp::bn254::zk_login::ZkLoginInputs; use rand::rngs::StdRng; use rand::SeedableRng; @@ -114,10 +114,8 @@ pub async fn perform_zk_login_test_tx( println!("Use multisig address as sender"); SuiAddress::from(&multisig_pk) } else { - SuiAddress::from_bytes(get_zk_login_address( - zk_login_inputs.get_address_seed(), - zk_login_inputs.get_iss(), - )?)? + println!("Use single zklogin address as sender"); + SuiAddress::try_from_unpadded(&zk_login_inputs)? }; println!("Sender: {:?}", sender); @@ -149,13 +147,32 @@ pub async fn perform_zk_login_test_tx( Base64::encode(bcs::to_bytes(&txb_res).unwrap()) ); - let sig = if sign_with_sk { - // Create a generic sig from the traditional keypair - GenericSignature::Signature(keystore.sign_secure( - &ephemeral_key_identifier, - &txb_res, - Intent::sui_transaction(), - )?) + let final_sig = if test_multisig { + let sig = if sign_with_sk { + // Create a generic sig from the traditional keypair + GenericSignature::Signature(keystore.sign_secure( + &ephemeral_key_identifier, + &txb_res, + Intent::sui_transaction(), + )?) + } else { + // Sign transaction with the ephemeral key + let signature = keystore.sign_secure( + &ephemeral_key_identifier, + &txb_res, + Intent::sui_transaction(), + )?; + + GenericSignature::from(ZkLoginAuthenticator::new( + zk_login_inputs, + max_epoch, + signature, + )) + }; + + let multisig = GenericSignature::MultiSig(MultiSig::combine(vec![sig], multisig_pk)?); + println!("Multisig Serialized: {:?}", multisig.encode_base64()); + multisig } else { // Sign transaction with the ephemeral key let signature = keystore.sign_secure( @@ -164,20 +181,21 @@ pub async fn perform_zk_login_test_tx( Intent::sui_transaction(), )?; - GenericSignature::from(ZkLoginAuthenticator::new( + let single_sig = GenericSignature::from(ZkLoginAuthenticator::new( zk_login_inputs, max_epoch, signature, - )) + )); + println!( + "Single zklogin sig Serialized: {:?}", + single_sig.encode_base64() + ); + single_sig }; - - let multisig = GenericSignature::MultiSig(MultiSig::combine(vec![sig], multisig_pk)?); - println!("Signature Serialized: {:?}", multisig.encode_base64()); - let transaction_response = sui .quorum_driver_api() .execute_transaction_block( - Transaction::from_generic_sig_data(txb_res, vec![multisig]), + Transaction::from_generic_sig_data(txb_res, vec![final_sig]), SuiTransactionBlockResponseOptions::full_content(), None, )