-
Notifications
You must be signed in to change notification settings - Fork 95
GSSAPI #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jaggederest
wants to merge
18
commits into
main
Choose a base branch
from
feat/gssapi
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GSSAPI #479
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a5ee125
GSSAPI phase 1
jaggederest 42bdc27
gssapi phase 2
jaggederest 9279bfe
gssapi phase 3
jaggederest 0b3a898
gssapi phase 4
jaggederest 5f6841d
gssapi mostly working...
jaggederest ad4426d
working backend and frontend GSSAPI connections
jaggederest 89a4da5
a couple test fixes
jaggederest 0a5bc70
A few fixes (#480)
levkk c079ec5
minor test fixes
jaggederest be8af9a
merge origin/feat/gssapi into feat/gssapi
jaggederest 78a3c3c
feature flag gssapi tests, set up krb5 dependencies in ci
jaggederest 9037e92
try to create keytabs before integration tests
jaggederest afea619
progress towards tests
jaggederest e04b948
ci updates
jaggederest 0fe12a4
try the kdc setup verbosely
jaggederest 61baaf2
keytab script revamp
jaggederest 4b51890
try getting creds from keytab if cache fails
jaggederest 407f4fd
try again with the gssapi test setup
jaggederest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#!/bin/bash | ||
|
||
# Setup a minimal KDC for CI testing | ||
# This script is designed to run in GitHub Actions Ubuntu environment | ||
|
||
set -e | ||
|
||
echo "=========================================" | ||
echo "Setting up Kerberos KDC for CI" | ||
echo "=========================================" | ||
|
||
# Install Kerberos KDC packages | ||
echo "Installing Kerberos KDC packages..." | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
krb5-kdc \ | ||
krb5-admin-server \ | ||
krb5-config \ | ||
krb5-user \ | ||
libkrb5-dev | ||
|
||
# Define realm | ||
REALM="PGDOG.LOCAL" | ||
DOMAIN="pgdog.local" | ||
KDC_PASSWORD="admin123" | ||
|
||
# Create krb5.conf | ||
echo "Creating /etc/krb5.conf..." | ||
sudo tee /etc/krb5.conf > /dev/null << EOF | ||
[libdefaults] | ||
default_realm = $REALM | ||
dns_lookup_realm = false | ||
dns_lookup_kdc = false | ||
ticket_lifetime = 24h | ||
renew_lifetime = 7d | ||
forwardable = true | ||
|
||
[realms] | ||
$REALM = { | ||
kdc = localhost | ||
admin_server = localhost | ||
default_domain = $DOMAIN | ||
} | ||
|
||
[domain_realm] | ||
.$DOMAIN = $REALM | ||
$DOMAIN = $REALM | ||
localhost = $REALM | ||
|
||
[logging] | ||
kdc = FILE:/var/log/krb5kdc.log | ||
admin_server = FILE:/var/log/kadmin.log | ||
default = FILE:/var/log/krb5lib.log | ||
EOF | ||
|
||
# Create kdc.conf | ||
echo "Creating /etc/krb5kdc/kdc.conf..." | ||
sudo mkdir -p /etc/krb5kdc | ||
sudo tee /etc/krb5kdc/kdc.conf > /dev/null << EOF | ||
[kdcdefaults] | ||
kdc_ports = 88 | ||
kdc_tcp_ports = 88 | ||
|
||
[realms] | ||
$REALM = { | ||
acl_file = /etc/krb5kdc/kadm5.acl | ||
database_name = /var/lib/krb5kdc/principal | ||
key_stash_file = /etc/krb5kdc/.k5.$REALM | ||
max_renewable_life = 7d 0h 0m 0s | ||
max_life = 1d 0h 0m 0s | ||
master_key_type = aes256-cts-hmac-sha1-96 | ||
supported_enctypes = aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal | ||
default_principal_flags = +renewable, +forwardable | ||
} | ||
|
||
[logging] | ||
kdc = FILE:/var/log/krb5kdc.log | ||
admin_server = FILE:/var/log/kadmin.log | ||
EOF | ||
|
||
# Create ACL file | ||
echo "Creating /etc/krb5kdc/kadm5.acl..." | ||
sudo tee /etc/krb5kdc/kadm5.acl > /dev/null << EOF | ||
*/admin@$REALM * | ||
EOF | ||
|
||
# Initialize the database | ||
echo "Initializing Kerberos database..." | ||
sudo kdb5_util create -s -r $REALM -P $KDC_PASSWORD | ||
|
||
# Start the KDC | ||
echo "Starting KDC..." | ||
sudo systemctl start krb5-kdc || sudo krb5kdc | ||
sudo systemctl start krb5-admin-server || true | ||
|
||
# Create admin principal | ||
echo "Creating admin principal..." | ||
echo -e "$KDC_PASSWORD\n$KDC_PASSWORD" | sudo kadmin.local -q "addprinc admin/admin" | ||
|
||
# Verify KDC is running | ||
echo "Verifying KDC..." | ||
if sudo kadmin.local -q "listprincs" | grep -q "krbtgt/$REALM@$REALM"; then | ||
echo "✓ KDC is running and accessible" | ||
else | ||
echo "✗ KDC setup failed" | ||
exit 1 | ||
fi | ||
|
||
echo "=========================================" | ||
echo "KDC setup complete!" | ||
echo "Realm: $REALM" | ||
echo "=========================================" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have protobuf! We are finally complete