h44z / wg-portal

WireGuard Configuration Portal with LDAP connection
https://wgportal.org/
MIT License
880 stars 121 forks source link

Showing no profile information or peers in WireGuard Portal #233

Closed Chris9667 closed 3 months ago

Chris9667 commented 3 months ago

Hi,

I'm trying to use WireGuard with a LDAP configuration, for that I'm using "wgportal/wg-portal:2.0.0-alpha.1" as a docker image. In WireGuard Portal when clicking on "Open my Profile" it doesn't show any information about my profile.

For this error, statistics in my config.yml file are on true

statistics:
  collect_peer_data: true
  collect_audit_data: true
  collect_interface_data: true

If I put them on false, my peers are shown. But if I try to click on "Show Peer" another error occurs which I'll explain in a separate Issue because I don't think it has something to do with this problem.

My config.yml file:

advanced:
  log_level: trace
  config_storage_path: /etc/wireguard

statistics:
  collect_peer_data: true
  collect_audit_data: true
  collect_interface_data: true

core:
  admin_user: admin
  admin_password: (hidden)
  import_existing: true

web:
  external_url: http://XX.XX.XX.XX:XXXX
  request_logging: false

auth:
  callback_url_prefix: http://XX.XX.XX.XX:XXXX/api/v0
  ldap:
    - id: ldap
      provider_name: (name)
      display_name: Login with</br>LDAP
      start_tls: false
      cert_validation: false
      url: ldaps://{{ redacted }}:636
      bind_user: uid={{ redacted }},cn=sysaccounts,cn=etc,{{ redacted }}
      bind_pass: {{ redacted }}
      base_dn: cn=accounts,{{ redacted }}
      login_filter: (&(objectClass=person)(memberof=cn=wgstudents,cn=groups,cn=accounts,{{ redacted }})(uid={% raw %}{{redacted}}{% endraw %}))
      admin_group: cn=admins,cn=groups,cn=accounts,{{ redacted }}
      field_map:
        user_identifier: uid
        firstname: givenname
        lastname: sn
        email: mail
        department: groups
      synchronize: true
      sync_filter: (memberof=cn=wgstudents,cn=groups,cn=accounts,{{ redacted }})
      registration_enabled: false

Thank you for your help

h44z commented 3 months ago

Can you please add the trace logs the wg-portal produces? (not the logs in the browser - the ones in the docker container or terminal where the main application is running)

Also, are you logged in as admin user or normal user?

Chris9667 commented 3 months ago

I was logged in as a normal user. I fixed the error by just using the master image. Now the profile information is shown independently of the statistics. Thank you for your help.