kamax-matrix / mxisd

Federated Matrix Identity Server
GNU Affero General Public License v3.0
220 stars 112 forks source link

Directory Search problem with Rest backend #48

Closed daobee closed 6 years ago

daobee commented 6 years ago

Expected Behavior

Im configuring a mxisd server in Remote sessions only and has only one REST backend. and i want to use the Directory Search feature. if everything ok, i think my Rest directory search endpoint server will receive the search request.

config file:

rest:
  enabled: true
  host: 'http://restbackendip:port'
  endpoints:
    auth: '/_mxisd/backend/api/v1/auth/login'
    directory: '/_mxisd/backend/api/v1/directory/user/search'
    identity:
      single: '/_mxisd/backend/api/v1/identity/lookup/single'
      bulk: '/_mxisd/backend/api/v1/identity/lookup/bulk'

session:
  policy:
    validation:
      enabled: true
      forLocal:
        enabled: true
        toLocal: false
        toRemote:
          enabled: true
      forRemote:
        enabled: true
        toLocal: false
        toRemote:
          enabled: true

Actual Behavior

The entrypoint got nothing. I noticed that no Directory provider was loaded when the program initing.

2017-12-23 21:57:55.759  INFO [           main]    i.k.m.directory.DirectoryManager : Directory providers:
2017-12-23 21:57:56.995  INFO [           main] k.m.MatrixIdentityServerApplication : Started MatrixIdentityServerApplication in 7.358 seconds (JVM running for 9.061)

but the providers will be load correctly if i use ldap or sql backend.

I found that there are no @Component and @Autowired in RestDirectoryProvider class unlike the LdapDirectoryProvider or the sql one. Is the intentionally? what if i add them?

Steps to Reproduce the Problem

  1. do the session and rest configuration
  2. start mxisd server

Specifications

maxidorius commented 6 years ago

Good catch, thanks! Latest master has the fix