-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AD LDAP Configuration #44
Comments
Hello, In JSON '#' is not used to comment out a line, default is to not support comments in JSON files. Please remove '#' from this:
If you use LDAP the users.json is used to store the two-factor secret when MFA is enabled. Thanks for submitting an issue. |
Please update to 1.2.1 if you want to use LDAP and 2FA at the same time. Just fixed an issue with the key setup. |
Looks like removing the commented line resolved that particular issue. However, there appears to be another issue, though I'm unsure of whether its my config or the plugin. When starting Kibana, I get the following error:
Researching the error, specifically
Maybe I am misunderstanding the config settings. Under LDAP:
|
Yes - except one thing, you don't need to be in the "group dn" to be allowed to login, it will be used in the future to manage access to spaces/dashboards. How is your password stored in the AD server? Hash algorithm? I only tested it with a plaintext password. I'm going to do another test tomorrow. What kind of AD server are you running? The plug-in is tested with Apache DS. I've seen the warning too, should not affect the plug-in |
Right I understood the difference on the memberships. This is on Microsoft Active Directory, I assume the password is stored as a hash but I am under the assumption that the LDAP query automatically performs the hashing operation. |
I had already tested with plaintext and SHA256, it's working as expected. I tested setting the dn of the admin config to "cn=username,ou=system" and it didn't work, nor with "sn=role,ou=system". For some reason it's only able to authenticate when i set it to "uid=username,ou=system". In the other cases it fails to authenticate because it cannot find the user entry. Could you try with uid instead of cn? if you have it on your user entry. do you need dc and both level1 and level2? I don't think using cn for the admin account is right, as it's not guaranteed to be unique. If you can't get it working still, I'll try and setup Microsoft Active Directory. |
I have tried it using |
thanks alot for the info, I'll try and reproduce it as soon as possible. |
I've setup windows server 2019 with AD/LDAP in a hyper-v.
LDAP: Error code 49, LdapErr: DSID-0c09041C comment: AcceptSecurityContext, data 52e, v4563. Looks like the same error. While testing this I realized that 52e is a wildly misleading error code, it's defined as 'invalid credentials'. But it appears if the bind DN is not 100% correct. To figure out the correct bind DN I used Apache Directory Studio
I guess the problem I had was specifying the group with OU=Users instead of CN=Users. There seems to be a difference there with the AD server I was using before. |
Success...with a caveat.
The only other issue I have now is I can't add users or authenticate with any user account except the default user-dn: specify an OU containing users authorized to login |
Additional TestingDomain: test.net
Mithril LDAP Account DN LDAP Configuration:
Attempted authentication with the following username AD attributes: sAMAccountName, UserPrincipalName, Pre-Windows 2000 user logon name (testuser, [email protected], test\testuser) |
In json \ backslash is a control character, it can be escaped with , for example "CN=LastName\\" in JSON is read as CN=LastName.
group-dn is not used for authentication - it will be used in the future to determine which spaces/dashboards a user is able to view. it's not yet implemented. does your AD accounts actually have the uid attribute? It's not set in my Microsoft AD, but it's set in my Apache AD. Maybe we should be querying for the sAMAccountName instead of the uid for Microsoft ADs? The last configuration you posted looks good. Could you try editing kibana/plugins/kibana-mithril/src/authentication/ldap.js ? Replace
with
If it works I will make the attribute for matching the username configurable. Alternatively, you could try adding the uid attribute to a single user for testing. |
Microsoft Active Directory doesn't have a UID attribute and modifying AD to include custom attributes is generally frowned upon and could cause support issues with Microsoft. If memory serves, samaccountname is a unique account attribute, it's generally used by most authentication providers as a means to uniquely identify a user. I think being able to customize the attribute that's used for username would be highly desirable by many. For example, some organizations may standardize on users logging in with email address, so being able to say, look at user's I've modified ldap.js as requested and it still does not work. Is there any kind of additional logging that we can enable, like verbose logging on the LDAP request to see it in action? I am ingesting DC Security logs into my ElasticStack which displays user login attempts and I'm not even seeing the auth request come in. |
It could work now,thanks very much. |
@codingchili Have you had any time to investigate this issue further? |
Hi, I'm working on improving the configurability and assuring quality on Microsoft ADs. Error handling has been improved to make sure errors are logged. There is currently a blocking issue with group discovery not finding any groups. |
Excellent looking plugin, however I am running into an error in the configuration. I've got it configured as follows:
I get the following error on Kibana startup:
I'm not well versed in the language but it looks like it isn't happy with the
path
setting in config.json? I have not made any modifications to the users.json file as I'm unsure of what exactly its supposed to contain. I've currently got MFA set to disable as I just want to verify LDAP authentication is up and running.The text was updated successfully, but these errors were encountered: