Questions tagged [jaas]

JAAS is the Java Authentication and Authorization Service found in the JRE (1.4+).

The Java Authentication and Authorization Service (JAAS) is a Java security framework for user-centric security to augment the code-based security. Since JRE 1.4, JAAS has been integrated with the - previously JAAS was supplied as an extension library by Sun.

The main goal of JAAS is to separate the concerns of user authentication so that they may be managed independently. While the former authentication mechanism contained information about where the code originated from and who signed that code, JAAS adds a marker about who runs the code.

By extending the verification vectors JAAS extends the security architecture for Java applications that require authentication and authorization modules.

Useful Links:

937 questions
9
votes
1 answer

How to connect to HTTPS server using Common Access Card

I need to write a java program to connect to a HTTPS server (DoD website). The website requires CAC (DoD common access card) authentication. If you access this site via browser, you insert your CAC first, and then enter a PIN. I need to accomplish…
yaya
9
votes
2 answers

"Spring Security" and "Java Authentication and Authorization Service(jaas)"

I'm so new to Spring and Spring security , we have an extended java application (not web application) and trying to use spring as a framework. I've read a little about jaas and have made a simple jaas security framework for my application (not a…
Moein
  • 739
  • 2
  • 9
  • 17
9
votes
3 answers

Apache Tomcat 1.7 How to pass additional parameters to JAAS

According to Apache Tomcat 1.7 documentation: Write your own LoginModule, User and Role classes based on JAAS (see the JAAS Authentication Tutorial and the JAAS Login Module Developer's Guide) to be managed by the JAAS Login Context…
yapkm01
  • 3,590
  • 7
  • 37
  • 62
9
votes
3 answers

javax.ejb.EJBAccessException: JBAS013323: Invalid User

On my way to migrate from JBoss 7 to WildFly, I encountered another problem. When calling an rest service which is protected by @RolesAllowed("ADMIN") I get the following error: 13:46:44,359 ERROR [org.jboss.as.ejb3.invocation] (default task-1)…
mkuff
  • 1,620
  • 6
  • 27
  • 39
9
votes
1 answer

Declare Security Domain outside of standalone.xml on JBoss 7.1.1

I'm using Security Domains on JBoss 7 for EJB-Security by Annotations. E.g. @RolesAllowed({"User", "Admin"}) Currently I declare the Security Domains in standalone.xml. This is approoriate for small things but I would like to use this kid of…
KK-Media
  • 251
  • 1
  • 8
9
votes
1 answer

Reload Kerberos config in JAVA without restarting JVM

The following code is for authenticating to a windows AD server using Java+Kerberos and it works fine- public class KerberosAuthenticator { public static void main(String[] args) { String jaasConfigFilePath = "/myDir/jaas.conf"; …
Keshav
  • 4,408
  • 8
  • 31
  • 50
9
votes
2 answers

JAAS - Java programmatic Security in Java EE 6 (without @DeclareRoles)

Java Security is my main topic for the last couple of weeks and I archive the following: Custom Valve Authentificator (extends AuthenticatorBase) Custom Login Module for jBoss (extends UsernamePasswordLoginModule) Secured Endpoint (JAX-RS) My…
Tobias Sarnow
  • 1,076
  • 2
  • 12
  • 40
9
votes
2 answers

How to propagate JAAS Subject when calling a remote EJB (RMI over IIOP) from a pure client

I am testing the propagation of JAAS Subject with a custom Principal from a standalone EJB client running on a raw Java runtime to a JavaEE server. I am targeting both JBoss and WebSphere implementations. According to this forum thread I have…
Yves Martin
  • 10,217
  • 2
  • 38
  • 77
8
votes
2 answers

JAAS additional LoginModules

I'd like to know how to combine these two authentication steps : check the user/password in an LDAP add principals (roles) found in a DB to the subject. The LDAP user repository have no idea about application-specific roles and I don't want to…
kiki
  • 241
  • 4
  • 11
8
votes
1 answer

LoginException: Login failed: Security Exception

I am attempting to setup container managed security with GlassFish v3.1.1 Build 12 and JSF 2.1. I keep getting the following exception for some reason and I am unable to login. WARNING: WEB9102: Web Login Failed:…
Adam
  • 4,590
  • 10
  • 51
  • 84
8
votes
1 answer

Tomcat security roles mapping

This is related to Tomcat 6 with JAASRealm and a custom JAAS module for security. Other Application Servers seem to support the mapping of application role names (in web.xml) to actual groups of the underlying security realm by using with server…
Ryan Fernandes
  • 8,238
  • 7
  • 36
  • 53
8
votes
3 answers

Kafka TOPIC_AUTHORIZATION_FAILED

I'm actually working on setting up simple Kafka authentication using SASL Plain Text and add ACL authorization. But I have an issue when I try to consume data. [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 0.10.0.0 [main]…
Maximilien Belinga
  • 3,076
  • 2
  • 25
  • 39
8
votes
1 answer

Why do I list security roles in web.xml when they're in jdbcRealm database?

I run JavaEE 6 web application on Glassfish 3. I use JAAS with jdbcRealm and default principal to role mapping. In my database I have table for mapping usernames to their roles: username | role ----------+------- john | admin mary |…
karolkpl
  • 2,189
  • 10
  • 39
  • 60
7
votes
1 answer

How to configure kafka consumer with sasl mechanism PLAIN and with security protocol SASL_SSL in java?

I want to create kafka consumer which is using security protocol SASL_SSL and sasl merchanism PLAIN. Can someone help me configure these details? I have read many documents on how to configure SASL details but still didnt get clear picture on how to…
vinay narayana
  • 197
  • 1
  • 2
  • 10
7
votes
1 answer

No JAAS configuration section named 'Server' was foundin '/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf'

when i run the zookeeper from the package in the kakfa_2.12-2.3.0 i am getting the following error $ export KAFKA_OPTS="-Djava.security.auth.login.config=/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf" $ ./bin/zookeeper-server-start.sh …
1 2
3
62 63