Skip to content

Commit d750b6c

Browse files
RUST-2235 Implement GSSAPI auth support for Linux and macOS (#1413)
1 parent e45fa1f commit d750b6c

File tree

23 files changed

+760
-39
lines changed

23 files changed

+760
-39
lines changed

.evergreen/aws-lambda-test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To deploy the application, you need the folllowing tools:
3333

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

3939
To build and deploy your application for the first time, run the following in your shell:

.evergreen/compile-only.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cargo $TOOLCHAIN build
1717

1818
# Test with all features.
1919
if [ "$RUST_VERSION" != "" ]; then
20-
cargo $TOOLCHAIN build --features openssl-tls,sync,aws-auth,zlib-compression,zstd-compression,snappy-compression,in-use-encryption,tracing-unstable
20+
cargo $TOOLCHAIN build --features openssl-tls,sync,aws-auth,gssapi-auth,zlib-compression,zstd-compression,snappy-compression,in-use-encryption,tracing-unstable
2121
else
2222
cargo $TOOLCHAIN build --all-features
2323
fi

.evergreen/config.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ buildvariants:
257257
# Limit the test to only schedule every 14 days to reduce external resource usage.
258258
batchtime: 20160
259259

260+
- name: gssapi-auth
261+
display_name: "GSSAPI Authentication"
262+
patchable: true
263+
run_on:
264+
- ubuntu2004-small
265+
tasks:
266+
- test-gssapi-auth
267+
260268
- name: x509-auth
261269
display_name: "x509 Authentication"
262270
patchable: false
@@ -772,7 +780,7 @@ tasks:
772780
- func: "compile only"
773781
vars:
774782
# Our minimum supported Rust version. This should be updated whenever the MSRV is bumped.
775-
RUST_VERSION: 1.81.0
783+
RUST_VERSION: 1.82.0
776784

777785
- name: check-cargo-deny
778786
commands:
@@ -924,6 +932,10 @@ tasks:
924932
vars:
925933
AWS_ROLE_SESSION_NAME: test
926934

935+
- name: test-gssapi-auth
936+
commands:
937+
- func: "run gssapi auth test"
938+
927939
- name: test-atlas-connectivity
928940
commands:
929941
- func: "run atlas tests"
@@ -1376,6 +1388,17 @@ functions:
13761388
env:
13771389
AWS_AUTH_TYPE: web-identity
13781390

1391+
"run gssapi auth test":
1392+
- command: subprocess.exec
1393+
type: test
1394+
params:
1395+
binary: bash
1396+
working_dir: ${PROJECT_DIRECTORY}
1397+
args:
1398+
- .evergreen/run-gssapi-tests.sh
1399+
include_expansions_in_env:
1400+
- PROJECT_DIRECTORY
1401+
13791402
"run x509 tests":
13801403
- command: shell.exec
13811404
type: test

.evergreen/run-gssapi-tests.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -o xtrace
4+
set -o errexit # Exit the script with error if any of the commands fail
5+
6+
echo "Running MONGODB-GSSAPI authentication tests"
7+
8+
cd ${PROJECT_DIRECTORY}
9+
source .evergreen/env.sh
10+
source .evergreen/cargo-test.sh
11+
12+
FEATURE_FLAGS+=("gssapi-auth")
13+
14+
set +o errexit
15+
16+
cargo_test spec::auth
17+
cargo_test uri_options
18+
cargo_test connection_string
19+
20+
exit $CARGO_RESULT

Cargo.lock

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)