FAQ Database Discussion Community


spnego.jar switch from Java 7 to Java 8 cast exception

java,glassfish,jaas,spnego
I'm using spnego.jar from dfelix with Glassfish 4.1 as filter in web.xml. I asked the question on project forum but did not receive response. I want to switch from Java 1.7.0_45 to 1.8.0_45 (tried also other 1.8 versions). After switching on a test environment I'm getting the error shown below....

Bypassing JConsole requirement for username/password - when using a Jaas custom login module with JMX to handle authorization and authentication

java,login,jmx,jaas,jconsole
I'm using JConsole to access an MBean that is running. The MBean uses a custom Jaas login module and is run with the following command: java -classpath UserLGUGroupHandlingApplication.jar;MBeanSecure.jar -com.sun.management.jmxremote.login.config=management.properties -Djava.security.auth.login.config=./sample_jaas.config com.test.running.RunningImplementation With the management.properties file looking like this: com.sun.management.jmxremote.access.file=jmxremote.access com.sun.management.jmxremote=true...

Launching a JMX agent with a custom JAAS login module, setting login() to always return true

java,login,jmx,jaas,mbeans
I'm building a custom JAAS module for a JMX instance. The file that is being run is the following: MBean Interface package com.this.mbean; public interface ImplementationMBean { public void setName(String name); public String getName(); public void setNumber(int number); public int getNumber(); public boolean getKilled(); public void setKilled(boolean killed); } Implementation...

JBoss EAP 6.x - PolicyContext.getContext remains null

jboss,jboss6.x,jaas,java-security
I'm using JBoss EAP 6.4 for my enterprise app and I'm a little stuck when I attempt to retrieve the active subject. Of course, the user would need to authenticate, which goes through the following code snippet LoginContext loginContext = new LoginContext("CONTEXTNAME", callbackHandler); loginContext.login(); return loginContext.getSubject(); That works just fine...

Using JMX with Jaas for jconsole authentication

java,authentication,authorization,jmx,jaas
I have the following scenario: I have an application that uses JMX to expose some methods, sat on a server. At present users can connect to this via the command line using jconsole. There are currently no access restrictions. Users will be logging into a machine and have access rights...

how to activate LDAPLoginModule in Apache Karaf 3.0.3

login,ldap,osgi,jaas,karaf
I want to active Ldap Login Module in apache karaf 3.0.3. My karaf-jaas-module.xml is ; . . . <jaas:config name="karaf" rank="2"> <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required"> initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory connection.username=admin connection.password=xxxxxxx connection.protocol= connection.url=ldap://activedirectory_host:389 user.base.dn=cn=orcladmin,cn=users,dc=vmldapdevelop,dc=com user.filter=(sAMAccountName=%u) user.search.subtree=true...

“Forbidden”, cannot authenticate using JAAS (WildFly)

java-ee,wildfly,jaas
I've done it as it is described in all the tutorials. Add MySql connetion jar as a module to WildFly (mySql-conn-driver.jar) module add --name=com.mysql --resources=/path/to/mysql-connector-java-5.1.24-bin.jar --dependencies=javax.api,javax.transaction.api /subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-class-name=com.mysql.jdbc.Driver) Added DataSource [[email protected]:9990 /] /subsystem=datasources/data-source=niwads:add( driver-name=mysql, user-name=db_user,...

Malformed PAC logon info on new KerberosToken

java,kerberos,jaas
I'm using the code here to get authentication information from a Kerberos token. In there I've configured the domainUsername and domainUserPassword and just ran it as specified in the readme.md. Then, from a browser that is in the AD domain, I connect to http://server:8080/spnego and I see on the opened...

To get the Username and Password from LTPA token for Filenet-P8 CE Connection

jaas,filenet-p8,filenet,filenet-content-engine,ltpa
We have a Custom developed application and I want to make a Connection with Filenet-P8 using Java API's but the problem is I want to fetch the Username and pswd from LTPA token. I do not have prior exp. with LTPA so I don't know how to achieve this? A...

Server Authentication Module forwarding in Glassfish

java,glassfish,jaas,jaspic,jsr196
I found this guide for developing your own Server Authentication Module (SAM) for Glassfish: http://docs.oracle.com/cd/E18930_01/html/821-2418/gizel.html It seems pretty straightforward to verify some credentials (in HTTP Auth headers for instance), but my question is this: Can I develop my SAM in such a way that I can forward the user to...

JAAS Forbidden Error (403) when accessing a protected URL

java-ee,glassfish,jaas
I have just started working on a pet project using JSF, JPA, and EJB on a GlassFish server and I'm currently setting up the authentication module using JAAS. It's about complete now except for a bug for which I can't figure out a solution. My Premise I have a single...

Can't map roles to gropus using ibm-application-bnd.xml

websphere,jaas,user-roles
I'm trying to map user groups using ibm-application-bnd.xml. Put it into META-INF folder. On try to access secure page get next message: [08.05.15 17:42:21:242 MSK] 00000084 WebCollaborat A SECJ0129E: ... GET в null:/loginmodule/date/, Authorization failed, Not granted any of the required roles: user-role When I try configure it with ibm...

How use @Ressource SessionContext right?

ejb,jaas
I need a bean for inject @Ressource SessionContext ctx with JAAS. With the SessionContext can I check the user rights about ctx.isCallerInRole("ROLE"); But what is the right Bean declaration? @Statful? @Stateless? and @SessionScope? I need a instance for every User....