I have been trying to implement SSO in an existing java web-application. I have spent lot of hours to understand this thing but couldn't get success so far. Can anyone tell me some guided way by which I can achieve it.
I am looking for
With what module/API should I start
What will be best way to implement SSO for a beginner
Any good books/blogs/websites.
PS : I know Servlet/JSP and have built very simple application using JSP/Servlet till now. (NO FRAMEWORK).
What exactly do you mean by single sign on, is your application distributed or single sign on on different applications?
You could write filters for authentication and authorisation; where you check for a valid session and if the user has logged in; depending on that dispatch the request to a resource or login page.
Another option is to use Java EE declarative security.
Related
currently we are developing a JAVA APP that runs on TOMCAT and uses POSTGREE SQL
And we have an introducting website (JOOMLA 2.5 based) that explains the app, and also have a register module, that runs on APACHE PHP, on a different server.
Our goal is that the clients enter direct to our website JOOMLA, register there and then they can go directly to the web-app.
Very like to www.tiendanube.com or shopify.
The java-app has a login as well as the joomla website.. We need to unify those process, we cannot find a form to achieve this.
The problem is also that Joomla cannot run in the same server as the web-app.
Is there any way to interconnect both the web-page and the app (which runs in differents server) to make then look as one ?
So we thinked that when the user register in the joomla it also has to be saved in the same POSTGREE SQL of the java app. Since the java app is running in a different server we cannot access postgree SQL of the java app
That can be a solution, still we are pretty sure it has to be a easy solution or a more powerful and better solution for this.
Also been the 2 services in differents servers, it seems that we are not able to mantain the same domain for both.
We will really appreciate some help
Thanks very much
Facundo
You have at least two ways to do it.
Use a LDAP, GMail authentication or equivalent. Easy, Joomla already have it
Do in a manual way with "Single Sign On across multiple domains". Will have to undestand how session cookies works and avoid avoid some problens.
Please read my recent answer on implementing SSO across subdomains in joomla
I want to create a websocket Java API for these requirements:
"When the user logs into my application, if he enters a page which has constant updates from the server, then the Java API should identify the user and keep pushing the contents on a regular interval"
So for this I want to get started in creating a generic Java API so that for other pages, which requires push from server, I can use the APIs instead of reinventing the wheel everytime
What are the things I should take into consideration and how should I approach this problem
Please key in your thoughts
Thanks in advance
GitHub has a number of libraries which deal with Java and WebSocket. You can build your application on top of one of them. Examples are vert.x, SockJS, Atmosphere etc.
At the SockJS page you can see a list of clients/servers for working with it.
IMHO It is better to re-use one of the existing libraries/frameworks than building your own, because yours is a common usecase and working with web sockets, providing corss browser compatibility etc are not trivial as of now.
This is a very beginner question. I have tried to search for advice but am overwhelmed by the amount of information and would like some help with ideas on approaches to server design or what to search for!
What I would like to set up is a backend server that provides search capabilities and business logic and validation across some fairly basic data. It wont get too large.
I would then like to be able to plug in a website as a front end or a mobile app or a facebook app or even a desktop app..
My question is what is the best way for front ends to hook into the backend? I would like to have various user accounts with permission levels so authorisation would be important.
I generally only code as a hobby so whilst technically I have built a spring based website before the exact semantics of the client server relationship weren't clear to me. Now I want to separate the backend so that is is agnostic of how the data is displayed or entered completely and can run on a separate machine.
Thanks,
Rob
There is a ton on options. I had good expirience with apache CXF rest services (logic encapsulated in java beans, spring configuration) and pico web remoting ( more exotic,
but also rest service and plain java objects providing business logic)
if you ar already using spring, I would recommend to stick with CXF - it integtrates seamlesly ( and is spring configured itself )
I'm fairly new to java development and I have found myself tasked with implementing a functionality authorization system for a desktop application written in java.
Currently the application requires user authentication at startup and users are authenticated against an active directory server via LDAP.
The application as it stands has no user privillage system in place, once a user is authenticated they have full access to the applications entire functionality.
What I need to do is define a number of user roles or groups which have access to different functionality i.e. user:Alice (of group:Admin) may see menuItem:EditCell in a popup menu for a JTable but user:Bob (of group:Peasant) may not.
It has been suggested that I look into Spring security and method/class annotation but I'm finding it a little difficult to get my head around the information I have found so far.
Is there anyone who has had a similar experience around who might be able to offer some assistance?
Cheers,
I would definitely recommend Shiro over Spring for your use case. Take a look at their website and go through the 10 minute quick guide. You'll be surprised at home much you can get done with simple, straightforward code.
For simple testing you can define roles within Shiro itself, but eventually you are going to want to put all the roles into your LDAP.
I´m developing an web application in java that is called from a pre-existent portal.
I need to check if the user is authenticated in this portal to show my application.
I don´t have access to his database to check the user and pass again.
I don´t know what the portal can pass to me that garantees that the user is
authenticated.
Maybe a token, or i can check the domain. I´m not sure how to do this.
I´ve searched to use spring security, but i didn´t find a solution yet.
Some sites say to integrate it with cas, but i don´t have cas here.
Can anyone help me?
Web applications can use container based security.
You need to hook this mechanism up with the portal which may, or may not, be relatively easy. The portal must expose its security mechanism.
How to actually do this, depends on your actual container.
I think it is not possible to answer the question here. If other portal links to your application and requires you to identify other portal's user, it must specify how this could work. You all need to specify an interface between the two applications which describes how exactly user identification has to happen. "other portal" people should tell you what they support as well as what they recommend...