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

Allow for configuring DN format #57

Merged
merged 13 commits into from Mar 22, 2019

Conversation

ryskov
Copy link
Collaborator

@ryskov ryskov commented Aug 22, 2018

As we had the need for changing up the DN format and specifically the ssh-keys attribute name, i made some changes that allows for configuring that dynamically.

I added 3 new configuration options under the [backend] section:

  • nameformat: Changes the 'prefix' to use for the name part of the DN (cn=johndoe vs uid=johndoe for example)
  • groupformat: Changes the 'prefix' to use for the group part of the DN (ou=svcaccts vs cn=svcaccts for example)
  • sshkeyattr: Changes the generated attribute name for the sshkeys

The reason for adding this is that we needed to make it easier to change from our FreeIPA implementation to GLAuth, which has slight changes in regards to the DN-format. I figured that other might be able to use this aswell for making changing to GLAuth from other systems easier, which i think should be encouraged.

I have added defaults to the 3 options to make sure everything stays the same when not specifying (nameformat=cn, groupformat=ou, sshkeyattr=sshPublicKey), so only people with specific needs will have to think about these options.

I also removed the 'via LDAP' suffix added to the gecos and description attributes, as i found those unnecessary, but feel free to add them back in.

@benyanke
Copy link
Member

It's great to see this work! Since this is designed to be an LDAP server for developers, it's ideal for it to be able to be as flexible as possible.

Looks great at first glance. I see you're still committing on this today - one new thing I added is a [WIP] bot. If this is not-yet complete, could you add [WIP] to the end of the title so it's clear? Otherwise, if you think it is ready for merge, just let me know as well.

@ghost ghost assigned benyanke Aug 23, 2018
@ghost ghost added the review label Aug 23, 2018
@benyanke benyanke changed the title Allow for configuring DN format Allow for configuring DN format [WIP] Sep 10, 2018
@benyanke
Copy link
Member

Adding [wip] since I didn't hear back. Please remove if/when it's ready to merge!

@ryskov ryskov changed the title Allow for configuring DN format [WIP] Allow for configuring DN format Feb 15, 2019
@ryskov ryskov merged commit c69168c into glauth:dev Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants