Skip to content

node: send certificates for inter-node TLS connections - #4097

Merged
roman-khimov merged 1 commit into
masterfrom
internode-client-cert
Aug 6, 2026
Merged

node: send certificates for inter-node TLS connections#4097
roman-khimov merged 1 commit into
masterfrom
internode-client-cert

Conversation

@End-rey

@End-rey End-rey commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Closes #4088.

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.64912% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.24%. Comparing base (9e592e2) to head (2113b4b).

Files with missing lines Patch % Lines
pkg/services/object/server.go 20.83% 17 Missing and 2 partials ⚠️
pkg/network/cache/clients.go 21.42% 11 Missing ⚠️
pkg/network/peerauth/peerauth.go 70.00% 3 Missing and 3 partials ⚠️
pkg/services/object/acl/v2/service.go 85.18% 2 Missing and 2 partials ⚠️
cmd/neofs-node/config.go 0.00% 2 Missing ⚠️
internal/crypto/requests.go 86.66% 1 Missing and 1 partial ⚠️
cmd/neofs-node/grpc.go 0.00% 1 Missing ⚠️
cmd/neofs-node/mtls.go 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4097      +/-   ##
==========================================
+ Coverage   27.20%   27.24%   +0.04%     
==========================================
  Files         676      678       +2     
  Lines       46227    46282      +55     
==========================================
+ Hits        12576    12611      +35     
- Misses      32437    32453      +16     
- Partials     1214     1218       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@End-rey
End-rey force-pushed the internode-client-cert branch 2 times, most recently from 294c5f3 to d15b80b Compare July 31, 2026 13:25
Comment thread cmd/neofs-node/mtls.go
Comment thread pkg/services/object/common/request.go Outdated
Comment thread pkg/services/object/server.go Outdated
Comment thread pkg/services/object/server.go Outdated
@End-rey
End-rey force-pushed the internode-client-cert branch from d15b80b to 1d9c14f Compare August 4, 2026 15:59
GetMetaHeader() *protosession.RequestMetaHeader
GetVerifyHeader() *protosession.RequestVerificationHeader
}, tokens common.RequestTokens) (user.ID, []byte, error) {
if req.GetVerifyHeader() == nil && req.GetMetaHeader().GetTtl() == 1 {

@carpawell carpawell Aug 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is so special about TTL? what if req.GetVerifyHeader() == nil and TTL == 2? isnt such a request still a possible Node-Node? can you point me, please, to a place where non-container node sends a node-to-node request with TTL=2?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can you point me, please, to a place where non-container node sends a node-to-node request with TTL=2? (i guess)

There is no such path in the current object service. A request with TTL=2 may arrive from a client at a non-container node, but when this node forwards it to a container node, it creates a new request with TTL=1. Thus, all node-to-node requests produced by the forwarding paths use TTL=1. TLS authentication replaces request signatures only for this final local hop; unsigned requests with TTL>1 are not trusted as forwarded requests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unsigned requests with TTL>1 are not trusted as forwarded requests.

The key. We can't forward unsigned requests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if it is strictly prohibited, i suggest returning a clear error message. currently, an empty verify header with TTL=2 just skips this branch, and it will fail later casually, like a request with no verification header (even if a client tried to use TLS correctly and just used TTL=2 for some reason)

Comment thread pkg/services/object/server.go Outdated
@End-rey
End-rey force-pushed the internode-client-cert branch from 1d9c14f to 2113b4b Compare August 5, 2026 14:06
Request client certificates on TLS endpoints and use their keys to authenticate
unsigned one-hop object requests.

Closes #4088.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@roman-khimov
roman-khimov merged commit 2a105d3 into master Aug 6, 2026
22 checks passed
@roman-khimov
roman-khimov deleted the internode-client-cert branch August 6, 2026 12:38
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.

Send client certificate when connecting to another SN

3 participants