</>CodexBash
All articles
Security

JAAS: authentication in Java

Java's built-in, pluggable authentication framework: LoginContext, LoginModule, CallbackHandler and Subject, the configuration file and its flags, a working login module, and where JAAS still fits today.

CodexBash, , 6 min read

JAAS, the Java Authentication and Authorization Service, has been part of the JDK since Java 1.4. It lets an application say "sign this user in" without hard-coding how: the same code can check a password file, an LDAP directory or a Kerberos ticket, depending on a configuration file. You meet it in application servers, Kafka, ZooKeeper, Hadoop and anywhere Kerberos is used from Java. This article explains its parts and builds a working example.

Sign in to read the rest

The whole 6 minute article is free with an account, along with every problem, lesson and tutorial. No card.