Skip to content

RUST-2235 Implement GSSAPI auth support for Linux and macOS #1413

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

Merged
merged 32 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b1f648f
RUST-2235: Initial Devin code
mattChiaravalloti Jun 24, 2025
9789819
RUST-2235: Update auth spec tests to guard GSSAPI tests behind featur…
mattChiaravalloti Jun 24, 2025
e406e16
RUST-2235: Clean up options and client/auth
mattChiaravalloti Jun 24, 2025
50aa9d9
RUST-2235: Fix warnings
mattChiaravalloti Jun 30, 2025
9267940
RUST-2235: Clean up gssapi.rs and include debug code for further testing
mattChiaravalloti Jul 1, 2025
43a4472
RUST-2235: Update wrap_unwrap
mattChiaravalloti Jul 2, 2025
774375a
RUST-2235: Update final wrap step to use proper starting bytes
mattChiaravalloti Jul 7, 2025
9e6e38d
RUST-2235: Clean up gssapi auth code
mattChiaravalloti Jul 7, 2025
7e040aa
RUST-2235: Clean up canonicalize_hostname
mattChiaravalloti Jul 8, 2025
3134bb6
RUST-2235: Fix api calls after rebase
mattChiaravalloti Jul 8, 2025
f323fe1
RUST-2235: Update constants
mattChiaravalloti Jul 8, 2025
e175e2e
RUST-2235: Combine new and init
mattChiaravalloti Jul 8, 2025
de0c4b7
SQL-2235: Properly alphabetize Cargo.toml
mattChiaravalloti Jul 9, 2025
3fec2d9
SQL-2235: Update compile-only task to include gssapi feature flag
mattChiaravalloti Jul 9, 2025
8ef6097
RUST-2235: Update Cargo.lock
mattChiaravalloti Jul 9, 2025
13a6878
RUST-2235: Properly update Cargo.lock
mattChiaravalloti Jul 9, 2025
fafc56f
RUST-2235: Update tests to run with gssapi-auth feature enabled
mattChiaravalloti Jul 9, 2025
934f0f4
RUST-2235: Fix rustfmt failures
mattChiaravalloti Jul 9, 2025
5f5722c
RUST-2235: Address clippy failures
mattChiaravalloti Jul 9, 2025
58b928e
RUST-2235: Update format calls to place args in brackets
mattChiaravalloti Jul 16, 2025
85ec312
RUST-2235: Update OIDC authSource error message to be consistent with…
mattChiaravalloti Jul 16, 2025
841778b
RUST-2235: Bump MSRV to 1.82.0
mattChiaravalloti Jul 16, 2025
293aa3b
RUST-2235: Update tests to not include gssapi-auth flag by default, a…
mattChiaravalloti Jul 16, 2025
b567aca
RUST-2235: Update canonicalize_hostname to use hickory-resolver inste…
mattChiaravalloti Jul 16, 2025
4d881d1
RUST-2235: Rustfmt fixes
mattChiaravalloti Jul 16, 2025
8962623
RUST-2235: Update lingering 1.81 ref to 1.82
mattChiaravalloti Jul 16, 2025
baedad7
Merge branch 'main' into RUST-2235
mattChiaravalloti Jul 16, 2025
66f0f3b
RUST-2235: Fix lint failures
mattChiaravalloti Jul 16, 2025
0cd9f3a
RUST-2235: Remove outdated comments
mattChiaravalloti Jul 17, 2025
efe0fcb
RUST-2235: Pipe resolver_config through to canonicalize_hostname
mattChiaravalloti Jul 17, 2025
9de2999
RUST-2235: Clean up gssapi-auth and dns-lookup feature coupling
mattChiaravalloti Jul 17, 2025
23aacbb
RUST-2235: Fix feature flags and address clippy and rustfmt failures
mattChiaravalloti Jul 17, 2025
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
2 changes: 1 addition & 1 deletion .evergreen/aws-lambda-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To deploy the application, you need the folllowing tools:

* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)
* Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community)
* [Rust](https://www.rust-lang.org/) version 1.81.0 or newer
* [Rust](https://www.rust-lang.org/) version 1.82.0 or newer
* [cargo-lambda](https://github.com/cargo-lambda/cargo-lambda) for cross-compilation

To build and deploy your application for the first time, run the following in your shell:
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/compile-only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cargo $TOOLCHAIN build

# Test with all features.
if [ "$RUST_VERSION" != "" ]; then
cargo $TOOLCHAIN build --features openssl-tls,sync,aws-auth,zlib-compression,zstd-compression,snappy-compression,in-use-encryption,tracing-unstable
cargo $TOOLCHAIN build --features openssl-tls,sync,aws-auth,gssapi-auth,zlib-compression,zstd-compression,snappy-compression,in-use-encryption,tracing-unstable
else
cargo $TOOLCHAIN build --all-features
fi
Expand Down
25 changes: 24 additions & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ buildvariants:
# Limit the test to only schedule every 14 days to reduce external resource usage.
batchtime: 20160

- name: gssapi-auth
display_name: "GSSAPI Authentication"
patchable: true
run_on:
- ubuntu2004-small
tasks:
- test-gssapi-auth

- name: x509-auth
display_name: "x509 Authentication"
patchable: false
Expand Down Expand Up @@ -772,7 +780,7 @@ tasks:
- func: "compile only"
vars:
# Our minimum supported Rust version. This should be updated whenever the MSRV is bumped.
RUST_VERSION: 1.81.0
RUST_VERSION: 1.82.0

- name: check-cargo-deny
commands:
Expand Down Expand Up @@ -924,6 +932,10 @@ tasks:
vars:
AWS_ROLE_SESSION_NAME: test

- name: test-gssapi-auth
commands:
- func: "run gssapi auth test"

- name: test-atlas-connectivity
commands:
- func: "run atlas tests"
Expand Down Expand Up @@ -1376,6 +1388,17 @@ functions:
env:
AWS_AUTH_TYPE: web-identity

"run gssapi auth test":
- command: subprocess.exec
type: test
params:
binary: bash
working_dir: ${PROJECT_DIRECTORY}
args:
- .evergreen/run-gssapi-tests.sh
include_expansions_in_env:
- PROJECT_DIRECTORY

"run x509 tests":
- command: shell.exec
type: test
Expand Down
20 changes: 20 additions & 0 deletions .evergreen/run-gssapi-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -o xtrace
set -o errexit # Exit the script with error if any of the commands fail

echo "Running MONGODB-GSSAPI authentication tests"

cd ${PROJECT_DIRECTORY}
source .evergreen/env.sh
source .evergreen/cargo-test.sh

FEATURE_FLAGS+=("gssapi-auth")

set +o errexit

cargo_test spec::auth
cargo_test uri_options
cargo_test connection_string

exit $CARGO_RESULT
179 changes: 179 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading