Skip to content

Conversation

@ianwow
Copy link
Contributor

@ianwow ianwow commented Apr 8, 2025

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

Currently, the S3 integration for prebid-server-java requires AWS credentials to be explicitly defined in the config yaml file. The SettingsConfiguration class in PBS Java uses AwsBasicCredentials to authenticate S3 requests, making credential storage in the YAML file mandatory. However, this is not good practice for credential management. This PR adds another credentials provider that will look for credentials in this order:

  • Java System Properties
  • Environment Variables
  • Web Identity Token
  • AWS credentials file (~/.aws/credentials)
  • ECS container credentials
  • EC2 instance profile

🧠 Rationale behind the change

So that S3 integration can be used with the recommended practices for AWS credential management.

🧪 Test plan

  • If accessKeyId and secretAccessKey are provided in the config yaml file, then verify that they are still used.
  • If they are not provided in the config yaml file, then verify that AWS credentials are found in the order described above.

🏎 Quality check

  • [ x ] Are your changes following our code style guidelines?
  • [ no ] Are there any breaking changes in your code?
  • [ yes ] Does your test coverage exceed 90%?
  • [ no ] Are there any erroneous console logs, debuggers or leftover code in your changes?

EC2 Default User added 2 commits April 8, 2025 16:40
The test was failing intermittently due to strict time boundaries (50-70ms)
for hook execution. Widened the acceptable range to account for slight
variations in execution time across different environments.

- Previous range: 50-70ms
- New range: 50-80ms

Test: HookStageExecutorTest#shouldExecuteEntrypointHooksToleratingTimeoutAndFailedFuture
@ianwow ianwow closed this Apr 8, 2025
@ianwow ianwow deleted the add_aws_default_credentials_provider_v2 branch April 8, 2025 20:15
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.

1 participant