Skip to content
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

feat: Add SigV4 support #161

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

rybbchao
Copy link

@rybbchao rybbchao commented Feb 2, 2024

Add SigV4 support for #93.

Environment variables:

  • K6_PROMETHEUS_RW_SIGV4_AUTH: Enable SigV4 for AWS Managed Prometheus.
  • K6_PROMETHEUS_RW_SIGV4_REGION: AWS region where the workspace is.
  • K6_PROMETHEUS_RW_SIGV4_ACCESS_KEY: AWS access key.
  • K6_PROMETHEUS_RW_SIGV4_SECRET_KEY: AWS secret key.
  • K6_PROMETHEUS_RW_SIGV4_PROFILE: AWS profile to use.
  • K6_PROMETHEUS_RW_SIGV4_ROLE_ARN: AWS role ARN to assume.

Note: Set AWS_SDK_LOAD_CONFIG to true for the shared config and credential files.

@rybbchao rybbchao requested a review from a team as a code owner February 2, 2024 10:09
@rybbchao rybbchao requested review from mstoykov and joanlopez and removed request for a team February 2, 2024 10:09
@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
All committers have signed the CLA.

@rybbchao rybbchao marked this pull request as draft February 2, 2024 11:05
@rybbchao rybbchao marked this pull request as ready for review February 2, 2024 11:35
@mstoykov
Copy link
Contributor

mstoykov commented Feb 8, 2024

Looking at teh amount of dependancies this pulls in ... I am concerned.

I did a quick check and this adds 7mb on top of k6 for this one authentication. +Every security alert we get about all of those dependancies.

GIven that this currently goes in k6 core I really would prefer not to merge this.

Some quick googling shows that there are ways to get the authenticaiton without pulling in the whole aws sdk and I would recommend we actually go down this route

https://gist.github.com/anandkunal/b67eb94454b77cfc2b50026989586cc0

cc @codebien

edit:

$ xk6  build --output k6-remote-one  --with github.com/grafana/xk6-output-prometheus-remote@main
$ xk6 build --output k6-remove-sigv4  --with github.com/grafana/xk6-output-prometheus-remote=github.com/rybbchao/xk6-output-prometheus-remote@1b6d8863e4f3c1ce91b1419185faad6bb5d865db

$ ls -l k6-*
-rwxr-xr-x. 1 mstoykov mstoykov 37511320 Feb  8 18:03 k6-remote-one
-rwxr-xr-x. 1 mstoykov mstoykov 44818584 Feb  8 18:03 k6-remove-sigv4

Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

I agree, @rybbchao would you be interested in trying the path suggested by @mstoykov?

@rybbchao rybbchao marked this pull request as draft February 13, 2024 02:14
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.

None yet

4 participants