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

Ensure read config returns correct password policy key #71

Merged
merged 2 commits into from Oct 8, 2020

Conversation

jasonodonnell
Copy link
Contributor

@jasonodonnell jasonodonnell commented Oct 7, 2020

This PR addresses an inconsistency in ad/config where password policies are set using the key password_policy but are returned using a different key when ad/config is read:

$ vault write ad/config \
      binddn=$USERNAME \
      bindpass=$PASSWORD \
      url=ldaps://138.91.247.105 \
      userdn='dc=example,dc=com' \
      password_policy='foobar' \
      formatter='' \
      length=0

$ vault read ad/config   
Key                             Value
---                             -----
binddn                          jasonodonnell
certificate                     n/a
formatter                       n/a
insecure_tls                    false
last_rotation_tolerance         5
length                          0
max_ttl                         768h
policy_name                     foobar
starttls                        false
tls_max_version                 tls12
tls_min_version                 tls12
ttl                             768h
upndomain                       n/a
url                             ldaps://138.91.247.105
use_pre111_group_cn_behavior    false
userdn                          dc=example,dc=com

I've also changed the name of the variables tracking this internally since the word policy is overloaded in Vault.

@jasonodonnell jasonodonnell added the bug Something isn't working label Oct 7, 2020
plugin/passwords.go Outdated Show resolved Hide resolved
@jasonodonnell jasonodonnell merged commit 5fec147 into master Oct 8, 2020
@jasonodonnell jasonodonnell deleted the passwordpolicy branch October 8, 2020 16:50
jasonodonnell added a commit that referenced this pull request Oct 8, 2020
* Ensure read config returns correct password policy key

* Revert interface variable name
jasonodonnell added a commit that referenced this pull request Oct 9, 2020
* Ensure read config returns correct password policy key

* Revert interface variable name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants