ldap,liferay , how to bypass the necessity of having to have email address firstname and lastname in liferay to import authenticating users


how to bypass the necessity of having to have email address firstname and lastname in liferay to import authenticating users

Question:

Tag: ldap,liferay

My application uses liferay to connect to LDAP server and import authenticating users. But many of the user records in the ldap schema doesn't have email id. This seems to be preventing me from importing these users as liferay requires email id, among other things, inorder to successfully import new user records. I am wondering if my above assertion is entirely correct. If it is, then is there a way to bypass this, so that I can import any user with objectclass: inetOrgPerson and has the attributes cn and userPassword

Please correct me if I am wrong in any of these, and please provide with a solution if there is one.


Answer:

It won't be easy to remove Liferay's dependency on users having a unique email address - it might be easier to set them up with an artificial email address in order to import them.

In case you stumble upon this artificial email address in Liferay's UI and don't like it, you can always update the UI and hide the mail address there.

Another option is to update your terms&conditions and require every user to have an email address - e.g. for contacting them in order to reset their password in case they ever forget it.

But, as the meat of your question is to remove the need for an email address per user: There's not a simple switch. I'd advise against modifying this quite central assumption. You can do it, but it won't be pretty and probably not well maintainable (just think about the various "subscribe" options all over the many components that Liferay comes with)


Related:


Get list of users in liferay


liferay
I want to display users list on liferay. and I am having problem with it. Here is my action class. public void userList(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException { // Todo Logic for user code try { int countUser = UserLocalServiceUtil.getUsersCount(); log.info("User Present In DB" + countUser); List < User...

Incorrect liferay-plugins dependency


gradle,dependencies,liferay,liferay-6.2
In https://github.com/liferay/liferay-plugins/blob/6.2.x/build-plugins.gradle#L9 following dependency is defined: dependencies { classpath group: "com.liferay.portal", name: "portal-service", version: "7.0.0-SNAPSHOT" } How can a 6.2.x version have a dependency on 7.0.0 version? Is it a bug? When I peek to the history of the file, the dependency has always been there. I am not able...

How can I configure AOP in Liferay Service Builder?


liferay,aop
I want to to intercept a method in Service Builder, for example: XXXLocalService.update(). But I don't know the correct way to do this. I have done some research but I haven't found a clear way to do this. Any help will be greatly appreciated....

How to pass data from page to Portlet class through AJAX call?


ajax,jsp,liferay,portlet
I'm trying to pass a value in an AJAX 'GET' request to my Portlet class, but I can't quite figure out a way to access such variable's value in the class. My AJAX code is: function loadXMLDoc() { var nocache = new Date().getTime(); var xmlhttp=new XMLHttpRequest(); var url = "${mURL}";...

LDAP Access - javax.naming.CommunicationException: simple bind failed


java,ldap,ssl-certificate,keystore
We are running into issues connecting LDAP server after LDAP SHA-256 Migration .We got the below exception when we ran our application in debug mode : javax.naming.CommunicationException: simple bind failed: xxxamd.xxx.com:636 [Root exception is java.net.SocketException: Socket is closed]​ We tried to add the below .cer files into our application specific...

How to pass HTTP request to Web-Service


ajax,web-services,liferay,liferay-6,portlet
From my portlet JSP, I am trying to make a Ajax call to web-service. My aim is to pass HTTP request object as a parameter to web-service method. Please suggest.

Difference between Liferay Mobile SDK and Liferay Screens


mobile,liferay,liferay-6
Can someone tell me the difference between Liferay Mobile SDK and Liferay Screens? Thanks a lot....

JNDI SPI provider for LDAP (Apache DS)


java,ldap,jndi
I was trying to implement a program to do JNDI lookup for LDAP. I saw there is open source LDAP from Apache viz: apacheds-2.0.0-M20 The below is the program that i wrote: import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.ldap.InitialLdapContext; import javax.naming.ldap.LdapContext; import javax.naming.directory.InitialDirContext; class JndiLDAPLookup { public static void...

How manage styles in Vaadin portlet in Liferay


css3,liferay,vaadin,portlet
I have a Portlet, where is used Valo theme. Most graphical components are displayed properly, but TextField not. It should have rounded border radius and height should be about 35px. It has normally about 15px and the field is angular. When I narrow width of browser window to about 200px...

Users in Guest role see default theme instead custom one for given layouts


liferay,liferay-6,liferay-theme
Users in Guest role see default theme instead custom one for pages which inherit from defined custom theme. This seems to be very strange problem. Even though layouts have specified to inherit theme from parent theme: Use the same look and feel of the Public Pages. Guests see them as...

commandButton action method not invoked in Liferay


jsf,liferay,portlet
I've the below portlet view.xhtml: <?xml version="1.0"?> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:body> <h:form> <h:commandButton value="TESTButton" action="#{navigationViewBean.submit}" /> <h:outputText value="TESTGetter: #{navigationViewBean.testField}" /> </h:form>...

Cons of a liferay cms while website development using Community Edition


content-management-system,liferay
I am new to LIFERAY CMS. i need cons of a liferay cms i.e., difficulties faced while developing and using liferay cms. can you please list cons of liferay cms.

Customizing My Sites portlet in Liferay


liferay
I want to customize My Sites portlet (which is out of box portlet) in liferay using ext. How do I do this? How do I get the source code for the my sites portlet?

Configuring a Custom LDAP Authentication Provider with Spring Security


java,spring,authentication,spring-security,ldap
I'm trying to configure the Spring Security with LDAP Authentication, but I need to get the username for all login requests. I configure my spring-security.xml who points to my MyCustomAuthenticationProvider class. I think the configuration is correct, but in runtime, the Spring first try to login with his own LdapAuthenticationProvider....

Avoiding Active Directory Uniqueness Constraint Violation During Rename


windows,active-directory,ldap,windows-server-2012,windows-server
Our environment has 2 Windows domain controllers successfully replicating on W2k12. In that domain, like everyone else, we have tons of accounts, some of whose account attributes are required to be unique. For business reasons not worth visiting here, we need to sometimes swap attributes between accounts. That is, user1...

Gitlab LDAP (Active Directory) Authentication without Server Side Access


ruby-on-rails,active-directory,ldap,gitlab
I am using GitLab Omnibus 7.10.0 on RHEL 6.6. I have enabled LDAP using the following configuration: gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'FOO COM Active Directory...

Active Directory Integration Plugin


php,ldap,centos6
I'm trying to integrate my Active directory to my website. So, I downloaded the AD Integration Plugin, but it says "ATTENTION: You have no LDAP support. This plugin won´t work. You must install or enable LDAP support in PHP." How do I fix that? Is that a php problem? Thanks...

Lifefay freemarker ADT: methods unavailable?


java,liferay,liferay-6,freemarker
I'm trying to work on some ADT for asset publisher (Documents and Media type), but I often have a message telling me that : Expression assetRenderer.getDataRepositoryId is undefined or Expression assetRenderer.getFileEntryId is undefined I found some threads where people said that we must add velocity.engine.restricted.classes= velocity.engine.restricted.variables= freemarker.engine.restricted.classes= freemarker.engine.restricted.variables= in portal-ext.properties...

AuthenticationException LDAP using plain Java


java,authentication,exception,active-directory,ldap
i have a problem while connecting to an Active Directory via ldap using plain Java. If the displayName begins with a , (Comma e.g. ", name") I get a javax.naming.AuthenticationException. The displayName is never used in the application. Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS wich I use dont contain any commas. Can somebody...

How to ignore Liferay user removed from LDAP errors?


ldap,log4j,liferay,liferay-6,openldap
I have a Liferay 6.1 instance that is connected to LDAP. New users get imported nicely, but when I remove a user from the LDAP directory, Liferay starts throwing exceptions when it tries to sync users from LDAP. These seem to be safe to ignore, but they produce several megabytes...

Riak CS LDAP authentication


authentication,ldap,riak,riak-cs
I read here that Riak CS supports LDAP for authentication: http://bit.ly/1Rb2yTF "Pluggable Authentication/Authorization for Integration with Existing Infrastructure – Riak CS provides an extensible authentication system, enabling integration with existing directory services (LDAP, ActiveDirectory, NIS, PAM)." However I cannot find anything relating to the LDAP authentication configuration in the docs....

Spring LDAP Context.REFERRAL to follow


spring,spring-security,active-directory,ldap
How do I set the LDAP Context.REFERRAL to follow in a Spring Security configuration? This is related to a problem I already reported and for which I found an unsatisfactory solution before discovering the real solution I am seeking for involve setting this environment attribute in the LDAP context to...

I am working on a MVC Portlet and the document i am saving is not going to db


liferay,liferay-6
Here is my Action Class, where I have to save any document to database but its not working and getting error in console that NoSuchMethodException (javax.portlet.ActionRequest, javax.portlet.ActionResponse) package com.test.docupload; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; import javax.portlet.PortletException; import com.liferay.counter.service.CounterLocalServiceUtil; import...

Service builder doesn't delete table in DB


liferay,liferay-6,liferay-service-builder
Hi all, I'm using LR 6.1. I created a new entity Called " Recommendation" in service.xml then a run BuildServices with Ant to generate the service builder Files. Now I want to delete the Entity. So I Deleted if from service.xml, but nothing happens in Data base and the other...

Web2py - Howto Auto Convert Username field to uppercase


python,ldap,web2py,web-frameworks
I am looking to have all users that sign in have their name converted(Transformed) to uppercase in the DB records or before it hits the DB. Currently I am using LDAP. So people are free to use sign ins like this: ['PREACTIVE','Preactive','preactive','PREactive','preACTIVE'] Each one of those will get a new...

Bash How To Select Multiple Lines from ldif-type File based on dn


linux,bash,ldap,ldif
I am wondering how best to parse an ldif file (and ldif-like files) so that I can import each DN entry and its associated attributes into variables, without crossing over into other DNs and their attributes, as everything is in a single file. Please how can this be done? Thanks...

Spring-LDAP - Password Compare How-to Update Failed Password Attempts


java,spring,ldap,spring-ldap
Using ApacheDS 2.0.0, the pertinent portion of the config is: dn: ads-pwdId=default,ou=passwordPolicies,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config ads-pwdminlength: 5 ads-pwdinhistory: 5 ads-pwdid: default ads-pwdcheckquality: 1 ads-pwdlockout: TRUE ads-pwdlockoutduration: 0 ads-pwdvalidator: org.apache.directory.server.core.api.authn.ppolicy.DefaultPasswordValidator ads-pwdmaxfailure: 5 ads-pwdattribute: userPassword ads-pwdfailurecountinterval: 30 entryParentId:...

LDAP connection only works on localhost


c#,asp.net,web-applications,active-directory,ldap
I have a login page that verifies credentials with active directory and redirects to the next page. When I run it locally it works perfect, but when I put it out on our webserver it gives an error trying to create the group principal: (System.DirectoryServices.DirectoryServicesCOMException (0x80072020)) I need to find...

Can't get LDAP department


php,ldap
After bind user try to get department list: $filter = "(department=*)"; $justthese = array("*"); $sr = ldap_search($ldap_conn, $ldap_dn, $filter, $justthese); $info = ldap_get_entries($ldap_conn, $sr); for($i=0; $i < $info["count"]; $i++) { echo "department: " . $info[$i]["department"][0]."<br>"; } get blank window...

How to implement Spring Security Ldap authentication using the configurer class correctly?


spring,authentication,spring-security,ldap,spring-ldap
Hi I'm trying to implement spring's ldap authentication using the WebSecurityConfigurerAdapter class. So far I can authenticate through the in memory method and even my corp's ldap server, however the latter method I'm only able to authenticate if I pass a hardcoded userDN and password when I create the new...

How can I retrieve deleted objects from Active Directory with Ruby?


ruby-on-rails,ruby,ldap
From the research I've done, it appears I need to send a special OID with my request (1.2.840.113556.1.4.417) in order to access the Deleted Objects container. I couldn't find a way to send a specific control with a request using the "net-ldap" gem. Does anyone know if this is possible?...

how to bypass the necessity of having to have email address firstname and lastname in liferay to import authenticating users


ldap,liferay
My application uses liferay to connect to LDAP server and import authenticating users. But many of the user records in the ldap schema doesn't have email id. This seems to be preventing me from importing these users as liferay requires email id, among other things, inorder to successfully import new...

AJAX Call not working in liferay 6.2.2?


ajax,liferay,hook,liferay-6
I am trying to perform a AJAX Call. But what i get is ResourceURL as undefined when i see the error in chrome. Below is my code. Declaration: <liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="mainURL" /> Implementation: xhr2.open("POST", resourceURL , false); But at implmentation i get resourceURL as undefined. In 6.1 it...

How to create service builder for liferay plugin project with maven


liferay,liferay-ide,liferay-service-builder
I have Already create Liferay Plugin project. and maven install also over. it gives ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] --------------------------------------------------------------------- [INFO] Total time: 1:29.773s [INFO] Finished at: Wed Jun 17 15:46:10 IST 2015 [INFO] Final Memory: 34M/151M [INFO] -----------------------------. But unable to add service builder. When i try to add...

Error while importing LDIF


ldap,apacheds,ldif
Server: Apache DS 2.0 Client: Apache Directory Studio 2.0 The problem: I am running into error while importing a LDIF This one works http://pastebin.com/DKZ4fT0U This one does not http://pastebin.com/Z5NxUxX4 Error message: #!ERROR [LDAP: error code 32 - NO_SUCH_OBJECT: failed for MessageType : ADD_REQUEST Message ID : 81 Add Request :...

Design Pattern to only return certain LDAP attributes in an object


java,design-patterns,ldap
Let's say I have the following class, with many instance variables and corresponding getters and setters: public class Foo { private String a; private int b; ... private List<String> z; public String getA() { return a; } public void setA(String a) { this.a = a; } public int getB() {...

Active Directory membership provider using LDAP


asp.net,azure,active-directory,ldap,membership-provider
I am working on a school assignment where we handle logins to a web application written in asp.NET using Active Directory. Our Active Directory is installed on a virtual machine on Azure. When trying to login, I am presented with the following error: I have checked my connection string multiple...

How to upload file in relative directory


java,liferay
I have made a application where we can upload any file which will save in our local given directory. I want to modify it, i want to add a drop down (with multiple option i.e floor, store, section) for department. i.e if we want to upload a file in 'Store'...

How can I change the zIndex attribute of aui-datepicker in Liferay Portlet 6.2


datepicker,liferay,z-index,liferay-aui,alloy-ui
I have discoveder one problem with date field in portlet in LF 6.2. The problem is that after clicking on the input field, the datepicker is displaying, but with zIndex=0, that means it is under the portlet. If I change on firebug that parameter to 1, everything is OK. I...

SonarQube LDAP authentication is not working


authentication,ldap,authorization,sonarqube
Presently, connecting to Apache Directory Server 2.0 from SonarQube 5.0.1. Have given the following entries in sonar.properties file: # LDAP configuration # General Configuration sonar.security.realm=LDAP sonar.security.savePassword=false ldap.url=ldap://10.53.67.11:30389 # User Configuration ldap.user.baseDn=o=TechMahindra ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail # Group Configuration...

Add user to LDAP using JAVA. Naming.InvalidNameException: Invalid Name


java,exception,ldap,openldap
I am practicing in Java, adding a user to LDAP(v3, running on my Virtual machine). Userdetails and attributes are obtained from postgres database running locally. This is my code (may not be a good approach): public class LDAPConnector { static final String DOMAIN_URL = "ldaps://10.10.10.180:636/"; static final String ADMIN_NAME =...

How to set multiple LDAP object classes with PHP?


php,ldap
I'm trying to receive user data from an Shibboleth/SAML IdP and pass it into an LDAP: // Get data from IdP $attributes = getUserFromIdP(); // Connect + bind (simplified) $ldapconn = ldap_connect(); ldap_bind(); // Prepare data $info['uid'] = $attributes['uid'][0]; $info['givenName'] = $attributes['givenName'][0]; $info['sn'] = $attributes['sn'][0]; $info['cn'] = $attributes['cn'][0]; $info['mail'] =...

Form submit portlet with Spring MVC


java,jsp,spring-mvc,liferay,portlet
I'm trying to achieve a Liferay portlet of submit form using spring MVC. The model: package com.model; public class Person { String firstName; String middleName; public String getFirstName() { return this.firstName; } public String getMiddleName() { return this.middleName; } public void setFirstName(String firstName) { this.firstName=firstName; } public void setMiddleName(String middleName)...

ldapadd gives “no global superior knowledge” on default config


ldap,docker,openldap
Background: I'm installing a Prosody XMPP server and Kaiwa webclient on a DigitalOcean droplet. Kaiwa has a one-click deploy-to-DO-droplet tool using Docker that I tried first, but it didn't work - probably because I'm using the 512MB minimum DO VPS and it ran out of memory with half of the...

Customizing liferay Calendar portlet


liferay,liferay-6,liferay-ide
I'm trying to customize Calendar portlet using this below instructions. https://www.liferay.com/it/documentation/liferay-portal/6.2/development/-/ai/creating-plugins-to-extend-plugins-liferay-portal-6-2-dev-guide-03-en Its basically creating Plugins to extend plugins. In order to achieve above, I need "Calendar-portlet.war" . I don't find any war file for calendar portlet for my version. So i decided to build myself. Then i downloaded Portal plugins...

In liferay market place, I am unable to submit the project


liferay,liferay-6
In Liferay market place i am stuck at the place "Upload Liferay Plugin Packages " When ever i am trying to upload a war file Please help me to short it out :)...

LDAP More than one negation operators in filter


filter,ldap,negation
I try to write a LDAP filter with two negations. I need all users who are not disabled AND don't belong to OU=Abt99 . This is my filter at the moment: (&(objectClass=user)(objectCategory=person)(samaccountname={USERNAME})(!(userAccountControl:1.2.840.113556.1.4.803:=2))) I tried (&(objectClass=user)(objectCategory=person)(samaccountname={USERNAME})(!(userAccountControl:1.2.840.113556.1.4.803:=2)(OU=Abt99))) and...

Include ftl file in ext plugin


maven,liferay,liferay-6
I have ext-plugin and I would like to override this file: portal-impl\src\com\liferay\portlet\dynamicdatamapping\dependencies\ddm\documentlibrary.ftl. After maven build, this file isn't include in my porta-impl-ext.jar. In my portal-impl-ext's pom.xml I have this code: <build> <plugins> <plugin> <groupId>com.liferay.maven.plugins</groupId> <artifactId>liferay-maven-plugin</artifactId> <version>${liferay.maven.plugin.version}</version> <configuration>...