How can we cache ldap login credentials in mac using opendirectory - macos

In mac using Active Directory we can cache ldap login credentials by checking create mobile account at login. Is there any other way to do same thing in openldap. Please some one share information here

Syammala and Stephen Rudolph,
Per your question: "Is there any other way to do the same thing in openldap"
You can indeed do this with OpenLDAP and SSSD - Follow this documentation for installation
You'll want to set your config, like in the example to:
[domain/europe.example.com]
cache_credentials = true

Related

Wazuh - How to change admin password for web interface

I just installed WAZUH from its OVA.
The web interface is admin/admin
When I click reset password from the web interface i get this error
Failed to reset password. {"status":"FORBIDDEN","message":"Resource 'admin' is read-only."}
enter wazug admin password reset screenshot
I've googled/scanned documentation and can't find out how to change it.
I've looked through /usr/share/elasticsearch/plugins/opendistro_security/securityconfig/config.yml and cant see an option either?
A simple fix but its not just appearing for me via searching/reading the manual
I plan to secure the admin password then create a user account to do my work
Thanks in adavance
The admin and kibanaserver users are set to read-only as security measures, that is why it is not possible to change the password using the WUI and it must be changed in the configuration files.
This section of documentation talks about changing it: https://documentation.wazuh.com/4.0/user-manual/elasticsearch/elastic_tuning.html
Remember to update the new password in /etc/filebeat/filebeat.yml and /etc/kibana/kibana.yml if necessary.
I hope this information is helpful to you.
Best regards.
If running Wazuh on Kubernetes and you need to change the default passwords look for the following files:
elastic-cred-secret.yaml
internal_users.yaml
wazuh-api-cred-secret.yaml
wazuh-authd-pass-secret.yaml
The one caveat is you have to base64 encode the password before updating in the aforementioned files. Afterward, do kubectl patch or apply and your password will be updated.

Active directory custom authentication

I had created a sub-authentication package for Windows-7 login. It worked successfully for local account logins.
I then tried to implement same sub-authentication package for active directory in Windows server 2008 r2. I placed my DLLs in Windows\System32\ folder and modified registry values of Kerberos as this Microsoft document explains for sub-authentication dll.
The value I set was in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos Value: Auth0 set to C:\Windows\System32\SubAuth.dll (am I right here?).
But while authenticating I notice that my sub-authentication package doesn't get called as I don't get asked for the second factor while authenticating user on client machine against AD.
Am I missing something in setup or there is something I have to change in my Sub-authentication package.
Let me know if I have missed on any information here.
PS: Sub-authentication package is developed as per the Microsoft's Credential Provider documentations (in Msv1_0SubAuthenticationFilter routine).
Looks like this is by design - Msv1_0SubAuthenticationFilter routine from kerberos\ssv1_0 subauth package will not be called for cached domain interactive logon.
For interactive logon сall chain will be something like:
LsaApLogonUserEx2->MsvSamValidate->MsvpSamValidate->MsvpPasswordValidate
LsaApLogonUserEx2->MsvSamValidate->MsvpSamValidate->Msv1_0SubAuthenticationRoutine
But for cached interactive logon сall chain looks like:
LsaApLogonUserEx2->MsvpPasswordValidate
<and there is no call to Msv1_0SubAuthenticationRoutine here>
To achieve what I have asked in question, I needed to hack around in Microsoft's authentication package.
Here's what I did.
To communicate to active directory & make the authentication w.r.t. AD, I had to do it before hand in credential provider.
So my control flow for the solution goes like this in Credential provider:
Check whether user is connected to network.
If yes, then communicate with AD server, which is predefined & validate user against AD entry.
If user is validated then ask for 2nd factor in credential provider only & then on successful validation, pass user to sub-auth module & bypass 2nd factor in sub-auth.
If user is not connected to network, then validate with sub-auth module.
So basically, I had to first perform 2nd FA if the user needed to validate against AD & perform password authentication later on in the sub-auth module.

Google Admin SDK [Directory - API] check User password

I am using Google Admin SDK Directory API to create users and using Service account I am able to perform CRUD operations on them.
I have a requirement whereby I have to check the credentials of users created using SDK.
When you fetch the users the password is not returned, hence comparison cannot be done.
I'll really appreciate if someone lets me know what would be effective way of approaching the checkCredentials function.
Thanks.
Google does not ever return the value of the password. That would be a monumental security risk.
See their documentation in regards to the user resource used in the directory API. It specifically states that the password field is never returned. It can only be used for setting the password.
If your requirement is too check creds on a newly created user, you should look into trying to login as the user with the password you just sent, using the google auth Apis
At the moment, the only solution I've found is to simulate the user login flow with a fake browser (Apache's httpcomponents-client for Java for example) pointing to Google Account ServiceLogin.

How to check if a user is already login in the LDAP server

Assume a user uses the domain name and password to login his personal computer, and then i want to get the current user information(such as a session) from the ldap server. Because i would like to use this session to login another web site without password.
I am not sure if i describe this question clearly, i summarize it again as below:
1. User login PC with his password and username
2. The script get this user's session from ldap server and stored
3. When this user want to login another webpage, this website use the session to login (without password)
Is there any ideas about this? i still don't know how to implement with this.
As far as I'm aware LDAP does not have a concept of a session on the level of authenticating the people in the directory (as opposed to authenticating access to the LDAP server). So the answer is that you don't. LDAP is typically only used to store the user information.
What you need is some sort of single sign-on (SSO) solution. It can use LDAP to store the user data of course.
I agree with Lennart. From LDAP, there is no mechanism to determine if the user is already bound.
There maybe some extensions or controls or SASL mechanisms that could provide that information from some LDAP server vendor implementations.
-jim

Share user login/session between cakephp and moodle

I have a website already running made with CakePHP, which has its own login system using the Auth component.
Now I'm going to create another website using moodle, hosted in the same server. Is there any way to share the user session between those 2 websites?
For example, if a user logs into the moodle website and clicks a link to a page of the other website, he is not asked to log in again, since the system recognises that he is already logged in.
I guess that one thing to do would be to tell moodle (somehow) to use same table of users in the database that the CakePHP website is already using. And then tell the CakePHP website to accept the sessions created in that other website. Something like this right?
But I don't know how to do those things or if they even possible, any advice on how to approach this would be very helpful.
Single sign-on (SSO) is not currently a trivial thing to do in Moodle.
Some other approaches you may consider are:
Use external authentication in Moodle and configure it to use Cake's database. Does not provide SSO but tells Moodle to use Cake's user accounts.
Configure both Moodle and Cake to use a common authentication system like LDAP, POP3 or CAS. Depending of your choice it is possible that you may achieve SSO.
More information about Moodle authentication plug-ins in this page:
http://docs.moodle.org/dev/Authentication_plugins

Resources