This repository has been archived by the owner on Jun 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
otakup0pe
commented
Aug 13, 2017
•
edited
Loading
edited
- ldap_group action (no tests yet) part of LDAP User / Group Mapping聽#103
- ignore urllib ssl warnings if asked to
- included yaml files are templated now too
- 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
* ldap_auth and ldap_user cover most of the rest of Autodesk#38 and Autodesk#103 * adds more template tests * adds more userpass tests
ericfode
approved these changes
Aug 16, 2017
@@ -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 |
There was a problem hiding this comment.
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
aomi/model/auth.py
Outdated
} | ||
self.mount = 'ldap' | ||
self.path = sanitize_mount("auth/ldap/config") | ||
map_val(auth_obj, obj, 'starttls', False) |
There was a problem hiding this comment.
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', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
ericfode
approved these changes
Aug 18, 2017
aomi/model/auth.py
Outdated
@@ -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'] |
There was a problem hiding this comment.
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)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.