Authenticating using Azure Directory for a Hosted Java Application - java

Our product is a hosted Web application which needs to be accessed by a client X using SSO.
The client credentials are maintained on a Azure Cloud platform, and users are authenticated when they login to their Windows PC.
What is the best way for us to integrate our application on the client's Windows environment, so that all users are authenticated without logging in to our application?
The client has pointed out that we could use ADAL but i'm not sure if that works as we do not have our own AD based or LDAP based user management platform. We currently store all the user management data in the DB.
I'm a newbie to this topic so any guidance is really appreciated.

Based on my understanding, the issue is that the authenticated user from a portal access a url link of Java Web Application working with SSO when the Java webapp and the portal are not identical.
Per my experience, I think you can try to use Azure AD Application Proxy to solve the issue. You can refer to the document https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-sso-using-kcd/#working-with-sso-when-on-premises-and-cloud-identities-are-not-identical to know the application scenario of Application Proxy.
You can try to follow the steps below to implement the needs. And as references, there are some documents explained how to do for each step.
Enable the Azure AD Application Proxy on Azure Portal, and install & register the proxy connector for your application. Please refer to the doc https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-enable/ for more details.
Publish your application using Application Proxy, please follow the wizard steps of the doc https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-publish/.
Enable SSO for your application and the portal, please review the section Working with SSO when on-premises and cloud identities are not identical of https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-sso-using-kcd/#working-with-sso-when-on-premises-and-cloud-identities-are-not-identical.
If some issue encounted in implementing the plan, you can firstly refer to the doc https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-troubleshoot/ to troubleshoot.
Any concern, please feel free to let me know.

Related

Authentication options for Java web application

I have a question about integrating authentication into my web application.
First let me give the relevant technology background of my web application -
Application/Web Server - Tomcat 8.5
Underlying OS - CentOS 7.x 64-bit
Programming technology - Java Servlets 3.1
JDK version - 1.8
UI technology - Browser based; Developed using Angular2/Javascript/HTML/CSS
Web application users - Targeted at enterprise users
As of now, there isn't an authentication system built into the web application. However as I build this web application, I need to include an authentication module.
My main points to consider as I decide on authentication system/technology are -
I preferably do not want my application to deal with the storage and protection (on disk) of the user credentials
I preferably do not want my application to deal with enforcing password complexity, history, expiration policies etc.
My application will have to provide for -
A login page to allow the user to login
A change password page
A create user page
Based on the above, I am currently thinking of deploying a Windows Server 2016 instance as the Active Directory(AD) server that will hold the credentials for the application users. Note that at this point, this Windows server is not planned to be shared with any other application to support a single sign-on experience across applications.
I am planning to configure my Tomcat server with a JNDI realm to authenticate users (against the AD) and then use some kind of Java AD library that will allow me to create an user and change a user's password in AD via my application's create user and change password page.
My application will support its own custom roles and authorization constraints so i am not looking to use AD's group membership for authorization within the web application.
My questions are -
With the above setup, are there any reference authentication systems/libraries/modules that might be better suited (than AD) to integrate within my web application?
If I go with the above Windows AD server approach then are there any Java (inbuilt or community developed) AD libraries that allow for creating an user in AD, changing user password in AD etc. I have used the JNDI realm before so I am sure that it can be used to authenticate the incoming user against AD
I am not an expert in Spring Security and my web application does not currently use Spring Security but I am open to using it if Spring Security includes a solution to my problem described above.
I am also not worried about supporting single sign-on as such and its totally fine in my scenario if the application users have a separate login for my application.
Since my web application is targeted at enterprise users, I don't want to leverage Facebook authentication. As much as possible I want to ensure that the credentials are maintained in a server within the deployment infrastructure rather than the credentials being hosted and maintained by a 3rd party service
Thank you for your help and suggestions

Securing a google app engine application with oauth2 on call from a Wildfly/Keycloak secured web application behind a firewall

Requirements
My requirements are to write a secure web application that runs behind a firewall and via the OAuth2 protocol accesses a google app engine application. The google app engine should not be able to be accessed in any other way (save by the developer/admin). The programming language is Java. The authorization is to be server to server.
Deployment
I will have a "gate keeper" application running on WildFly (JBoss) with Keycloak and will use active directory to login my users on this web application running behind the firewall. In this way, everyone who has an account at the business I am servicing should have access to the google app engine application. Again, this processing runs behind the business's firewall as a Java EE web application deployed to WildFly.
The next step after a successful login is for the user to get redirected to the web page that the google app engine is servicing. I don't want any other users (except my developer account/owner account) to be able to reach this url.
I have created the JSON user credential file and downloaded from the google developers console for my google app engine project.
I also have included the google-api-client in my maven pom file on my gatekeeper project.
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.20.0</version>
</dependency>
from https://developers.google.com/api-client-library/java/google-api-java-client/setup
Questions
How do I code (Java) the wonderful world of OAuth 2.0 using the google api client? I imagine that I will have code on the "gate keeper web application" (Java) and probably some configuration xml in my appengine-web.xml. Will my app engine application need any additional code? Does anyone have step by step instructions or a sample code/configuration? I have read https://developers.google.com/identity/protocols/OAuth2ServiceAccount and yet am at a loss on how to apply.
Thanks in advance for your help. I would guess that this is a very common scenario for SaaS providers?
As mentioned previously, you're asking at least 2 questions. First, how to authenticate an application against a OpenID Connect 1.0 authentication server - in this case, Keycloak - behind a firewall. Secondly, how to use the google-api-client.
I'd suggest taking a look at the OAuth Bible to understand how OAuth 2.0 Two Legged and Three Legged flows are implemented. Three Legged authentication is more secure but your firewall will pose a problem.
Also, you'll be more likely to get help if you break out the google-api-client part into a more concretely defined question.

How to authenticate a windows user in java web service?

I recently did a quick mock up of a web service using C# on IIS. All users are using Windows so, in the web service, I was able to get the current user via NTLM.
Now I have to migrate this to a Java web service running on Tomcat or WebSphere.
What authentication options are open to me? I see that Apache HttpComponents has an NTLM feature but I can only find instructions on how to use it on the client side. Can I use it in my web service to determine the current user? (Remember, all users will be Windows users)
Just to clarify: this is for use in a company intranet and all users will be logged in to Windows. This is why NTLM seems to be the right way to go.
Try WAFFLE windows authentication framework.
(http://waffle.codeplex.com/)
It is one of the third party libraries suggested in the tomcat documentation. (https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html)
It comes with zero configurations and all you have to do is to modify your web.xml to you waffle as in this tutorial (http://code.dblock.org/2010/05/20/single-sign-on-tomcat-negotiate-authenticator-kerberos-ntlm-w-waffle.html)

Google Apps domain integration

We have a Java web application (using struts and hibernate) and want the users to automatically log into the Google apps domain accounts.
We have set up the Google apps for Education domain accounts and created the users in it and we have the same users in our java web application also.
The requirement is that when the users log into our application portal, their is a link to go to Google apps, once they click on this link, it should log them in without asking for password.
We are using Tomcat 7 as our server for the web application. Which SSO tool should we use for doing this? Oracle's SSO is paid, Shiboleth doesn't work with Tomcat 7.
Any help highly appreciated? Is SSO the only option or another way to do this.
Thanks
Any SSO solution that supports the SAML2 protocol should work. Apart from the expensive solutions that Oracle, IBM, CA and others provide, you can find the following solutions that definitely work well with Tomcat7 and are open source :
Apereo (ex Jasig) CAS : Used quite a lot in the education community. Simple to setup but specific configurations (like an advanced authentication module) might require some programming effort. It supports Google Apps authentication, but none other SAML2 service. If you really want to only login to Google Apps, that's a great and simple solution.
Forgerock OpenAM : Formerly Sun OpenSSO, this is used in education and industry. Many more features, supports most of the SAML2 service providers out there including Google Apps, but more complex.
Note that if you already have a portal solution, you should check if that portal does not already support SAML2 federation and could act as the SSO server.
Note also that you will need to link the portal authentication and the SSO server authentication, to make sure that your users do not authenticate twice. This can be done in two ways :
Tell the SSO server to delegate the authentication to your portal solution. This might require some light custom coding depending on your portal.
The opposite : tell the portal to use the SSO as an authentication solution. Most portals support some kind of authentication delegation so it should only be configuration?
Lastly, if your authentication is setup on Tomcat itself (that is if your portal already delegates the authentication to the Tomcat container), then you can do the same for the SSO server.

CA SiteMinder offline authentication for thick Client

I am looking for a way to authenticate a standalone thick client when its offline using CA siteminder. I am already using siteminder for authentication, but now I want to access the application even when its offline.
Is there any way to store the tokens from a previous session and use it again or some other way I can do it?
The application is based on swing java.
SiteMinder relies on a Policy Server to authenticate, authorize, and enforce policies. This makes offline integration pretty much impossible (as far as I am aware).
We use a siteminder agent called "SiteMinder Agent for SAP WebAS". This agent is installed on a SAP Java As. It's basically deployed as a Login Module Link. Im not sure if I can Monitor this login module.

Categories

Resources