-
Notifications
You must be signed in to change notification settings - Fork 215
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
Unauthenticated handlers #962
Unauthenticated handlers #962
Conversation
This reverts commit da617b9.
Codecov Report
@@ Coverage Diff @@
## master #962 +/- ##
==========================================
- Coverage 68.09% 68.03% -0.06%
==========================================
Files 103 103
Lines 8147 8145 -2
==========================================
- Hits 5547 5541 -6
- Misses 2600 2604 +4
|
unauthenticated_handlers@6093 aka 20200319.4 vs master ewma over 30 builds from 5804 to 6087 |
src/node/rpc/handlerregistry.h
Outdated
@@ -92,6 +93,24 @@ namespace ccf | |||
return *this; | |||
} | |||
|
|||
// If true, caller does not need to be authenticated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like exactly the same thing as require_client_signature
. The comments around its use-point also talk about requiring auth. Convince me these are different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two flags are different. require_client_signature
indicates that the RPC requires a signed command (i.e. use scurl.sh
) while caller_auth_disabled
indicates that the client does not need to be authenticated (i.e. not specifying --key
and --cert
to curl
is OK), even on a frontend that has (through its registry) a certs
table. In practice however, I imagine that the two are not completely orthogonal (e.g. using proxies).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both could be considered authentication, if we had a mechanism to convey intended identity on signed messages?
PBFT performance drop with client signatures is expected as we now verify the client signature on each node before reaching consensus as opposed to primary node only. |
Building block for #926
This PR introduces a new
caller_auth_disabled
handler flag. If the flag is set (default tofalse
), the handler does not go through the usual caller validation process as anyone can execute the corresponding endpoint.As well as unit tests (see
frontend_test.cpp
), I've added a new endpoint to the logging app that lets anonymous users (and only anonymous users) register "anonymous" messages.Most of the changes are in
frontend.h
:process()
toprocess_command()
as the handler now influences the authorisation policy.process_command()
.