Repository navigation
refactor(id)!: remove unused admin identities from id.Provider - #1947
SaidAltury-ibm merged 1 commit into
Conversation
|
Hey @mbrandenburger 👋 thanks for the PR! This comment updates automatically as you push changes -- think of it as your PR's live scoreboard! PR Checks✅ DCO Sign-off -- All commits have valid sign-offs. Nice work! ❌ GPG Signature -- Heads up! The following commits don't have a verified GPG signature:
You'll need to sign your commits with GPG (e.g. ✅ Merge Conflicts -- No merge conflicts detected. Smooth sailing! ✅ Issue Link -- Linked to #860 (assigned to you). ⏳ All checks must pass before this PR can be reviewed. You've got this! |
id.Provider had an admins field that was never populated: no configuration key loads it and Admins() always returned nil. The gRPC view service's AccessControlChecker treated admins exactly like clients, so the concept had no distinct semantics. Remove the field, the Admins() method, and the Admins() member of the view service's IdentityProvider interface. Add unit tests for AccessControlChecker.Check, which had none: the default and client identities are accepted, unknown creators are rejected with ErrIdentityNotRecognized before any signature check, and verifier lookup and signature failures are reported. Document in docs/configuration.md that the gRPC view service accepts the node's default identity in addition to fsc.client.certs. BREAKING CHANGE: (*id.Provider).Admins() and the Admins() method of server.IdentityProvider are removed. Implementations of the interface must drop the method; callers should use Clients(). Fixes hyperledger-labs#860 Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
5d40e3e to
f5bc1cd
Compare
SaidAltury-ibm
left a comment
There was a problem hiding this comment.
thank you @mbrandenburger
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
id.Providerhas anadminsfield that is never populated. No configuration key loads it, soAdmins()always returns nil. Its only reader,AccessControlChecker.Checkin the gRPC view service, treats admins the same as clients, so the concept has no semantics of its own. This PR removes it:adminsfield and(*id.Provider).Admins()Admins()fromserver.IdentityProvider, which makes this a breaking change; implementations drop the method and callers useClients()Admins()stubs in test fakes andintegration/benchmark/mocks.goAccessControlChecker.Checkhad no tests.ac_test.gocovers it fully: the default and client identities are accepted, an unknown creator is rejected withErrIdentityNotRecognizedbefore any signature check, and verifier lookup and signature failures are reported.docs/configuration.mdnow says the gRPC view service also accepts the node's default identity, and drops the claim that at least one client certificate is required.Panurus does not use
Admins()or implementserver.IdentityProvider: its currentmainpassesgo vetin the root andintegrationmodules against this branch.Fixes #860