Comments (2)
This is an issue with your code, not this library.
TL;DR: You need to use replace Server: "X.X.X.X",
with Server: "<server hostname>",
, most likely.
The error is telling you that your client can't verify the server's certificate because you've provided an IP and that IP is not in the certificate. That's how TLS verification works. It's going to verify the IP or hostname you've given it
It's the same reason you'll get an error in your browser when connecting to https://216.58.194.100/ instead of https://www.google.com/; The certificate for www.google.com doesn't list all the IPs it uses, it just lists www.google.com (and a few other domains.)
To fix this, you need to make sure your server has a certificate that's from a trusted CN. This could be one you purchased, a free one from LetsEncrypt, or possibly one you created (i.e. self-signed). In that last case, you'll need to make sure that the CN certificate you created is trusted on the client, or you'll get get another error.
Then in your client, connect with the hostname listed in the certificate (you'll need to make sure that hostname points to the correct server in your DNS.) The hostname will be checked to make sure it's in the cert, and the cert's CN will be checked to make sure it's trusted. If both of those things are correct, a secure, verified connection will be started.
If you can't provide those two things (a trusted CN and a certificate with the hostname in in it) then you'll have to use InsecureSkipVerify: true
and be vulnerable to MitM attacks.
from go-ad-auth.
Thanks for the advice, replacing the IP with the hostname solved my problem.
from go-ad-auth.
Related Issues (13)
- Authenticates multiple passwords HOT 3
- Unable to change password with TLS not enabled in domain
- Unable to change user password if TLS is not enabled in domain HOT 3
- Escape LDAP filter arguments HOT 5
- adauth.AuthenticateExtended call is not returning an expected ldap group HOT 1
- Connection error: LDAP Result Code 2 "Protocol Error": unsupported extended operation HOT 3
- Wrong keyword HOT 1
- Thanks for package HOT 1
- LDAP Error : Amount Of Entries Returned was not one. HOT 5
- Get user groups HOT 6
- checking other users username and password HOT 2
- ObjectGroups HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-ad-auth.