-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add AWS delegated authentication support #1112
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
20 commits
Select commit
Hold shift + click to select a range
53d69ae
chore: improve code readability in delegated_auth module
jchrostek-dd fa5ce7d
feat: add AWS delegated authentication support
jchrostek-dd dec589e
fix: replace unwrap() with expect() in auth_proof tests
jchrostek-dd 085cb3e
fix: align delegated auth proof format with agent implementation
jchrostek-dd ea78f37
chore: clean up delegated auth integration tests
jchrostek-dd 45c1555
refactor: rename delegated-auth tests to auth
jchrostek-dd fc65ceb
chore: remove dead config, redact sensitive logs, clean up comments
jchrostek-dd 619ea0a
fix: replace unwrap/unwrap_err with expect in tests for clippy
jchrostek-dd 862bae7
feat: add SnapStart Java function to auth integration tests
jchrostek-dd 2cbbb58
style: fix cargo fmt line length in test
jchrostek-dd becd6ca
refactor: rename org_uuid to dd_org_uuid, remove redundant comments
jchrostek-dd 75c1e1e
refactor: move delegated_auth under secrets, add shared auth role and…
jchrostek-dd 951b6ee
style: fix import ordering for cargo fmt
jchrostek-dd 750d195
chore: remove auth role stack deployment from CI pipeline
jchrostek-dd f4224e6
chore: remove module doc comments inconsistent with codebase style
jchrostek-dd b047987
fix: use publishVersion for SnapStart Java in auth test
jchrostek-dd cd13a3c
chore: fetch SERVERLESS_UUID from Vault instead of SSM
jchrostek-dd 4f3f4da
chore: hardcode org UUID in auth stack, remove SERVERLESS_UUID from CI
jchrostek-dd cdfac99
refactor: address PR review comments on delegated auth
jchrostek-dd d5fa0f7
refactor: consolidate secret resolution, extract get_aws_credentials …
jchrostek-dd 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 |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ test_suites: | |
| - name: otlp | ||
| - name: snapstart | ||
| - name: lmi | ||
| - name: auth | ||
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 |
|---|---|---|
|
|
@@ -482,6 +482,12 @@ pub struct EnvConfig { | |
| /// The delay between two samples of the API Security schema collection, in seconds. | ||
| #[serde(deserialize_with = "deserialize_optional_duration_from_seconds")] | ||
| pub api_security_sample_delay: Option<Duration>, | ||
|
|
||
| /// @env `DD_ORG_UUID` | ||
| /// | ||
| /// The Datadog organization UUID. When set, delegated auth is auto-enabled. | ||
| #[serde(deserialize_with = "deserialize_string_or_int")] | ||
| pub org_uuid: Option<String>, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make sure we add this code in serverless-components agent config crate
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| #[allow(clippy::too_many_lines)] | ||
|
|
@@ -684,6 +690,8 @@ fn merge_config(config: &mut Config, env_config: &EnvConfig) { | |
| merge_option_to_value!(config, env_config, appsec_waf_timeout); | ||
| merge_option_to_value!(config, env_config, api_security_enabled); | ||
| merge_option_to_value!(config, env_config, api_security_sample_delay); | ||
|
|
||
| merge_string!(config, dd_org_uuid, env_config, org_uuid); | ||
| } | ||
|
|
||
| #[derive(Debug, PartialEq, Clone, Copy)] | ||
|
|
@@ -1044,6 +1052,8 @@ mod tests { | |
| appsec_waf_timeout: Duration::from_secs(1), | ||
| api_security_enabled: false, | ||
| api_security_sample_delay: Duration::from_secs(60), | ||
|
|
||
| dd_org_uuid: String::default(), | ||
| }; | ||
|
|
||
| assert_eq!(config, expected_config); | ||
|
|
||
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.
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.
client and
shared_clientnaming is confusing, we should make it more clear what each of them does now that its being created at the very top