hashicorp / hashicorp/vault-benchmark

failed to RSA encrypt the plaintext: crypto/rsa: message too long for RSA key size

Open
#195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
107
Forks
28
PR merge metrics
No merged PRs in 30d

Description

My config.hcl:

# Benchmark config options
vault_addr = "http://localhost:8200"
vault_token = "root"
vault_namespace = "root"

test "transit_decrypt" "transit_decrypt_test" {
    weight = 100
    config {
        payload_len = 191
    }
}

I run ./vault-benchmark run -config=config.hcl and it returns an error:

2024-06-26T02:58:08.233+0300 [INFO]  vault-benchmark: setting up targets
2024-06-26T02:58:12.177+0300 [ERROR] vault-benchmark: target setup failed: error encrypting payload: Error making API request.

Namespace: root
URL: PUT http://localhost:8200/v1/8c2876f7-4ff3-d104-135e-317b425430d7/encrypt/test
Code: 500. Errors:

* 1 error occurred:
        * failed to RSA encrypt the plaintext: crypto/rsa: message too long for RSA key size

vault-benchmark version is 0.3.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the provided config.hcl using ./vault-benchmark run -config=config.hcl, focusing on target setup for the transit_decrypt test with payload_len = 191. Trace where the RSA encryption error is surfaced and define completion as handling this configuration without the reported message-too-long failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, cryptography
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.