# "Enterprise Connections" to legacy app

**URL:** <https://community.auth0.com/t/enterprise-connections-to-legacy-app/45520>\
**Category:** Get Help\
**Created:** [June 30, 2020, 10:58am UTC](https://community.auth0.com/t/enterprise-connections-to-legacy-app/45520 "2020-06-30T10:58:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmorch](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pmorch/32/22262_2.png) [@pmorch](https://community.auth0.com/u/pmorch)\
**Post date:** [June 30, 2020, 10:58am UTC](https://community.auth0.com/t/enterprise-connections-to-legacy-app/45520/1 "2020-06-30T10:58:59Z")

</div>

Hi,

We have a legacy java spring app where users are stored. This app needs to remain the master of users and passwords. Now we also want Single-Sign-On and want to use Auth0 as our OAuth2 server.

Can we get Auth0 to query our app e.g. via a webhook or something to determine if the user exists and whether the correct password has been provided?

I can see that one can integrate with an LDAP server, and I guess one _could_ implement the LDAP protocol to achieve this with a pseudo-LDAP server, I’m just hoping there is a _much_ simpler way. I’m hoping for something similar to [Keycloak’s User Storage SPI](https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi), where I have to implement these methods:

```auto
@Override
public UserModel getUserByUsername(String username, RealmModel realm) {
}
@Override
public boolean isValid(RealmModel realm, UserModel user, CredentialInput input) {
}

```

How would I go about using Auth0 in our case of a legacy app being the master of users and passwords (stored with bcrypt)?

I guess we _could_ sync the users once and then push every single time any user changes in the app. But that needs to be “instantaneous” - and what about the passwords, that we only have as salted `bcrypt`-ed values? Also, redundant synchronized data schemes like this are very error-prone in my experience, so I’m hoping for a battle-tested approach…

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 30, 2020, 8:34pm UTC](https://community.auth0.com/t/enterprise-connections-to-legacy-app/45520/3 "2020-06-30T20:34:33Z")

</div>

Hi @pmorch,

Welcome to the Community!

It sounds like you are describing a custom DB setup.

Take a look at this and let me know if it solves your issues:

> **[Custom Database Connections](https://auth0.com/docs/authenticate/database-connections/custom-db)**
>
> Learn about authenticating users using your database as an identity provider.

Note: This feature is only available to enterprise subscriptions.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 15, 2020, 8:34pm UTC](https://community.auth0.com/t/enterprise-connections-to-legacy-app/45520/4 "2020-07-15T20:34:35Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
