Skip to content

refactor(id)!: remove unused admin identities from id.Provider - #1947

Merged
SaidAltury-ibm merged 1 commit into
hyperledger-labs:mainfrom
mbrandenburger:worktree-issue-860-id-admins
Sep 29, 2026
Merged

SaidAltury-ibm merged 1 commit into
hyperledger-labs:mainfrom
mbrandenburger:worktree-issue-860-id-admins

Conversation

@mbrandenburger

Copy link
Copy Markdown
Member

id.Provider has an admins field that is never populated. No configuration key loads it, so Admins() always returns nil. Its only reader, AccessControlChecker.Check in the gRPC view service, treats admins the same as clients, so the concept has no semantics of its own. This PR removes it:

  • the admins field and (*id.Provider).Admins()
  • Admins() from server.IdentityProvider, which makes this a breaking change; implementations drop the method and callers use Clients()
  • the Admins() stubs in test fakes and integration/benchmark/mocks.go

AccessControlChecker.Check had no tests. ac_test.go covers it fully: the default and client identities are accepted, an unknown creator is rejected with ErrIdentityNotRecognized before any signature check, and verifier lookup and signature failures are reported. docs/configuration.md now 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 implement server.IdentityProvider: its current main passes go vet in the root and integration modules against this branch.

Fixes #860

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Hey @mbrandenburger 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


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:

  • f5bc1cd refactor(id)!: remove unused admin identities from id.Provider

You'll need to sign your commits with GPG (e.g. git commit -S). See the Signing Guide for a step-by-step walkthrough.


✅ 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!

@github-actions github-actions Bot added the status: needs revision The pull request requires changes from the author before it can be reviewed or merged label Sep 29, 2026
@mbrandenburger mbrandenburger added status: needs review The pull request is ready for maintainer review and removed status: needs revision The pull request requires changes from the author before it can be reviewed or merged labels Sep 29, 2026
@mbrandenburger mbrandenburger added this to the 26Q3 milestone Sep 29, 2026
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>
@SaidAltury-ibm
SaidAltury-ibm force-pushed the worktree-issue-860-id-admins branch from 5d40e3e to f5bc1cd Compare September 29, 2026 22:29
@github-actions github-actions Bot added status: needs revision The pull request requires changes from the author before it can be reviewed or merged and removed status: needs review The pull request is ready for maintainer review labels Sep 29, 2026

@SaidAltury-ibm SaidAltury-ibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @mbrandenburger

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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.

@SaidAltury-ibm
SaidAltury-ibm merged commit 4676d99 into hyperledger-labs:main Sep 29, 2026
46 checks passed
@mbrandenburger
mbrandenburger deleted the worktree-issue-860-id-admins branch September 30, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs revision The pull request requires changes from the author before it can be reviewed or merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack support for admin identities in id.Provider

2 participants