Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

misc changes #138

Merged
merged 3 commits into from
Aug 18, 2017
Merged

misc changes #138

merged 3 commits into from
Aug 18, 2017

Conversation

otakup0pe
Copy link
Contributor

@otakup0pe otakup0pe commented Aug 13, 2017

  • add tests for ldap_group
  • add ldap auth config Enable LDAP support聽#38
  • doc ldap bits
  • ldap password needs to be a secret 馃檲

* ldap_group action (no tests yet)
* ignore urllib ssl warnings if asked to
* included yaml files are templated now too
@coveralls
Copy link

coveralls commented Aug 13, 2017

Coverage Status

Coverage decreased (-3.4%) to 66.457% when pulling 90ba68a on otakup0pe:misc into 2a02e5b on Autodesk:master.

* ldap_auth and ldap_user cover most of the rest of Autodesk#38 and Autodesk#103
* adds more template tests
* adds more userpass tests
@coveralls
Copy link

coveralls commented Aug 15, 2017

Coverage Status

Coverage increased (+2.01%) to 71.822% when pulling 9e6a2b0 on otakup0pe:misc into 2a02e5b on Autodesk:master.

@@ -11,8 +11,8 @@
import hvac
import aomi.exceptions
from aomi.vault import wrap_hvac as wrap_vault
from aomi.helpers import hard_path, merge_dicts, cli_hash
from aomi.template import load_var_files, render
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatted about importing with alias, no change needed

}
self.mount = 'ldap'
self.path = sanitize_mount("auth/ldap/config")
map_val(auth_obj, obj, 'starttls', False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do these mutate in place rather then passing out new object?
then you might do something fun like

reduce(lambda key, auth_obj: map_val(auth_obj,obj,key))

and have the keys be data driven

self.path = sanitize_mount("auth/%s/users/%s" %
(obj.get('mount', 'ldap'), obj['user']))
self._obj = {}
map_val(self._obj, obj, 'groups', [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@@ -238,9 +238,13 @@ def __init__(self, obj, opt):
}
self.mount = 'ldap'
self.path = sanitize_mount("auth/ldap/config")
if 'secrets' in obj:
self.secret = obj['secrets']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe replace this if statment with

self.secret = obj.get('secrets',None)

@otakup0pe otakup0pe merged commit b5fb19c into Autodesk:master Aug 18, 2017
@otakup0pe otakup0pe deleted the misc branch August 18, 2017 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants