Skip to content

fix: verify owner auth committers - #1003

Open
charmful0x wants to merge 2 commits into
edgefrom
fix/owner-auth
Open

fix: verify owner auth committers#1003
charmful0x wants to merge 2 commits into
edgefrom
fix/owner-auth

Conversation

@charmful0x

Copy link
Copy Markdown

cherry picked some fixes made by @speeddragon from #963

meta@1.0

=======================================================
  All 13 tests passed.

@charmful0x
charmful0x requested a review from speeddragon July 6, 2026 19:17
Comment thread src/core/resolver/hb_message.erl Outdated
CommitmentID,
Commitment =
#{
<<"commitment-device">> := <<"httpsig@1.0">>,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Errr...?!?!! 😁

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should it search for the right device to call to verify?

unclaimed -> unclaimed;
NativeAddress -> hb_util:human_id(NativeAddress)
end,
EncOperator == unclaimed orelse lists:member(EncOperator, RequestSigners).

@samcamwilliams samcamwilliams Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Alternate for the complete patch, perhaps:

    EncOperator == unclaimed orelse
        (lists:member(EncOperator, RequestSigners)
            andalso hb_message:verify(Request, #{ <<"committers">> => RequestSigners }, Opts))

If I remember the API correctly 😅

@speeddragon speeddragon Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clanker suggested the verified_committers method, which allows specifying specific keys to be signed. This gives us control over which fields we need to make sure are signed, instead of a generic sign of a partial message.

On update node config, it checks if all configs were signed by the node operator. On is_operator request, since no key is given, it is just a normal hb_message:verify call.

Comment thread src/core/resolver/hb_message.erl Outdated
Co-authored-by: speeddragon <speeddragon@gmail.com>
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.

3 participants