Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GSS-API frontend auth - Kerberos #657

Merged
merged 50 commits into from
May 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
af92d8b
add gss auth like in cockroach db
NitroLine Feb 1, 2024
472459b
add gss auth from gokrb5
NitroLine May 11, 2024
fa4f450
replace spengo with krb
NitroLine May 11, 2024
84848a1
fix nill pointer settings
NitroLine May 11, 2024
2177dbf
fix some lint
NitroLine May 11, 2024
3d897a9
remove some unused
NitroLine May 11, 2024
3c638a1
fix lint
NitroLine May 11, 2024
02f3ff3
add check realm and include realm
NitroLine May 17, 2024
c97bd3b
try fix lint
NitroLine May 17, 2024
1f88c8c
add cfg with gss auth
NitroLine May 17, 2024
95c84e4
try add kerberos test
NitroLine May 20, 2024
0b43538
try fix router update
NitroLine May 20, 2024
b1f1372
fix conf kdc path
NitroLine May 20, 2024
90f9f44
fix conf kdc path
NitroLine May 20, 2024
b6a87b7
fix start.sh
NitroLine May 20, 2024
17cfaff
add volume to router 2
NitroLine May 20, 2024
cb59171
fix router cfg
NitroLine May 20, 2024
625fe90
add missmatch error
NitroLine May 20, 2024
f3e63ec
remove pool mode
NitroLine May 20, 2024
d28a31e
change gss check
NitroLine May 20, 2024
e3fe48e
remove pool mode
NitroLine May 20, 2024
7b97461
remove pool mode
NitroLine May 20, 2024
b1c2038
add shard3
NitroLine May 20, 2024
f1b77ff
hack not check shard3
NitroLine May 20, 2024
5e4a5d4
hack not check shard3
NitroLine May 20, 2024
405898e
fix cfg
NitroLine May 20, 2024
ab82c5a
try fix run two commands
NitroLine May 20, 2024
dadeb3a
run commands?
NitroLine May 20, 2024
0d830b0
change start.sh
NitroLine May 20, 2024
1720a9f
fix kdc for test
NitroLine May 20, 2024
e9ccbdf
try fix parse from context
NitroLine May 20, 2024
fe80df9
fix realm config
NitroLine May 20, 2024
67e8671
add new step implements
NitroLine May 21, 2024
6c24d39
add new step implements
NitroLine May 21, 2024
e928137
try check kinit works
NitroLine May 21, 2024
28398ec
try check kinit works
NitroLine May 21, 2024
0699a5a
add healthcheck to kdc
NitroLine May 21, 2024
e2da512
test ci
NitroLine May 21, 2024
579423c
add logs | try two commands
NitroLine May 21, 2024
9a741bd
print output
NitroLine May 21, 2024
b167e2d
try add sleep
NitroLine May 21, 2024
66161f4
fix volumes
NitroLine May 21, 2024
f06c15b
add depends on to shard3
NitroLine May 21, 2024
7eb8377
healthcheck fix
NitroLine May 21, 2024
6138e2a
Merge branch 'master' into gss-krb-auth
NitroLine May 24, 2024
d29af7f
remove shard 3 | add usr to backend auth_rule
NitroLine May 24, 2024
e00194b
fix db name
NitroLine May 24, 2024
4b52854
fix config pool mode
NitroLine May 24, 2024
ebe23a7
add usr to shard2
NitroLine May 24, 2024
fdaee9e
simplify install and remove logs print
NitroLine May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add logs | try two commands
NitroLine committed May 21, 2024
commit 579423cff66225712f96ecec341d8d4c29a99535
19 changes: 14 additions & 5 deletions test/feature/features/krb_auth.feature
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
Feature: GSS Kerberos 5 auth test
Scenario: Kerberos works
Scenario: Frontend auth works
Given cluster environment is
"""
ROUTER_CONFIG=/spqr/test/feature/conf/router_with_gss_frontend.yaml
"""
Given cluster is up and running
When I run commands on host "router"
"""
echo psql
kinit tester <<<'psql'
psql -c "SELECT 1" -d regress -U tester -p 6432 -h localhost
"""
Then command return code should be "0"
And command output should match regexp
"""
1
"""

Scenario: Frontend auth works
Scenario: Kerberos works
Given cluster environment is
"""
ROUTER_CONFIG=/spqr/test/feature/conf/router_with_gss_frontend.yaml
"""
Given cluster is up and running
When I run commands on host "router"
When I run command on host "router"
"""
echo psql | kinit tester@MY.EX
"""
Then command return code should be "0"
When I run command on host "router"
"""
kinit tester <<<'psql'
psql -c "SELECT 1" -d regress -U tester -p 6432 -h localhost
"""
Then command return code should be "0"
5 changes: 5 additions & 0 deletions test/feature/spqr_test.go
Original file line number Diff line number Diff line change
@@ -703,6 +703,11 @@ func (tctx *testContext) stepIRunCommandsOnHost(host string, body *godog.DocStri
cmd := strings.TrimSpace(command)
var err error
lastRetCode, lastOutput, err = tctx.composer.RunCommand(host, cmd, commandExecutionTimeout)
if lastRetCode != 0 {
log.Println("Get non zero code from command")
log.Println(cmd)
log.Println(lastRetCode)
}
if err != nil {
tctx.commandRetcode = lastRetCode
tctx.commandOutput = lastOutput