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

fix: secretAccessKey has no length constraints #98

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ Extensive documentation and examples for each of these clients can be found in t
- [`SSM`](https://grafana.com/docs/k6/latest/javascript-api/jslib/aws/systemsmanagerclient/): allows to retrieve a parameter from AWS Systems Manager
- [`V4 signature`](https://grafana.com/docs/k6/latest/javascript-api/jslib/aws/signaturev4/): allows to sign requests to amazon AWS services


## Demo

```javascript
import { check } from 'k6'
import exec from 'k6/execution'
import http from 'k6/http'

import { AWSConfig, S3Client } from 'https://jslib.k6.io/aws/0.11.0/s3.js'
import { AWSConfig, S3Client } from 'https://jslib.k6.io/aws/0.11.2/s3.js'

const awsConfig = new AWSConfig({
region: __ENV.AWS_REGION,
Expand Down
2 changes: 1 addition & 1 deletion dist/aws.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/aws.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/event-bridge.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/event-bridge.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/kinesis.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/kinesis.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/kms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/kms.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lambda.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lambda.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/s3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/s3.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/secrets-manager.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/secrets-manager.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/signature.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/signature.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sqs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sqs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ssm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ssm.js.map

Large diffs are not rendered by default.

1,823 changes: 995 additions & 828 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "k6-jslib-aws",
"repository": "https://github.com/grafana/k6-jslib-aws",
"version": "0.11.1",
"version": "0.11.2",
"description": "Create a distribution file for the aws jslib",
"main": "src/index.js",
"devDependencies": {
Expand Down
6 changes: 0 additions & 6 deletions src/internal/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ export class AWSConfig {
)
}

if (options.secretAccessKey.length < 16 || options.secretAccessKey.length > 128) {
throw new InvalidAWSConfigError(
`invalid AWS secret access key; reason: size should be between 16 and 128 characters, got ${options.secretAccessKey.length}`
)
}

this.region = options.region
this.accessKeyId = options.accessKeyId
this.secretAccessKey = options.secretAccessKey
Expand Down
Loading