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

Prevent overwriting of schema and password_policy values on update of config #74

Closed
wants to merge 1 commit into from

Conversation

elliesterner
Copy link
Contributor

@elliesterner elliesterner commented Aug 10, 2023

password_policy and schema were getting overwritten on update.

Example:

# create config
vault write open/config \                                                                   
  binddn="cn=admin,dc=hashicorp,dc=com" \
  bindpass="admin" schema="ad" password_policy="3" \
  url="ldap://ldap"

# check that password_policy and schema are there
vault read open/config

# update config
vault write open/config \ 
  bindpass="admin2"

# see that password_policy is gone and schema defaults to "openldap" and not "ad"
vault read open/config

Overview

A high level description of the contribution, including:
Who the change affects or is for (stakeholders)?
Anyone who updates their ldap config

What is the change?
Check to see if there is an existing value in storage for password_policy and schema. If the request does not update these properties, maintain the original values.

Why is the change needed?
Values were getting deleted or set back to default.

How does this change affect the user experience (if at all)?

Related Issues/Pull Requests

Contributor Checklist

  • Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet
  • Add output for any tests not ran in CI to the PR description (eg, acceptance tests)
  • Backwards compatible

@elliesterner elliesterner marked this pull request as draft August 10, 2023 13:15
@elliesterner elliesterner deleted the prevent-replacing-existing-config-vals branch August 10, 2023 15:49
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.

1 participant