0

Currently I am implementing a custom identity asserter in WebLogic 14C environment. I have developed following components. An AuthenticationProvider.xml (which defines MBean Definition File elements)

   <MBeanAttribute 
  Name          = "ProviderClassName"
  Type          = "java.lang.String"
  Writeable     = "false"
  Default       = "&quot;com.test.authentication.CustomAuthenticationProvider&quot;"
  />  
  <MBeanAttribute 
  Name = "SupportedTypes"
  Type = "java.lang.String[]"
  Writeable = "true"
  Default = "new String[] {&quot;CustomToken&quot;}"
  />
  <MBeanAttribute 
  Name= "ActiveTypes"
  Type= "java.lang.String[]"
  Writeable = "true"
  Default = "new String[] {&quot;CustomToken&quot;}"
  />

I have also class that implements interfaces AuthenticationProviderV2, IdentityAsserterV2:

public class CustomAuthenticationProvider implements AuthenticationProviderV2, IdentityAsserterV2 {
@Override
public IdentityAsserterV2 getIdentityAsserter() {
    return this;
}

public PrincipalValidator getPrincipalValidator() {
    return new PrincipalValidatorImpl();
}

@Override
public CallbackHandler assertIdentity(String type, Object token, ContextHandler context) throws IdentityAssertionException  {
      System.out.println("NSPIRESOracleLoginModule.assertIdentity");
      System.out.println("\tType\t\t= "  + type);
      System.out.println("\tToken\t\t= " + token);
      return null;
   }

}

I am calling this custom Identity asserter from a servlet like this:

Subject mySubject = Authentication.assertIdentity("CustomToken" , "username=test-user".getBytes());

I get following error when my servlet calls this method:

javax.security.auth.login.LoginException: [Security:090377]Identity Assertion Failed, weblogic.security.spi.IdentityAssertionException: [Security:090380]Identity Assertion Failed, Unsupported Token Type: CustomToken

From WebLogic's console I have configured custom provider and I can see that the my custom token is available in ActiveTypes list.

Configuration active types

What do I need to fix this issue?

: WLS 14 Documentation link

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.