You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "mintao (Code Review)" <ge...@cloudera.org> on 2026/09/14 03:35:02 UTC

[kudu-CR] [tests] Add proxy user integration coverage

Hello Zoltan Chovan, Alexey Serbin,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/24829

to review the following change.


Change subject: [tests] Add proxy user integration coverage
......................................................................

[tests] Add proxy user integration coverage

SecurityITest.ProxyUser exercises the full path against a Kerberized
mini cluster with --rpc-authentication=required: a client
authenticated as 'proxy-service' acts as 'proxy-target', the created
table is owned by the effective user, reads and writes succeed, and a
request for an effective user that is not in the proxy user ACL fails
closed.

Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
---
M src/kudu/integration-tests/security-itest.cc
1 file changed, 48 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/24829/1
-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 1
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has uploaded a new patch set (#5) to the change originally created by mintao. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................

KUDU-3586 [tests] Add proxy user integration coverage

SecurityITest.ProxyUser exercises the full path against a Kerberized
mini cluster: a client authenticated as 'proxy-service' acts as
'proxy-target', reads and writes succeed, and created tables are owned
by the effective user. The proxy service account is not in --user_acl,
which shows that the ACL is checked against the effective user.

The credentials exported by the proxied client are imported by a client
without Kerberos credentials, which then acts as 'proxy-target' as well.

A request for an effective user that is in --user_acl but not in the
proxy user ACL fails with NotAuthorized and the reason from the server,
without retrying.

SecurityITest.ProxyUserRules covers a group rule, using the current OS
user and its primary group since the servers resolve groups through the
local operating system, the rejection by a host rule, and a real user
without any proxy rule.

SecurityITest.ProxyUserIdentityAtTabletServers shows that the tablet
servers authorize the writes of a proxied client as the effective user,
while the same writes as the proxy service account are rejected. It also
shows that a proxied client does not authenticate with its authn token:
once its Kerberos ticket is gone, it can no longer connect to tablet
servers, unlike a client acting as itself.

Co-authored-by: hzmintao <mi...@gmail.com>
Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
---
M src/kudu/integration-tests/security-itest.cc
1 file changed, 217 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/24829/5
-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 5
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 7:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3243/


-- 
To view, visit https://gerrit.cloudera.org/24829
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 7
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 03 Nov 2026 17:15:51 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 5:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3213/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 5
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2026 13:24:41 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 7: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/3243/ : FAILURE


-- 
To view, visit https://gerrit.cloudera.org/24829
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 7
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 03 Nov 2026 18:45:39 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 2:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3156/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 2
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 26 Oct 2026 13:41:15 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 6:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3222/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 6
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2026 13:46:06 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 1: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/2955/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 1
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 14 Sep 2026 04:25:15 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24829/1/src/kudu/integration-tests/security-itest.cc
File src/kudu/integration-tests/security-itest.cc:

http://gerrit.cloudera.org:8080/#/c/24829/1/src/kudu/integration-tests/security-itest.cc@398
PS1, Line 398: ASSERT_FALSE(s.ok());
I think this assertion is a bit weak. Any sort of problem would pass here, not just auth rejection. Using ASSERT_TRUE(s.IsNotAuthorized()) << s.ToString(); would match the convention established by previous tests.

Also maybe using an effective user that is in --user_acl but not in --proxy_user_acl, would give a clearer view of the rejection's context. Since "proxy-denied" is in neither, the error could come from during negotiation (the proxy authoriser) or during operation, so the ValidateProxyUser is not the only gate that is being tested.



-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 1
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Sep 2026 11:40:37 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 3:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3171/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 3
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 12:58:20 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 6: Verified+1

Build Successful 

http://jenkins.kudu.apache.org/job/pre_commit/3222/ : SUCCESS


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 6
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2026 16:15:52 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 4:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/3182/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 4
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 14:33:06 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 4:

(4 comments)

Missing tests:
- host-rule rejection (e.g. proxy-service=10.0.0.0/8 while connecting from 127.0.0.1)
- a group rule
- a real user with no rule at all
- a tserver-side check that the effective user is the one seen there
- the token is not reused: kdestroy after Build(), force a reconnect, expect failure

http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc
File src/kudu/integration-tests/security-itest.cc:

http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@356
PS4, Line 356: cluster_opts_.extra_master_flags.emplace_back("--rpc-authentication=required");
             :   cluster_opts_.extra_tserver_flags.emplace_back("--rpc-authentication=required");
Not needed: the Kerberized external mini cluster already sets --rpc_authentication=required.


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@358
PS4, Line 358: cluster_opts_.extra_master_flags.emplace_back("--user_acl=test-user,proxy-target,proxy-service");
             :   cluster_opts_.extra_tserver_flags.emplace_back("--user_acl=test-user,proxy-target,proxy-service");
Drop proxy-service from --user_acl so the test proves --user_acl is checked against the effective user.


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@375
PS4, Line 375:             .add_master_server_addr(cluster_->master(0)->bound_rpc_addr().ToString())
Consider cluster_->CreateClient(&builder, ...) and SmokeTestCluster() like the rest of this file.


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@401
PS4, Line 401:   ASSERT_TRUE(s.IsNotAuthorized()) << s.ToString();
Does this pass? With the proxy check after the connection context, I'd expect TimedOut/NetworkError here. Please also ASSERT_STR_CONTAINS 'not allowed to act as target user'.



-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 4
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 15:03:21 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 1:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/2955/


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 1
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 14 Sep 2026 03:35:04 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3586 [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: KUDU-3586 [tests] Add proxy user integration coverage
......................................................................


Patch Set 5: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/3213/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 5
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2026 13:28:53 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 4: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/3182/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 4
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 17:22:42 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 3: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/3171/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 3
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 13:10:06 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 4:

(4 comments)

Missing tests:
* Added SecurityITest.ProxyUserRules: a group rule (the current OS user and its primary group, since the servers resolve groups through NSS), a host-rule rejection ('remote-proxy' is only allowed from 10.0.0.0/8), and a real user with no rule at all. 
* Added SecurityITest.ProxyUserIdentityAtTabletServers: the tablet servers' --user_acl leaves out 'proxy-service' and the masters' doesn't, so writes as 'proxy-service' are rejected by the tablet servers while proxied writes succeed. It also checks that the token is not reused: after kdestroy, a proxied client can't connect to tablet servers ("client does not have Kerberos credentials available"), while a client acting as itself still can with its token.

http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc
File src/kudu/integration-tests/security-itest.cc:

http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@356
PS4, Line 356: cluster_opts_.extra_master_flags.emplace_back("--rpc-authentication=required");
             :   cluster_opts_.extra_tserver_flags.emplace_back("--rpc-authentication=required");
> Not needed: the Kerberized external mini cluster already sets --rpc_authent
Done


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@358
PS4, Line 358: cluster_opts_.extra_master_flags.emplace_back("--user_acl=test-user,proxy-target,proxy-service");
             :   cluster_opts_.extra_tserver_flags.emplace_back("--user_acl=test-user,proxy-target,proxy-service");
> Drop proxy-service from --user_acl so the test proves --user_acl is checked
Done


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@375
PS4, Line 375:             .add_master_server_addr(cluster_->master(0)->bound_rpc_addr().ToString())
> Consider cluster_->CreateClient(&builder, ...) and SmokeTestCluster() like 
Done


http://gerrit.cloudera.org:8080/#/c/24829/4/src/kudu/integration-tests/security-itest.cc@401
PS4, Line 401:   ASSERT_TRUE(s.IsNotAuthorized()) << s.ToString();
> Does this pass? With the proxy check after the connection context, I'd expe
It didn't pass before; it does now that the denial is reported (see 24826). Added the ASSERT_STR_CONTAINS. Also added an export/import round trip through a client without Kerberos credentials.



-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 4
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2026 13:24:17 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................


Patch Set 2: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/3156/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 2
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 26 Oct 2026 14:29:32 +0000
Gerrit-HasComments: No

[kudu-CR] [tests] Add proxy user integration coverage

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has uploaded a new patch set (#2) to the change originally created by mintao. ( http://gerrit.cloudera.org:8080/24829 )

Change subject: [tests] Add proxy user integration coverage
......................................................................

[tests] Add proxy user integration coverage

SecurityITest.ProxyUser exercises the full path against a Kerberized
mini cluster with --rpc-authentication=required: a client
authenticated as 'proxy-service' acts as 'proxy-target', the created
table is owned by the effective user, reads and writes succeed, and a
request for an effective user that is not in the proxy user ACL fails
closed.

Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
---
M src/kudu/integration-tests/security-itest.cc
1 file changed, 51 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/24829/2
-- 
To view, visit http://gerrit.cloudera.org:8080/24829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibe7178c9d659a9a0018f39c0d29258f5dc602a82
Gerrit-Change-Number: 24829
Gerrit-PatchSet: 2
Gerrit-Owner: mintao <mi...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>