Open loquanet opened 1 year ago
Regarding your questions, where does it say that it uses a configuration.go? You should either use environment variables or a config.yml (or specify another file using CONFIG_FILE env. variable)
The LDAP bind user can be and the form of
user@domain
or an LDAP bind dn like CN=User Name,CN=Users,DC=dom,DC=ai,DC=n
.
You also supplied the wrong value ldapEnabled: false
, it should be true
.
It is also worth mentioning that you can vertically scroll in the readme (because GitHub sucks) and then see the description column under configuration options
and a systemd unit file is linked here.
You could remove the line EnvironmentFile
and replace it with Environment="CONFIG_FILE=/path/to/config"
.
If you setup your wireguard interface using a wg-quick service you can replace After=...
with After=wg-quick@wg0.service
assuming wg0 is your desired interface.
GO: go version go1.20.2 linux/amd64
Ran: go run main.go -config config.yml ./wg-portal-amd64
Goal:
Error: failed to bind user: LDAP Result Code 49 "Invalid Credentials": 80090308: (The credentials are confirmed correct username and password perfectly)
Issue:
Questions:
configuration.go: cfg.LDAP.URL = "ldap://hla-dc2-hv.hlp.local:389" cfg.LDAP.BaseDN = "DC=HLP,DC=LOCAL" cfg.LDAP.StartTLS = true //cfg.LDAP.BindUser = "company\\ldap_wireguard" cfg.LDAP.BindUser = "admin@hlp.local" cfg.LDAP.BindPass = "theuserpassword" cfg.LDAP.EmailAttribute = "mail" cfg.LDAP.FirstNameAttribute = "givenName" cfg.LDAP.LastNameAttribute = "sn" cfg.LDAP.PhoneAttribute = "telephoneNumber" cfg.LDAP.GroupMemberAttribute = "memberOf" cfg.LDAP.AdminLdapGroup = "CN=wgadmins,OU=Security Groups,OU=Mybusiness,DC=hlp,DC=LOCAL" cfg.LDAP.LoginFilter = "(&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))" cfg.LDAP.SyncFilter = "(&(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))" cfg.LDAP.SyncGroupFilter = ""
config.yml core: listeningAddress: :8123 externalUrl: https://wg.hlp.local adminUser: admin@wg.local adminPass: admin editableKeys: true createDefaultPeer: false ldapEnabled: false mailFrom: WireGuard VPN noreply@hlplanning.com ldap: url: ldap://192.168.6.211:389 dn: DC=hlp,DC=local startTLS: false certcheck: false user: admin@hlp.local pass: therealpasswordexample adminGroup: CN=wgadmins,OU=Security Groups,OU=Mybusiness,DC=hlplanning,DC=LOCAL database: typ: sqlite database: data/wg_portal.db email: host: smtp.gmail.com port: 587 tls: true user: test@gmail.com pass: topsecret wg: devices: