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

MSSQL - kvv2 secret engine - String or binary data would be trucated when too many string : "/" are in the path #22131

Open
flalisse opened this issue Jul 31, 2023 · 0 comments

Comments

@flalisse
Copy link

Describe the bug
When I want to enter a secret behind a fairly long path (we use a detailed naming convention based on separations using "/") I get a mssql error "
"* mssql: String or binary data would be truncated" and the secret is never added. "

To Reproduce

  1. Connect to the GUI using any token or classic login
  2. Try to insert on a kvv2-mount point a secret behind this path : kvv2prod/test/test/test/test/test/test/test
  3. I receive mssql error : "* mssql: String or binary data would be truncated" and the secret is never added. "

Note : with one "/" remove so six"/" in the path instead of seven it's working.

Expected behavior
The secret should be added correctly under the defined path

Environment:

  • Vault Server Version (retrieve with vault status):
    vault status
    Key Value

Seal Type shamir
Initialized true
Sealed false
Total Shares 5
Threshold 3
Version 1.14.0
Build Date 2023-06-19T11:40:23Z
Storage Type mssql
Cluster Name vault-cluster-59a73dca
Cluster ID abe3c9b3-b1f1-4ce9-9143-3c3cf7b22822
HA Enabled false

  • Vault CLI Version (retrieve with vault version):
    Vault v1.14.0 (13a649f), built 2023-06-19T11:40:23Z

  • Server Operating System/Architecture:
    RHEL9
    Kernel : Linux 5.14.0-70.22.1.el9_0.x86_64 Initial Website Import #1 SMP PREEMPT Tue Aug 2 10:02:12 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

Vault server configuration file(s):

#The content of this file is automatically generated by Ansible template module
# Full configuration options can be found at https://www.vaultproject.io/docs/configuration

ui = "true"

# all of those parameters have to be adapted before going in production

storage "mssql" {
  server = "xxxxxxxxxxxxxxxxxxx"
  port = 1433
  username = "xxxxxxxxxxxxxxxx"
  password = "xxxxxxxxxxxxxxxx"
  database = "Vault"
  table = "Vault"
  appname = "Vault"
  schema = "dbo"
  connectionTimeout = 30
  logLevel = 0
  max_parallel = "128"
}


#HTTP Listener
listener "tcp" {
  address       = "0.0.0.0:8200"
  tls_cert_file = "/opt/vault/tls/xxx.cer"
  tls_key_file  = "/opt/vault/tls/xxx.key"
  tls_client_ca_file = "/opt/vault/tls/xxx.crt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants