Liferay - Authentication without populating liferay db - liferay

Again, Do we have any possible solution that avoid populating liferay db with user information for authentication using extending methods/custom implementation/hooks/plugins/extensions?
Regards
Vishal G

There's no way to avoid creating a user in the Liferay database. You can though create a dummy user that all users use or a dummy user for every user depending on your needs

It is generally not desirable to share accounts as you cannot benefit from all functionality regarding groups, personalization, ... This is basically why one would install a portal.
To create users you can use Liferay's services.
If authorization is not your concern, it is possible to override the authenitaction mechanism with a variety of methods. THe authentication pipeline might be a good starting point.
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/authentication-pipeline
Good luck!

You can create a Liferay Hook to Authenticate using your custimization.
override the following jsp page.
/html/portlet/login/login.jsp
Or you can create your own login portlet. No need to populate all users in db.
Just findUserById().
Dont forget to mention this change in portal-ext.properties file. You will need to specify custom Login portlet id.

Related

How can I fetch the existing table data in aportlet

I am trying to create the user by site admin so I have created a portlet which has basic user details form and in the action class I called the UserLocalServiceUtil.adduser(). Now the values are inserting into the DB in USER_. Now I want to display the list of created users by only site admin how can I do that? I have the following queries.
1) How can I fetch the values from USER_ in my portlet. Do I need to create the service builder OR are there API methods to fetch the values from the USER_ table?
2) I want to display only the users list which is created by site admin in my portlet. I don't want to display the whole company list of users. So How can I achieve this?
Suggest me any references or guidelines to do this.
Your help will be very much appreciated.
For Q1 :
http://cdn.docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html#getUsers(int, int)
This might help you. You don't need service builder for that. Just create a simple Liferay MVC portlet and call the relevant methods.
for Q2 : I don't think this would be possible by API methods. What you can do is to set an expando variable for user at time of creation by site-admin. And # time of fetching users, you can cross-check the value of that field manually.
EDIT :
One more point for suggestion : Never create user with Site-Admin role for user creation. This role is supposed to manage site & user assignment to the site. You can use more appropriate role i.e. Org-Admin rather than site-Admin.
How to set an expando variable while adding the user?
Liferay provides Expando API interface, which you can use while creation of user in your portlet. refer following links Developing with Expando, Liferay Expando API
I hope this would be helpful to you.

Link Liferay and Alfresco with sso (OpenAM) authenticated user

We need to show document from alfresco in Liferay portlets. We would use the CMIS connector with the document library. But we are required that the users be authenticated with OpenAM (a sso).
All the research I've done seam to indicate that ootb it doesn't work. But I can't find anyone that made it works.
So is it possible to use the CMIS connector with an SSO authenticated user?
If yes, what step should we do, or is there some doc already available?
If no, Is there any work around or other solution to connect Liferay with alfresco with an SSO authenticated user?
So to summarize the situation, no, by default there is no way to use Liferay document librairy/cmis connector with any SSO.
But, it is possible to use it by modifying the Liferay feature (With hook) and using a specific strategies (This go from proxy sso to some java script hack that I wont go to deep into as we decides not to do it) to get the required info to send to alfresco.
Other solution (that we chooses) is to implement a custom authentication on alfresco and to use a password that is not the user one as password, but there is some security concern that need to be taken into account with this solution because the simple way to do it create a "master password" that could be used by anyone.
So basically there is really no one size fit all solutions on this subject.

Liferay - Custom Authentication Web Service. Do not need user info in liferay db

I have followed Custom Authentication Web Service link to customize authentication.
But Liferay is still checking whether the same user email id is configured in the liferay db or not. If its not, it is saying that authetication failed.
I do not want to keep any user information in the liferay db. Do any one know how to do that?
Regards
Vishal G
Create dummy users for your real users with fake data. Liferay requires some sort of Liferay user in the database to function correctly. You can create one dummy user for each real user or one dummy user for all your users depending on your needs.

Where can I find information on how to customize the user registration process of Liferay + Sun Web Space Portal

I need to quickly customize the user registration form of the liferay/web space portal? Have not found any direct information on this so would appreciate any tips.
There are several possibilities:
The source is available, so you might want to patch the existing process
The API is available (e.g. see this thread in the liferay forum), so you can batch-create users or implement your own registration portlet and just use the API. AFAIK you can even register users via a webservice interface.
You can batch-insert users into the database
If your existing user data is stored in LDAP, you can connect Liferay to the database.

Place to store user settings in Sharepoint besides profiles

Is user profiles an appropriate place to store things like number of items per page in a custom grid user selected? (I you can store it in the view, but it won't be per user this way).
My first though was to store these settings in user profiles, but there are problems with access permissions for programmatically creating user profile properties boiling down to you either have to give every user 'Manager User Profiles' permission in SSP or you have to run the application pool under a domain user, not NETWORK SERVICE. Both scenarios are unrealistic for me, so I'm now looking for another way to store such 'per user' settings.
Thanks!
Edit: I'm now considering ASP.NET profile mechanism with an additional DB to store user properties.
Given that the information is not sensitive a simple database with values stored against AD login should suffice.
And as you have the ASP.Net user database already, storing the information there would be the best option.
Maybe a Global List, that is only accessible for the SHAREPOINT\SYSTEM User and that you can then Query in a SPSecurity.RunWithElevatedPrivileges Function.
Disadvantage: You require Custom code to read/write to that list.
Cookie?
Sure they have limitations, but it is fairly easy to create the control to run javascript to add/edit the value

Resources