Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable COSE Sign1 authentication for governance endpoints #4392

Merged
merged 30 commits into from
Oct 26, 2022

Conversation

achamayou
Copy link
Member

@achamayou achamayou commented Oct 24, 2022

Second half of #3875, with tests:

  • POST /gov/ack
  • POST /gov/proposals
  • POST /gov/proposals/{proposal_id}/ballots
  • POST /gov/proposals/{proposal_id}/withdraw

The change to clients.py to use COSE Sign1 is a bit of a bodge, but gets us a fair bit of coverage quickly. I will continue to clean up the implementation and the tests, but I think the interface is good to go for rc0.

@ghost
Copy link

ghost commented Oct 24, 2022

cose_authn_gov@52327 aka 20221026.33 vs main ewma over 20 builds from 51805 to 52321

Click to see table

main

build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem tpcc_virtual_cft^ tpcc_virtual_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_virtual_cft^ ls_virtual_cft_mem ls_jwt_virtual_cft^ ls_jwt_virtual_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_virtual_cft^ ls_js_virtual_cft_mem ls_full_js_virtual_cft^ ls_full_js_virtual_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_js_jwt_virtual_cft_mem hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
51805 20221021.2 5750.81 8.3497e+07 17709.5 1.71746e+07 6168.59 1.56017e+07 11181.3 0 2345.54 9.57242e+06 42683.3 0 10188.4 0 1996.68 9.57242e+06 4351.77 0 3461.51 0 1921.35 9.04813e+06 3212.55 0 26940 902870 1.3806e+06 9.27948e+06 3.58669e+07
51813 20221021.5 5793.12 8.3497e+07 17799.1 1.6126e+07 6120.3 1.56017e+07 11336.7 0 2348.47 9.57242e+06 40642.5 0 11519.1 0 2044.46 9.31027e+06 4260.82 0 3425.09 0 1910.74 9.04813e+06 3223.42 0 28834.2 907679 1.37643e+06 9.22103e+06 3.59298e+07
51826 20221021.9 5621.67 8.24484e+07 17870.6 1.6126e+07 6151.43 1.56017e+07 10567.1 0 2357.11 9.57242e+06 42390.5 0 10341.2 0 1980.47 9.31027e+06 4289.94 0 3385.16 0 1926.41 9.04813e+06 3174.02 0 26911.8 885814 1.34551e+06 9.13063e+06 3.53713e+07
51832 20221021.11 5611.78 8.3497e+07 17968.1 1.63882e+07 6067.88 1.56017e+07 10984.6 0 2340.66 9.57242e+06 43765.1 0 10141 0 1975.36 9.57242e+06 4366.3 0 3463.29 0 1877.25 9.04813e+06 3228.09 0 24824.9 891090 1.36788e+06 9.21273e+06 3.56174e+07
51844 20221021.15 5666.7 8.42835e+07 17806.4 1.63882e+07 6079.43 1.56017e+07 10939.3 0 2310.1 9.57242e+06 42325.1 0 10632.1 0 2004.41 9.31027e+06 4249.92 0 3457.66 0 1914.02 9.31027e+06 3218.37 0 23210.3 908278 1.37283e+06 9.22099e+06 3.57411e+07
51922 20221023.1 5780.97 8.21863e+07 17755.2 1.6126e+07 6062.06 1.53396e+07 11341.2 0 2339.54 9.57242e+06 42755.5 0 10599.5 0 1976.51 9.57242e+06 4421.86 0 3478.67 0 1923.12 9.04813e+06 3215.35 0 24171.6 908401 1.36688e+06 9.14686e+06 3.57417e+07
51929 20221024.2 5649.55 8.32349e+07 18197.1 1.66503e+07 6173.25 1.58639e+07 11020 0 2353.95 9.31027e+06 42507.8 0 10714.4 0 1956.4 1.14074e+07 4234.49 0 3585.69 0 1881.83 9.04813e+06 3241.89 0 21619.3 924057 1.38349e+06 9.30901e+06 3.57411e+07
51934 20221024.4 5696.81 8.37592e+07 17882.1 1.6126e+07 6157.47 1.58639e+07 11228.6 0 2348.42 9.31027e+06 43074.1 0 10611.6 0 1978.09 1.27181e+07 4309.36 0 3534.43 0 1930.14 9.31027e+06 3202.17 0 28527.6 905468 1.35252e+06 9.41601e+06 3.56794e+07
51943 20221024.8 5747.57 8.37592e+07 17784.2 1.63882e+07 6134.12 1.56017e+07 11138.8 0 2359.15 9.83456e+06 41682.8 0 10100.2 0 1984.33 9.83456e+06 4213.87 0 3372.76 0 1930.04 9.31027e+06 3197.46 0 24870.3 898869 1.37809e+06 9.39876e+06 3.58669e+07
51959 20221024.15 5782.18 8.45456e+07 17690.6 1.6126e+07 6032.81 1.56017e+07 11371.8 0 2359.2 9.57242e+06 42816.8 0 10018.8 0 1980.58 9.57242e+06 4301.09 0 3541.08 0 1914.75 9.04813e+06 3206.07 0 24628.2 920195 1.36952e+06 9.33446e+06 3.58669e+07
52014 20221024.40 5712.19 8.37592e+07 17593.8 1.63882e+07 6139.58 1.58639e+07 11398.6 0 2447.74 9.83456e+06 43113.2 0 10654.3 0 1979.58 9.31027e+06 4225.14 0 3426.22 0 1921.92 9.04813e+06 3251.09 0 27874.6 906348 1.37366e+06 9.33025e+06 3.57417e+07
52041 20221024.53 5760.17 8.55942e+07 17977.4 1.58639e+07 6168.98 1.53396e+07 11321.6 0 2360.75 9.57242e+06 43611.8 0 10138.7 0 1990.82 9.57242e+06 4255.73 0 3463.17 0 1937.17 9.31027e+06 3202.65 0 25100.1 902277 1.37044e+06 9.22099e+06 3.57417e+07
52054 20221024.58 5681.71 8.29727e+07 17484.3 1.6126e+07 6021.95 1.56017e+07 11044.1 0 2351.04 9.57242e+06 41604.5 0 10104.2 0 2011.09 1.14074e+07 4372.67 0 3532.07 0 1915.13 9.04813e+06 3171.67 0 27719.6 885654 1.36824e+06 9.40308e+06 3.58669e+07
52062 20221025.1 5619.86 8.29727e+07 17763.6 1.6126e+07 6027.95 1.56017e+07 10867.9 0 2351.98 9.31027e+06 43201.8 0 10139.3 0 1976.69 9.31027e+06 4325.6 0 3455.55 0 1924.45 9.04813e+06 3413.03 0 28088.8 908070 1.35376e+06 9.20019e+06 3.47702e+07
52148 20221025.38 5718.6 8.29727e+07 17753.4 1.6126e+07 6044.86 1.58639e+07 11063.7 0 2358.53 9.57242e+06 40818 0 10463.8 0 1979.66 9.57242e+06 4339.26 0 3383.05 0 1921.17 9.04813e+06 3229.84 0 28238.2 888304 1.37246e+06 9.46824e+06 3.58036e+07
52163 20221025.43 5600.9 8.32349e+07 17696.9 1.66503e+07 6085.06 1.56017e+07 11038.1 0 2358.74 9.83456e+06 41761.6 0 10179 0 1983.17 9.57242e+06 4350.36 0 3469.75 0 1889.35 9.31027e+06 3335.97 0 28399.5 903435 1.38201e+06 9.39881e+06 3.62478e+07
52174 20221025.47 5689.44 8.32349e+07 17535.4 1.63882e+07 6022.79 1.58639e+07 11133.2 0 2412.92 9.57242e+06 43517.8 0 10340.2 0 1918.01 9.83456e+06 4330.74 0 3411.3 0 1919.16 9.31027e+06 3218.81 0 27570.9 914116 1.40687e+06 9.30901e+06 3.61831e+07
52195 20221026.2 5681.17 8.3497e+07 17589.3 1.66503e+07 6028.17 1.53396e+07 11554.9 0 2370.68 9.57242e+06 41858.6 0 10139.1 0 1984.11 9.57242e+06 4270.16 0 3340.51 0 1963.27 9.04813e+06 3053.82 0 27354.3 903111 1.34426e+06 9.21269e+06 3.58042e+07
52214 20221026.8 5602.67 8.27106e+07 17410.9 1.6126e+07 6036.44 1.53396e+07 11377 0 2364.04 9.57242e+06 43249 0 10217.2 0 1979.57 9.31027e+06 4275.83 0 3312.68 0 1879.58 9.04813e+06 3029.65 0 23651.4 884697 1.3768e+06 9.30055e+06 3.57411e+07
52321 20221026.31 5580.3 8.27106e+07 15985.1 1.63882e+07 5350.9 1.50774e+07 10453 0 2045.31 8.78598e+06 38970.4 0 10294.1 0 1683.25 8.78598e+06 4251.76 0 3285.73 0 1609.17 7.99955e+06 3177.25 0 27773.5 832968 1.18137e+06 8.17226e+06 3.08369e+07

cose_authn_gov

build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem tpcc_virtual_cft^ tpcc_virtual_cft_mem hist_sgx_cft^ ls_virtual_cft^ ls_virtual_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^ ls_jwt_virtual_cft^ ls_jwt_virtual_cft_mem ls_js_virtual_cft^ ls_js_virtual_cft_mem ls_full_js_virtual_cft^ ls_full_js_virtual_cft_mem ls_js_jwt_virtual_cft^ ls_js_jwt_virtual_cft_mem
52191 20221025.53 5665.85 8.3497e+07 17415.1 1.71746e+07 6101.99 1.56017e+07 2359.3 9.57242e+06 1980.65 9.31027e+06 1915.09 9.57242e+06 10827.9 0 24461 41003.3 0 898321 1.3744e+06 9.21688e+06 3.54939e+07 10082.1 0 4044.97 0 3417.56 0 3463.31 0
52290 20221026.22 5656.06 8.40213e+07 17362.3 1.66503e+07 6101.72 1.56017e+07 2362.16 9.57242e+06 1984.16 9.31027e+06 1965.78 9.31027e+06 11223.8 0 17023.3 41856 0 890192 1.35843e+06 9.25846e+06 3.5249e+07 10607.3 0 4307.26 0 3371.08 0 3301.42 0
52320 20221026.30 5672.1 8.40213e+07 17594 1.66503e+07 6011.78 1.56017e+07 2351.24 9.31027e+06 1992.67 9.31027e+06 1922.05 9.04813e+06 10943.2 0 28856.7 39785.4 0 904913 1.4037e+06 9.44649e+06 3.58042e+07 10512.5 0 4310.29 0 3430.98 0 3292.57 0
52325 20221026.32 5590.63 8.29727e+07 16324.9 1.6126e+07 5449.4 1.53396e+07 2070.59 9.31027e+06 1692.13 8.52384e+06 1627.65 7.99955e+06 10846.2 0 27286.7 39742.5 0 829326 1.16484e+06 8.17333e+06 3.0718e+07 10479 0 4274.43 0 3459.12 0 3305.48 0
52327 20221026.33 5504.39 8.27106e+07 15993.4 1.63882e+07 5392.79 1.53396e+07 2080.28 9.04813e+06 1678.77 9.04813e+06 1591.39 7.99955e+06 11014.2 0 24488.5 40773.2 0 816909 1.18324e+06 8.15011e+06 3.08476e+07 9833.54 0 4159.64 0 3426.93 0 3256.02 0

images

@achamayou achamayou changed the title Enabled COSE Sign1 authentication for governance endpoints Enable COSE Sign1 authentication for governance endpoints Oct 25, 2022
@achamayou achamayou marked this pull request as ready for review October 25, 2022 16:37
@achamayou achamayou requested a review from a team October 25, 2022 16:37
@achamayou achamayou requested a review from jumaffre October 25, 2022 22:51
doc/schemas/gov_openapi.json Outdated Show resolved Hide resolved
src/node/rpc/member_frontend.h Show resolved Hide resolved
src/node/rpc/member_frontend.h Show resolved Hide resolved
src/node/rpc/member_frontend.h Show resolved Hide resolved
tests/governance.py Show resolved Hide resolved
tests/governance.py Show resolved Hide resolved
tests/governance.py Show resolved Hide resolved
Co-authored-by: Dominic Ayre <domayre@outlook.com>
@achamayou achamayou enabled auto-merge (squash) October 26, 2022 15:04
@achamayou achamayou merged commit 8637560 into microsoft:main Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants