Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Authentication Library

I am developing a server/client Java application where I need to authenticate the client before sending data, also I need to encrypt the sent data after authentication and to ensure its freshness

I am wondering what is the best library that I could use to do that?

like image 267
htc Avatar asked Sep 07 '11 19:09

htc


People also ask

How do you authenticate in Java?

Applications enable the authentication process by instantiating a LoginContext object, which in turn references a Configuration to determine the authentication technology or technologies, or LoginModule (s), to be used in performing the authentication.

How many types of authentication are there in Java?

There are four types of authentication available: BASIC, FORM, CLIENT-CERT and DIGEST.

What is MSAL4J?

The Microsoft Authentication Library for Java (MSAL4J) enables applications to integrate with the Microsoft identity platform.

How does Java authorization work?

Authorization of the Java Authentication and Authorization Service (JAAS) augments the existing code-centric access controls with new user-centric access controls. Permissions are granted based on what code is running and who is running it.


3 Answers

Take a look at the security module in the Spring framework. Pretty much covers all the common authentication and authorisation services

like image 160
geez Avatar answered Oct 23 '22 04:10

geez


Java Authentication and Authorization Service is a part of Java spec since SE 1.4. The API is fairly well-defined, but as it has been written with goal of covering every possible auth backend (including LDAP, smart card and similar stuff) it may bring too much functionality overhead.

Apache Shiro is one of libraries/frameworks that I am aware of, that build upon JAAS, abstracting it's concepts and making them generally easier to use. The second one is jGuard, but as of Dec 2013 it seems to not being maintained anymore.

like image 36
Red Avatar answered Oct 23 '22 02:10

Red


You could integrate with an existing LDAP (or Active Directory) registry using OpenLDAP ( http://www.openldap.org/jldap/ ).

like image 1
corsiKa Avatar answered Oct 23 '22 02:10

corsiKa