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

Support certificates for registeration #429

Merged
merged 9 commits into from
Nov 13, 2023

Conversation

poszu
Copy link
Contributor

@poszu poszu commented Oct 30, 2023

Closes #427

There is now an alternative way to PoW of verifying if a node is allowed to register in the open round by certificate verification.

It's considered unstable now and the poet supports both ways until it is stabilized.

If a certifier is configured (an URL + a pubkey), the poet will first try to verify the certificate. If it's not provided (for example a node that didn't update tries to register) - fallback to verifying PoW. Hence a poet that wants to support certificates should configure PoW as well until the certificate way is fully stabilized.

It returns unauthorized (HTTP 401) if the certifier is configured but the certificate is not valid, allowing the node the re-certify and retry registration with a new certificate.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #429 (1284049) into develop (fb46c6f) will increase coverage by 0.1%.
The diff coverage is 95.0%.

@@            Coverage Diff            @@
##           develop    #429     +/-   ##
=========================================
+ Coverage     77.1%   77.3%   +0.1%     
=========================================
  Files           25      25             
  Lines         1959    2010     +51     
=========================================
+ Hits          1512    1554     +42     
- Misses         330     336      +6     
- Partials       117     120      +3     
Files Coverage Δ
registration/registration.go 78.0% <100.0%> (-0.7%) ⬇️
rpc/rpcserver.go 90.8% <100.0%> (+2.0%) ⬆️
registration/config.go 84.2% <76.9%> (-15.8%) ⬇️

@poszu poszu force-pushed the support-certificates-for-submit branch 3 times, most recently from cb08b00 to 9b97180 Compare November 1, 2023 08:36
@poszu poszu changed the title Support certifier Support certificates for registering Nov 1, 2023
@poszu poszu changed the title Support certificates for registering Support certificates for registeration Nov 1, 2023
@poszu poszu requested a review from fasmat November 1, 2023 08:37
@poszu poszu force-pushed the support-certificates-for-submit branch from 9b97180 to 553ec5d Compare November 1, 2023 08:52
@poszu poszu marked this pull request as ready for review November 1, 2023 08:56
registration/config.go Outdated Show resolved Hide resolved
rpc/api/v1/api.proto Show resolved Hide resolved
poszu and others added 3 commits November 10, 2023 11:39
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
@poszu poszu force-pushed the support-certificates-for-submit branch from 5d7917e to 1284049 Compare November 10, 2023 09:26
@poszu poszu added this pull request to the merge queue Nov 13, 2023
Merged via the queue into develop with commit ba98c66 Nov 13, 2023
11 checks passed
@fasmat fasmat deleted the support-certificates-for-submit branch November 15, 2023 09:40
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.

add support for certifier service in poet
2 participants