-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implement OIDC SASL mechanism in sync #1107
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f6ce5d5
Add unified test data
katcharov 23db52b
Scripts
katcharov db2880d
Implement OIDC auth for sync
katcharov 6d4b3ae
PR fixes: naming, re-entrancy
katcharov 30c4327
PR fixes
katcharov f40e66f
PR fixes, remove TODOs
katcharov 02eecef
PR fix: cannot check re-entry
katcharov 1f03603
Apply suggestions from code review
katcharov c6c8e14
Apply suggestions from code review
katcharov de08e34
temp
katcharov 198b7f5
PR FIxes
katcharov c1c7a50
PR fixes
katcharov a76c7dc
Implement reauthenticate, for spec tests
katcharov feab34d
PR Fixes
katcharov 537bead
PR test fixes
katcharov 9f38271
PR Fixes
katcharov 4d7f3c9
PR fixes
katcharov 216af3b
PR fix
katcharov 32fc2eb
Apply suggestions from code review
katcharov 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
set -o xtrace | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
############################################ | ||
# Main Program # | ||
############################################ | ||
|
||
# Supported/used environment variables: | ||
# DRIVERS_TOOLS The path to evergreeen tools | ||
# OIDC_AWS_* Required OIDC_AWS_* env variables must be configured | ||
# | ||
# Environment variables used as output: | ||
# OIDC_TESTS_ENABLED Allows running OIDC tests | ||
# OIDC_TOKEN_DIR The path to generated OIDC AWS tokens | ||
# AWS_WEB_IDENTITY_TOKEN_FILE The path to AWS token for device workflow | ||
|
||
if [ -z ${DRIVERS_TOOLS+x} ]; then | ||
echo "DRIVERS_TOOLS. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_ROLE_ARN+x} ]; then | ||
echo "OIDC_AWS_ROLE_ARN. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_SECRET_ACCESS_KEY+x} ]; then | ||
echo "OIDC_AWS_SECRET_ACCESS_KEY. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_ACCESS_KEY_ID+x} ]; then | ||
echo "OIDC_AWS_ACCESS_KEY_ID. is not set"; | ||
exit 1 | ||
fi | ||
|
||
export AWS_ROLE_ARN=${OIDC_AWS_ROLE_ARN} | ||
export AWS_SECRET_ACCESS_KEY=${OIDC_AWS_SECRET_ACCESS_KEY} | ||
export AWS_ACCESS_KEY_ID=${OIDC_AWS_ACCESS_KEY_ID} | ||
export OIDC_FOLDER=${DRIVERS_TOOLS}/.evergreen/auth_oidc | ||
export OIDC_TOKEN_DIR=${OIDC_FOLDER}/test_tokens | ||
export AWS_WEB_IDENTITY_TOKEN_FILE=${OIDC_TOKEN_DIR}/test1 | ||
export OIDC_TESTS_ENABLED=true | ||
|
||
echo "Configuring OIDC server for local authentication tests" | ||
|
||
cd ${OIDC_FOLDER} | ||
DRIVERS_TOOLS=${DRIVERS_TOOLS} ./oidc_get_tokens.sh |
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,50 @@ | ||
#!/bin/bash | ||
|
||
set -o xtrace | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
############################################ | ||
# Main Program # | ||
############################################ | ||
|
||
# Supported/used environment variables: | ||
# DRIVERS_TOOLS The path to evergreeen tools | ||
# OIDC_AWS_* OIDC_AWS_* env variables must be configured | ||
# | ||
# Environment variables used as output: | ||
# OIDC_TESTS_ENABLED Allows running OIDC tests | ||
# OIDC_TOKEN_DIR The path to generated tokens | ||
# AWS_WEB_IDENTITY_TOKEN_FILE The path to AWS token for device workflow | ||
|
||
if [ -z ${DRIVERS_TOOLS+x} ]; then | ||
echo "DRIVERS_TOOLS. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_ROLE_ARN+x} ]; then | ||
echo "OIDC_AWS_ROLE_ARN. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_SECRET_ACCESS_KEY+x} ]; then | ||
echo "OIDC_AWS_SECRET_ACCESS_KEY. is not set"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${OIDC_AWS_ACCESS_KEY_ID+x} ]; then | ||
echo "OIDC_AWS_ACCESS_KEY_ID. is not set"; | ||
exit 1 | ||
fi | ||
|
||
export AWS_ROLE_ARN=${OIDC_AWS_ROLE_ARN} | ||
export AWS_SECRET_ACCESS_KEY=${OIDC_AWS_SECRET_ACCESS_KEY} | ||
export AWS_ACCESS_KEY_ID=${OIDC_AWS_ACCESS_KEY_ID} | ||
export OIDC_FOLDER=${DRIVERS_TOOLS}/.evergreen/auth_oidc | ||
export OIDC_TOKEN_DIR=${OIDC_FOLDER}/test_tokens | ||
export AWS_WEB_IDENTITY_TOKEN_FILE=${OIDC_TOKEN_DIR}/test1 | ||
export OIDC_TESTS_ENABLED=true | ||
|
||
echo "Configuring OIDC server for local authentication tests" | ||
|
||
cd ${OIDC_FOLDER} | ||
DRIVERS_TOOLS=${DRIVERS_TOOLS} ./start_local_server.sh |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.