AnsweredAssumed Answered

Custom Authentication Scheme - Failed to query authentication scheme

Question asked by niranjan.r on Mar 7, 2014
Latest reply on Mar 21, 2016 by CDemuth

Hi,

I am trying to create a Custom Authentication Scheme for one our applications (Siteminder R12.6). I have followed the instructions as provided by this post as well instructions on the CA Support site

Posthttps://communities.ca.com/web/ca-identity-and-access-mgmt-distributed-global-user-community/message-board/-/message_boards/message/89929804?_19_redirect=https%3A%2F%2Fcommunities.ca.com%2Fweb%2Fca-identity-and-access-mgmt-distributed-global-user-community%2Fmessage-board%2F-%2Fmessage_boards%2Fsearch%3F_19_keywords%3Dcustom%2Bauthentication%2Bscheme%26_19_searchCategoryId%3D0%26_19_breadcrumbsCategoryId%3D0%26_19_redirect%3Dhttps%253A%252F%252Fcommunities.ca.com%252Fweb%252Fca-identity-and-access-mgmt-distributed-global-user-community%252Fmessage-board%252F-%252Fmessage_boards%252Fmessage-boards-home%253F%2526%2523p_19%26_19_%23p_19%3D%26_19_formDate%3D1391560305895%26%23p_19&#p_19

Supporthttps://enable.ca.com/answers/us/CA-SiteMinder/12.51-CA-SiteMinder/scenario/create_custom_auth_scheme_using_java?parameters&q&page=13

Initially, I tried creating my own based on the sample code that was provided under the sdk samples folder (see the first link above for details) but ran into the following error.

Reject s12/r3 : internal error - failed to obtain scheme credentials for scheme 'CustomAuthenticationSchemeTest'

Deployed the sample that was given in the SDK and ran in to the same error. I have noticed a number of posts on this forum that mention this error but none have been provided with a solution. If it was resolved the solution was not posted.Your help would be very much appreciated. I have followed the instructions in the post above to the very end, but please let me know if you require any more information.

Thanks,

Niranjan

Logs(The snippet below is from the moment I attempt to hit the protected resource) :

[03/06/2014][19:13:46.597][19:13:46][7268][3076][IsProtected.cpp:95][CSm_Az_Message::IsProtected][][sm-iis-agent][/testform/testingasp.asp][][][][][][][][][][][][][][][][][][Starting IsProtected processing.]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmAuthorization.cpp:531][CSmAz::IsProtected][][][][][][][][][][][][][][][][][][][][][Enter function CSmAz::IsProtected]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmAuthorization.cpp:607][CSmAz::IsProtected][][][/testform/testingasp.asp][][][Test Pages Realm - Form-based Auth][Test Pages Domain][][][][][][][][][][][][][][Resource is protected by realm.]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmAuthorization.cpp:609][CSmAz::IsProtected][][][][][][][][][][][][][Realm][][][][][][][][Leave function CSmAz::IsProtected]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmJVMSupport.cpp:251][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][SmJVMSupport: JVM library loaded sucessfully]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmJVMSupport.cpp:255][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-01030] SmJVMSupport: Using the following JRE: D:\Java\jdk1.7.0_05\jre]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmJVMSupport.cpp:260][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-01040] SmJVMSupport: Loaded the following JVM library: D:\Java\jdk1.7.0_05\jre\bin\server\jvm.dll]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmJVMSupport.cpp:287][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][SmJVMSupport: Attempting to retrieve existing JVM instance]
[03/06/2014][19:13:46.597][19:13:46][7268][3076][SmJVMSupport.cpp:300][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][SmJVMSupport: Attempting to create new JVM instance]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #0: -server]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #1: -Xbootclasspath/p:C:/Program Files (x86)/CA/siteminder/bin/endorsed/xercesImpl.jar;C:/Program Files (x86)/CA/siteminder/bin/endorsed/xml-apis.jar;C:/Program Files (x86)/CA/siteminder/bin/endorsed/resolver.jar;C:/Program Files (x86)/CA/siteminder/bin/endorsed/serializer.jar;C:/Program Files (x86)/CA/siteminder/bin/custom/MAOAuthScheme.jar] * Jar with the code from the Samples folder
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #2: -XX:+AllowUserSignalHandlers]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #3: -Xrs]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #4: -Xms128m]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #5: -Xmx256m]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #6: -DNETE_PS_ROOT=C:/Program Files (x86)/CA/siteminder]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #7: -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #8: -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #9: -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XML11Configuration]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #10: -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #11: -Djava.endorsed.dirs=C:/Program Files (x86)/CA/siteminder/bin/endorsed]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #12: -Djava.class.path=C:/Program Files (x86)/CA/siteminder/resources;C:/Program Files (x86)/CA/siteminder/config/properties;C:/Program Files (x86)/CA/siteminder/bin/jars/smbootstrap.jar]
[03/06/2014][19:13:46.612][19:13:46][7268][3076][SmJVMSupport.cpp:401][GetJVMEnv][][][][][][][][][][][][][][][][][][][][][JVM Option #13: -Djava.util.logging.config.file=C:/Program Files (x86)/CA/siteminder/config/properties/logging.properties]
[03/06/2014][19:13:46.675][19:13:46][7268][3076][SmJVMSupport.cpp:478][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-01060] SmJVMSupport: Successfully created JVM using options file: C:\Program Files (x86)\CA\siteminder\config\JVMOptions.txt]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:108][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00690] SmJavaAPI: Found class ActiveExpressionContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:119][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00700] SmJavaAPI: Made global reference to class ActiveExpressionContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:131][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00710] SmJavaAPI: Found method ActiveExpressionContext.invoke]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:143][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00720] SmJavaAPI: Found method ActiveExpressionContext.release]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:155][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00730] SmJavaAPI: Found class TunnelServiceContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:166][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00740] SmJavaAPI: Made global reference to class TunnelServiceContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:178][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00750] SmJavaAPI: Found method TunnelServiceContext.tunnel]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:190][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00760] SmJavaAPI: Found class SmAuthenticationContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:201][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00770] SmJavaAPI: Made global reference to class SmAuthenticationContext]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:213][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00780] SmJavaAPI: Found method SmAuthenticationContext.query]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:223][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00790] SmJavaAPI: Found method SmAuthenticationContext.init]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:233][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00800] SmJavaAPI: Found method SmAuthenticationContext.authenticate]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:243][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00810] SmJavaAPI: Found method SmAuthenticationContext.release]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:255][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00820] SmJavaAPI: Found class NativeCallbackError]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:266][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00830] SmJavaAPI: Made global reference to class NativeCallbackError]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:278][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00840] SmJavaAPI: Found class UserAuthenticationException]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:289][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00850] SmJavaAPI: Made global reference to class UserAuthenticationException]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:301][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00860] SmJavaAPI: Found class Throwable]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:312][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00870] SmJavaAPI: Made global reference to class Throwable]
[03/06/2014][19:13:46.706][19:13:46][7268][3076][SmJavaAPI.cpp:324][][][][][][][][][][][][][][][][][][][][][][LogMessage:INFO:[sm-JavaApi-00880] SmJavaAPI: Found method Throwable.getLocalizedMessage]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][SmAuthServer.cpp:336][][][][][][][][][][][][][][][][][][][][][][LogMessage:ERROR:[sm-Server-02940] Failed to query authentication scheme 'CustomAuthenticationSchemeTest']
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:406][CSm_Az_Message::SendReply][][][][][][][][][][][][][][][][][][][][][Enter function CSm_Az_Message::SendReply]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:825][CSm_Az_Message::FormatAttribute][s12/r3][sm-iis-agent][][][][Test Pages Realm - Form-based Auth][Test Pages Domain][][][][][][][][][][][][][Reject s12/r3 : internal error - failed to obtain scheme credentials for scheme 'CustomAuthenticationSchemeTest'][Send response attribute 158, data size is 112]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:825][CSm_Az_Message::FormatAttribute][s12/r3][sm-iis-agent][][][][Test Pages Realm - Form-based Auth][Test Pages Domain][][][][][][][][][][][][][][Send response attribute 146, data size is 0]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:825][CSm_Az_Message::FormatAttribute][s12/r3][sm-iis-agent][][][][Test Pages Realm - Form-based Auth][Test Pages Domain][][][][][][][][][][][][][][Send response attribute 147, data size is 0]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:595][CSm_Az_Message::ProcessMessage][s12/r3][sm-iis-agent][][][][Test Pages Realm - Form-based Auth][Test Pages Domain][][][][][][][][][][][][][][** Status: Error. Reject s12/r3 : internal error - failed to obtain scheme credentials for scheme 'CustomAuthenticationSchemeTest']
[03/06/2014][19:13:46.893][19:13:46][7268][3076][Sm_Az_Message.cpp:599][CSm_Az_Message::SendReply][][][][][][][][][][][][][][][][][][][][][Leave function CSm_Az_Message::SendReply]
[03/06/2014][19:13:46.893][19:13:46][7268][3076][IsProtected.cpp:234][CSm_Az_Message::IsProtected][s12/r3][][][][][][][][][][][][][Reject s12/r3 : internal error - failed to obtain scheme credentials for scheme 'CustomAuthenticationSchemeTest'][][][][][][][Leave function CSm_Az_Message::IsProtected, Failed to obtain scheme credentials.]

 

 

 

 

Outcomes