Thank you for sharing the video. It was very helpful.
@TalentedDeveloper3 ай бұрын
Most welcome
@eq7165 ай бұрын
OMG, that's brilliant. Thanks man!
@TalentedDeveloper5 ай бұрын
Thanks 👍🏻😊
@shamkantdesale89943 ай бұрын
Thanks for the details. It's helpful.
@TalentedDeveloper3 ай бұрын
Thanks for your valuable feedback
@dereknguyen72338 ай бұрын
excellent tutorial! much better than official spring guide which only use internal User Data file
@TalentedDeveloper8 ай бұрын
Thank you so much for your valuable feedback
@tsuiben65287 ай бұрын
Thanks! This helps me set the authentication function in my Spring project.
@TalentedDeveloper7 ай бұрын
Most welcome and Thanks
@manishkrishnaperumalla8493Ай бұрын
It was throwing bad credentials. Even after entering correct credentials and also unable to debug as suggested it is not taking me to method implementation
@TalentedDeveloperАй бұрын
Hi, are you able to run ldap browser? Please please start ldap browser/server and see you data DN. If you are facing an LDAP running issue then try to start with the administrator. If the issue still persists then downgrade the Java version. If it is running then please the credentials, add logger as debug level
@bhriguparashar8450 Жыл бұрын
Hi very much helpful video ,but I am facing a issue that when we are running LDAP on IP but whenever I am calling from spring boot project it is throwing 401 unauthorised exception. But if I use that same credentials and connect to that LDAP ,it successfully connects from Apache directory studio . Please provide me some inputs for the issue. Thanks
@TalentedDeveloper Жыл бұрын
Thank you. Can you please check your spring security configuration. If possible please check if the ldap connection is connecting successfully or not. If connection is fine then please check DN, it has to match with ldap user dn.
@bhriguparashar8450 Жыл бұрын
How can I validate whether the LDAP connection is established successfully Thanks..
@krishnaAvula-n3w Жыл бұрын
@TalentedDeveloper Hi I am facing same issue ,but how to check whether I am able to make connection with ldap . And thank you for your helpful video
@TalentedDeveloper Жыл бұрын
To ascertain the successful establishment of an LDAP connection in a Spring Boot application, a straightforward approach involves executing a basic operation, such as searching for a user or retrieving information from the LDAP server. The absence of any exceptions during the operation signifies a successful connection. Below is a sample code for creating a function in the LdapService class(github.com/talenteddeveloper/Spring-Boot-LDAP-Overview/blob/main/src/main/java/com/learn/springBootLdapOverview/service/LdapService.java). public boolean isLdapConnectionValid() { try { // Adjust the DN as per your connection details ldapTemplate.search("ou=people,dc=example,dc=com", "(objectclass=inetOrgPerson)", null); return true; } catch (Exception e) { // Log the exception or handle it as necessary return false; } } Make sure to customize the DN according to your specific connection. If the function returns true, the connection is established successfully; otherwise, ensure that the credentials are correct.
@ashutoshbodake45094 ай бұрын
Very good content!
@TalentedDeveloper4 ай бұрын
Thanks!
@sumakosuri650511 ай бұрын
Hi, thank you for this wonderful tutorial. I have a scenario where I have to use LDAP AuthoritiesPopulator. How to go about it?
@TalentedDeveloper11 ай бұрын
It is possible but look like I need to create a detailed video for that. You can create a class like CustomAuthoritiesPopulator implements AuthoritiesPopulator { } then implement the override function. After that in custom security config you can inject the CustomAuthoritiesPopulator class and add ldapAuthoritiesPopulator.
@BrandonFonseca-rk1uc7 ай бұрын
Thanks, now I just have a question, how can i create a Json Web Token using LDAP to authorize frontend request.
@TalentedDeveloper7 ай бұрын
You are most welcome. You can follow below steps: 1.Configure LDAP Authentication: -Set up LDAP authentication in your Spring Security configuration. 2.Generate JWT upon Successful Authentication: -Create a JWT upon successful LDAP authentication. 3.Authorize Requests Using JWT: -Use the JWT to authorize requests from the frontend. like code sample below: in login API: do Authentication first, then get user details and create JWT token Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(username, password)); SecurityContextHolder.getContext().setAuthentication(authentication); UserDetails userDetails = (UserDetails) authentication.getPrincipal(); return jwtUtil.generateToken(userDetails.getUsername());
@GauravSharma-bl7nu Жыл бұрын
hi thanks for making this video but i am unable to start the server .i have chnaged my jdk in config file like -vm and my java.exe location but it still is not working . i am using spring boot 3.2 with jdk 17.please help .
@TalentedDeveloper Жыл бұрын
try to set java home as jdk11 and in eclipse use java 17 jdk. Try this once, I hope it will work
@GauravSharma-bl7nu Жыл бұрын
it worked .thanks man@@TalentedDeveloper
@priyankachauhan2736 Жыл бұрын
Thankyou….. it is so helpful😊
@TalentedDeveloper Жыл бұрын
Always welcome
@aishwaryaingale55025 ай бұрын
I am getting connection refused when tried to login
@TalentedDeveloper5 ай бұрын
are you trying to connect to localhost or other ip?
@sushmar24738 ай бұрын
Hi, I watched all of your videos related to LDAP. I am new to LDAP. Can you suggest me, how to start learning LDAP to understand better.
@TalentedDeveloper8 ай бұрын
Hi, if you watched all the video then definitely you got some idea😄. Anyways try with basics like create login application then use authentication,next do Authorization. After that learn about permission then add do ldaps and bla bla . You need to start first, automatically you will get a better idea😊
@balasrinivasukosuri790611 ай бұрын
Thank you. It's sure is helpful. Can you show how to retrieve user details after user logs in with LdapAuthoritiesPopulator?
@TalentedDeveloper11 ай бұрын
you can check this kzbin.info/www/bejne/mWjSeZeworSZkNE.
@ey-hz6zw Жыл бұрын
Thank you!. Your video is very helpful! This approach secures all routes/endpoints in the app as I understand it, but what I need is just a login endpoint that authenticates users to the LDAP server and returns a response to the front-end app. Therefore I need to enable access to some endpoints without authentication. How can I implement this? I would be very happy about your answer!
@TalentedDeveloper Жыл бұрын
Glad it helped! yes we can do. You can go with verifyPassword approach. Currently I have started Spring Boot LDAP Tutorial series.in that I will surely show that. But for now you can do one thing. Try to pass uid/cn and password to controller. Like below: boolean passwordMatch = ldapService.verifyUserPassword(cn, enteredPassword); You can create a Ldap Service class where you can do all LDAP Activity( I am going to upload a video today like how to add ldap user,you can refer). In LDap Service try to get user By ldapUser by UID or CN(Whatever you want). LdapUser ldapUser = getUserByCn(cn); once you got user then try to check password. ldapUser .getPassword.equals(enteredPassword); NOTE: You might face issue during password verification like password encrypted. Check carefully
@ey-hz6zw Жыл бұрын
@@TalentedDeveloper thank you for your answer! i checked your new video.. i am not sure if it will work, since the ldap server that i use to authenticate will return only "true/false" kind of answer. i can not retrive the user recored. Additionally, i dont want to return a login form to the user, because i want to do that in the spa frontend app.. i just need an endpoint to tell me if the credentials are correct or not, so that i can return a token to the spa later.
@TalentedDeveloper Жыл бұрын
you no need to show the login screen to ui. You can allow your endpoint url from spring security (check security config) and you can play with code. Else I am having the best solution, which will return true and false. please check this kzbin.info/www/bejne/q4vComCVmc6Jpq8
@anburaaaja Жыл бұрын
is it possible to validate without LDAP. I mean logon with windows logon ?
@TalentedDeveloper Жыл бұрын
May be possible, I never tried
@YashwantKhillare-sf7og7 ай бұрын
can it is same work for Active Directory user and computer
@TalentedDeveloper7 ай бұрын
I think yes
@girishvm23356 ай бұрын
Hi , Nice tutorial. Now I want to implement ldap caching with spring boot . Any suggestions
@TalentedDeveloper6 ай бұрын
Hi, Thanks. I also need to check
@girishvm23356 ай бұрын
Did you check above I am not getting proper solution
@TalentedDeveloper6 ай бұрын
sorry I didn't check till now
@patrykbindacz43337 ай бұрын
Thank you so much :)
@TalentedDeveloper7 ай бұрын
You are most welcome
@radiologyuniversity7 ай бұрын
Thanks for the video. Is it possible to have two-factor authentication with LDAP?
@TalentedDeveloper7 ай бұрын
Yes, it is possible to implement two-factor authentication (2FA) with LDAP in a Spring Boot application.
@TalentedDeveloper7 ай бұрын
I will make video very soon
@mshu11211 ай бұрын
Its a nice video.. Please make a video on how to configure LDAP over TLS
@TalentedDeveloper11 ай бұрын
Thanks and Sure I will try
@RajaGangavarapu11 ай бұрын
Thank you so much and also could you please show us to login using only cn as we have different ou's for different users
@TalentedDeveloper11 ай бұрын
You are most welcome. So in your case you will pass full dn. like cn=abc,ou=user along with password and you need to login. Here dn can be different for different user. Please correct me if I am wrong.
@ameniselmi295710 ай бұрын
thank you so much its so helpful I'm working on creating an application to manage Active Directory but I'm encountering many issues. So, I'm asking if you can help me
@TalentedDeveloper10 ай бұрын
sure, please let me know how I can help you
@hrishikeshkumar18946 ай бұрын
This does not work for me
@TalentedDeveloper6 ай бұрын
Hi, Please check the steps, I feel something you miss. If possible please check your error in the console. The maximum probability is that your configuration can be wrong.
@kevintang9330 Жыл бұрын
Hello, thank you for your video, it was very well done. Currently, I am encountering some problems regarding the operation of Apache DS and Apache Directory Studio. When I try to modify the name of dc=example,dc=com through 'Open Configuration', for example, changing it to dc=myldap,dc=com, I am unable to save the changes. The following error occurs: 'Save Configuration' has encountered a problem. Unable to save configuration. - Unable to convert the configuration bean to LDIF entries. I wonder if you have ever encountered such a problem. This issue prevents me from importing .LDIF files. Thank you very much!"
@TalentedDeveloper Жыл бұрын
Hi Kevin, Thanks for your valuable feedback. I never tried like that. But I remember once I updated dc=example,dc=com with my custom name. And I did ldap operation. But never tried to import the ldif file. I will check from my end. When you try to import,at that time try to see the object class structure and make sure it will match your Apache DS.