Code Monkey home page Code Monkey logo

Comments (2)

ViViDboarder avatar ViViDboarder commented on May 26, 2024

Thanks. I can't help but think that a preferred solution would be to fix the upstream data and put an actual email address in the/an email field. This could be done with a similar batch that reads your ldap records, constructs email addresses, and then writes them.

Building a regexp feature into the ldap sync is not something that I'm opposed to, but something that adds additional complexity.

from vaultwarden_ldap.

systemofapwne avatar systemofapwne commented on May 26, 2024

Using the E-Mail field of the LDAP upstream is unfortunately not a solution for me, since I want users on my services to have a unique user-naming convention like [email protected] while the mail in the LDAP field can contain even foreign mails for guests. Yet, their bitwarden login name should be @mytld.com - Preferrably even without the @mytld.com, but that is unfortunately not supported by Bitwarden/Vaultwarden by design.

Another way would have been to extend the scheme on my ActiveDirectory to support custom fields and sync that to the username, as you suggested. But that is a bit of overkill TBH.

I found an intermediate solution, which does the job: As of right now, I am running OpenResty as an intermediate proxy between vaultwarden_ldap and vaultwarden which modifies the HTTP header requestbody between the REST Api calls to rewrite the username in both directions (adds the TLD towards vaultwarden and strips it towards vaultwarden_ldap).

As I agree on the complexity argument for regexp, the most simpliest solution would be to allow prefix/suffix extension.

from vaultwarden_ldap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.