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

CORS update duplicate existed headers except set only from data #6182

Closed
yura-shutkin opened this issue Feb 7, 2019 · 0 comments
Closed
Milestone

Comments

@yura-shutkin
Copy link
Contributor

Describe the bug

Cors Headers duplicates every time on update sys/config/cors

To Reproduce
Steps to reproduce the behavior:

  1. Run docker run --rm --name=vault --network=host -t -e "VAULT_DEV_ROOT_TOKEN_ID=12345" vault:1.0.2
  2. Run vault login
  3. Run vault write sys/config/cors allowed_headers="X-My-Vault" allowed_origins="test"; vault read sys/config/cors
    See
Success! Data written to: sys/config/cors
Key                Value
---                -----
allowed_headers    [Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-My-Vault]
allowed_origins    [test]
enabled            true
  1. Repeat step 3 and see
Success! Data written to: sys/config/cors
Key                Value
---                -----
allowed_headers    [Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-My-Vault Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-My-Vault]
allowed_origins    [test]
enabled            true
  1. Run vault write sys/config/cors allowed_headers="X-Other-Header" allowed_origins="*"; vault read sys/config/cors
    See
Success! Data written to: sys/config/cors
Key                Value
---                -----
allowed_headers    [Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-My-Vault Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-My-Vault Content-Type X-Requested-With X-Vault-AWS-IAM-Server-ID X-Vault-MFA X-Vault-No-Request-Forwarding X-Vault-Wrap-Format X-Vault-Wrap-TTL X-Vault-Policy-Override Authorization X-Vault-Token X-Other-Header]
allowed_origins    [*]
enabled            true

Expected behavior
I would like to see only headers I set, or default headers and headers I set.
I would like to have ability remove headers without delete cors config and set config

Environment:

  • Vault Server Version :
vault status                                                                                                
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
Total Shares    1
Threshold       1
Version         1.0.2
Cluster Name    vault-cluster-a7218c62
Cluster ID      dce55604-e9cf-960f-1b13-73c46e6ee8b8
HA Enabled      false
  • Vault CLI Version (retrieve with vault version):
Vault v1.0.2 ('37a1dc9c477c1c68c022d2084550f25bf20cac33')
  • Server Operating System/Architecture:
    Ubuntu 18.04 x86_64

Vault server configuration file(s):
default dev without configuration

Additional context
Add any other context about the problem here.

jefferai added a commit that referenced this issue Feb 11, 2019
@jefferai jefferai added this to the 1.0.3 milestone Feb 11, 2019
jefferai added a commit that referenced this issue Feb 11, 2019
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

No branches or pull requests

2 participants