Coder Social home page Coder Social logo

Comments (3)

h44z avatar h44z commented on September 15, 2024 1

this issue cannot be reproduced - default peers are created for admin and non-admin users

@Sarevok933219 a sample config could look like this:

core:
  admin_user: [email protected]
  admin_password: secret
  create_default_peer: true

advanced:
  log_level: debug
  log_pretty: true
  log_json: false
  config_storage_path: /etc/wireguard
  expiry_check_interval: 15m

statistics:
  collect_peer_data: false
  collect_audit_data: false
  collect_interface_data: false

database:
  debug: true
  type: sqlite
  dsn: data/sqlite.db

auth:
  callback_url_prefix: https://vpn.yourcompany.com/api/v0
  ldap:
    - id: ldap
      provider_name: Active Directory
      display_name: Login with</br>AD
      url: ldap://ad01.your-company.local:389
      bind_user: [email protected]
      bind_pass: a-super-S3CRET-password
      base_dn: DC=YOURCOMPANY,DC=LOCAL
      login_filter: (&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))
      admin_group: CN=WireGuardAdmins,OU=_O_ASampleGroup,DC=YOURCOMPANY,DC=LOCAL
      synchronize: true
      sync_filter: (&(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))
      registration_enabled: true

from wg-portal.

pasztorl avatar pasztorl commented on September 15, 2024

update: when i set up the peer defaults on the interface before the ldap sync starts i got this:

TRAC[0010] UPDATE `users` SET `created_by`='_WG_SYS_UNKNOWN_',`updated_by`='_WG_SYS_UNKNOWN_',`created_at`='2024-02-23 23:04:44.718',`updated_at`='2024-02-23 23:04:44.722',`email`='[email protected]',`source`='ldap',`provider_name`='',`is_admin`=true,`firstname`='Lenard',`lastname`='Pasztor',`phone`='',`department`='',`notes`='',`password`='',`disabled`=NULL,`disabled_reason`='',`locked`=NULL,`locked_reason`='' WHERE `identifier` = '[email protected]'  duration=8.156765ms rows=1 src="/home/circleci/repo/internal/adapters/database.go:768"
...
ERRO[0010] failed to create default peer for [email protected]: failed to create default peer JvP7UY4bp2DZ5TQEUOy8oan1WkR3FMEeKAMHD8Nlxko= on interface wg0: creation not allowed: insufficient permissions 

So in this case the new user is admin, but it ends on the same permission problem.

from wg-portal.

Sarevok933219 avatar Sarevok933219 commented on September 15, 2024

@pasztorl please give your work config.yaml (without creds of course) as an example. I can't configure in on V2 alpha testing. I get an error:
"msg": "failed to synchronize LDAP users for Ctrlops LDAP: failed to setup LDAP connection: failed to bind to LDAP: LDAP Result Code 34 "Invalid DN Syntax": invalid DN",

from wg-portal.

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.