Skip to content

DRIVERS-2585 Use AWS Secrets Manager for CSFLE #390

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 65 commits into from
Jan 29, 2024

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Jan 17, 2024

Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise looks good!

$DRIVERS_TOOLS/.evergreen/csfle/stop_servers.sh
```

It is recommended that you start the servers in the background, and then use the `await_servers.sh` script.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does await_servers.sh do? The instructions above suggest that I run setup_secrets.sh and then start_servers.sh, do I run start_servers.sh in the background?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Python driver, we can start it in the foreground because it is part of the same task. In the Go example, which is probably more common, the servers are started in a separate task, and await_servers.sh is used to wait for them before running the test scripts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clarified in the readme.


## Legacy Usage

The legacy usage involved putting the required secrets in EVG Project config, and using several steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using -> used for tense consistency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@blink1073 blink1073 requested a review from NoahStapp January 19, 2024 02:29
Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final clarity change, otherwise good!

$DRIVERS_TOOLS/.evergreen/csfle/stop_servers.sh
```

If you are starting your CSFLE servers in a separate task, it is recommended that you setup secrets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call out that "task" refers to an Evergreen task here for clarity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@blink1073 blink1073 requested a review from NoahStapp January 19, 2024 18:23
Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The efforts for simplifying test set-up are much appreciated.

@@ -60,4 +60,4 @@ def main():


if __name__ == "__main__":
main()
main()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add back newline? If using VS Code, the "Insert Final Newline" setting can add the newline automatically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

sleep 1

echo "Starting HTTP Server 1..."
python -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000 > http1.log 2>&1 &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@blink1073 blink1073 requested a review from kevinAlbs January 24, 2024 20:55
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike other executable files in this folder, this one doesn't have the executable bit set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a timeout bump.

$DRIVERS_TOOLS/.evergreen/csfle/stop_servers.sh
```

If you are starting your CSFLE servers in a separate Evergreen task, it is recommended that you setup secrets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are starting your CSFLE servers in a separate Evergreen task, it is recommended that you setup secrets
If you are starting your CSFLE servers in a separate Evergreen command, it is recommended that you setup secrets

And replace other "task" with "command" in this paragraph.

I expect the start-csfle-servers cannot be started in a separate Evergreen task from the test task. An Evergreen task may be scheduled on a different host from other tasks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think "function" is the correct word.

@blink1073
Copy link
Member Author

@alcaeus good to go?

@blink1073 blink1073 merged commit 4393c28 into mongodb-labs:master Jan 29, 2024
@blink1073 blink1073 deleted the kmip-server-scripts branch February 6, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants