Implementing your own SSL provider

Hello,
Im working on a new TLS/SSL implementations. I got all the classes(i.e. sslsocket, etc) ready. The problem i have is that i cant get my socketfactory using SSLFactory.getDefault, because when i do it an exception lang.runtime.exception:export restriction: SunJSSE only is thrown. Is there any way i can fix it?
I live outside the US
looking forward to any replies ;)
lukasz

I assume you are on JDK 1.4.x? At this point, no, you can't plug in your own provider into the Sun JDK.
However, in 1.5.x, you can, as long as the sslsocket/sslengine only reports SSL/TLS ciphersuites that
are on the "approved" list.
http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/jsse-tiger-beta2.html#PLUG

Similar Messages

  • The Agile Buffet Table: Implement your own Agile process at GIDS 2011

    Great Indian Developer Summit 2010 u2013 Gold Standard for India's IT Professional Ecosystem
    Are you new to Agile? Having challenges implementing an agile process in your organization? Have you been using Scrum, but need to bend the rules to make it work in your organization? Can't get the business to "buy-in"? Joel Semeniuk is coming to India's biggest summit for the software developer ecosystem - Great Indian Developer Summit to teach how to implement an agile process in your organization. You'll look at the "buffet table" of agile processes and procedures and learn how to properly decide "what to eat." He'll start by defining XP, Scrum, Kanban and some other popular methodologies and then teach how to mix and match each process for various scenarios, including the enterprise, ISVs, consulting, and remote teams. Then take a look at agile tools and how they will aid in implementing your development process. Lastly, he will talk about how to "sell" agile to your business partners and customers. The summit will be held 19-22 April 2011 at the IISc in Bangalore.
    Joel Semeniuk is a founder of Imaginet Resources Corp; a Canadian based Microsoft Gold Partner. He is also a Microsoft Regional Director and MVP in Team System, and INETA speaker, and has a degree in Computer Science. With over 18 years of experience, Joel specializes in helping organizations around the world realize their potential through maturing their software development and information technology practices. Joel is passionate about Application Lifecycle Management tooling, techniques, and mindsets and regularly speaks at conferences around the world on a wide range of ALM topics. Joel is also the co-author of "Managing Projects with Microsoft Visual Studio Team System" published by Microsoft Press as well as dozens of other articles for popular trade magazines. Joel is also a certified Scrum Master.
    For further information on GIDS 2011, please visit the summit on the web http://www.developersummit.com/

    Hi Sivaram,
    This error is generally related to issues with Memory.
    For very high performance intensive activities you may even need to increase the memory temporarily...
    Please check with your basis team...
    Regards,
    Ashok

  • How to implement your own class.......I don't have a clue, please help!

    I'm new with Java and am so confused! I need help with the following exercise.
    Implement a class Employee. An employee has a name (a string) and a salary (a double). Write a default constructor, a constructor with two parameters (name and salary), and methods to return the name and salary. Write a program that tests your class. How do I do this?
    I can't figure out how to do this!!!!! Please show me an example!

    public class Employee {
      private String name;
      private double salary;
      public static void main(String[] args) {
        Employee employee = new Employee("Max Just", 64000);
        System.out.println(employee.getName() + "\nsalary: " + employee.getSalary());
      public Employee() {
        name = null;
        salary = null;
      public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
      public String getName() {
        return name;
      public double getSalary {
        return salary;

  • SSL Provider showing no sockets

    Hi Experts,
    I am facing the following issue: I am trying to setup SSL on a new system but when trying to apply the certificate to the 5xx01 port I am not seeing any sockets in the Visual Admin under SSL Provider --> Dispatcher 1234 --> Active / New Sockets.
    Just as I have done with other systems I have uploaded a correct PK12 key and a certificate (named ssl-credentials and ssl-credentials-cert). But even after a restart there is no socket showing (under SSL Provider in the Visual Admin) in either, active or new sockets.
    Anyone know if these need to be initialized or created? I have setup 8+ systems in the landscapes with SSL and have not run into this issue yet. You never stop learning ...
    I would greatly appreciate any input given.
    Thanks in advance,
    Jan

    Did you try it out? What happened? SSL is enabled per default; you don't need to do anything.
    You should however, remove and then add the credentials in the SSL provider. I've noticed that this is necessary when you change anything. You should also add your own root certificate there.

  • Pay for oracle courses on your own ?

    Hello,
    i wanted to ask you if anyone of you would pay for oracle training courses (which are about ~ 2.400 € here for ~ 5 days) on your own if your current employer refuses to pay for them and you would like to improve your chances on the job market.

    [...] if your current employer refuses to pay for them
    and you would like to improve your chances on the job market.I can see two sides to this situation...
    If you are about to implement a technology (something like Dataguard or RAC) that's new to you then your employer should be providing you with the opportunity to develop the skills you are going to need. Whether that is through a knowledge transfer from colleagues, self training (such as CBTs or books) or attending a training course really depends on the situation (time, budget, opportunity, etc). If your employer isn't willing to do anything then you aren't getting the support you need from them to do your job properly and you need to decide whether that means it's time to move on or not.
    Equally, your employer is not obliged to help you to 'improve your chances on the job market'. I've worked with people before who have been entirely unable to comprehend why our employer wouldn't send them on a week-long training course for a technology we not only didn't use but which we would almost certainly never use.
    As for your specific question - no, I can't say that I would pay for Oracle courses myself. For one thing, I can't afford it... but even if I could, I think that reading the manuals (and maybe a good book or two) whilst sitting at a test system is probably a better use of five days.
    Don't get me wrong - I've been on plenty of Oracle courses and think they are great. If my employer wants to spend £2k then I won't say no... but if I were paying myself I'd find it hard to balance up the cost with what I get out of it.

  • Will using your own router allow loopback connections?

    SomeJoe7777 you are correct regarding the route of a given packet when using a WAN IP locally (NAT loopback). However will again state that NAT loopback does not work using a router behind the NVG589. As you stated it should...which is why the issue lies with the NVG589. Most likely something to do with IP passthrough mode on the NVG589 not being a true bridge mode which in turn does effect one's own router. Bottom line I encourage you to attempt NAT loopback yourself with a router behind the NVG589 and report your results. It wouldn't be the first time that ATT said something should work only to later admit it was a problem with their hardware.

    NAT loopback is defined as a function of a router where connections to ports on the outside IP address are translated and routed to the server defined in the router, even when the connection attempt comes from the "inside" portion of the network.
    e.g.. Let's say we have a router with an outside IP address of 99.99.99.99 (a public IP address), and the router has been configured so that inbound connections to port 80 on that WAN interface are translated to a destination address of 192.168.1.20 (on the inside network). This enables a web server running on the 192.168.1.20 machine to respond to web requests from the Internet, provided those web requests are coming in to 99.99.99.99.
    If another computer on the internal network, such as 192.168.1.101, can pull up the web site using http://99.99.99.99 (instead of the direct connection of http://192.168.1.20 ) then the router implements NAT loopback.
    Now, knowing that, let's review:
    If you use your own router, and it is the device doing the network address translation (NAT), that means it's outside address is x.x.x.x (a publically routable IP address), and it's inside addresses are private, in RFC 1918 address space. This can be set up with the U-Verse modems using DMZPlus (2Wire/Pace 3xxx series gateways) or IP Passthrough (Motorola NVG5xx series gateways).
    NAT loopback in this situation is completely dependent on the functionality of your own router. By definition, any NAT loopback request under this circumstance never leaves your network and your router, and thus never touches the U-Verse gateway at all.
    The bottom line is that if NAT loopback is not working with your router, then you either haven't configured your router properly, or your router doesn't support it. The ISP gateway has no bearing on this functionality whatsoever when configured in conjunction with your own router as described above.
     

  • Roll Your Own - APEX 4.0 and JQuery-UI Application

    For those with a apex.oracle.com account and want to see jQeury tabs running via 4.0 in your own Workspace, use following this script to create your own version of Shijesh's (Apex_Noob) application.
    Credit also goes out to Alistair Laing for his hard work in investigating why 4.0 is requiring the use of the googleapis jquery.js... libraries.
    Application Builder - Create
    Application Type - Database
    Create Application - From Scratch
    Name - jQuery Application
    Add Page - keep default and Click Add Page
    Click CreateMy application defaulted to Theme 2, you will need to switch the theme to one of the following: If you don't the tabs will not render properly.
    8 Orange
    10 Sand
    13 Classic Blue
    14 Simple Green
    15 Light Blue
    16 Dark Blue
    18 Simple Gray
    19 Red Gray
    Message - Application created successfully.
    Click Shared ComponentsUnder User Interface Click - ThemesIf you don't see one of the above Themes, you will need to Create and switch your Theme.
    Click - CreateFrom the Repository selected Click - Next and select one of the above Themes
    Click - Switch ThemeSelect one of the above Themes and Click - Next
    Click -NextClick - Switch ThemeReturn to your newly created Application by Clicking on Application xxxxxxx Breadcrumb
    Click - Create PageSelect - Blank PageClick - NextAssign the page a name
    Click - NextAccept defaults and Click - NextClick - FinishClick - Edit PageI still work in Component View, to toggle to this View, click on the control adjacent to Page number and Go button. Hover over the ones on the far right and you will see both Component View and Tree View
    From Component View
    Click on the Page Edit Control
    In the Text Area labeled Javascript/Execute when Page Loads - paste in the following code:
    $x("tabs").appendChild( $x("tabs-1"));
    $x("tabs").appendChild( $x("tabs-2"));
    jQuery("#tabs").tabs();In the Text Area labeled HTML Header and Body Attribute/HTML Header - paste in the following code:
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/redmond/jquery-ui.css" type="text/css" />
    <script src= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.js"> </script>Click - Apply ChangesRequired use of the Google jqueryui libraries is being questioned by recent threads created by Alistair Laing since it appears that 4.0 does not currently support jQeury tabs
    {thread:id=1083507}
    {thread:id=1083540}
    Create a Region
    Type HTML Text - accept defaults
    Provide a Title like "Tabs" and accept defaults
    Template - Reports Region
    Sequence 10
    Click - NextIn the Enter HTML Text Region Source: Text Area - paste in the following code:
    <div id="tabs">
    <ul>
    <li><a href="#tabs-1">Employees</a></li>
    <li><a href="#tabs-2">Departments</a></li>
    </ul>
    </div>Click - Create RegionCreate a second Region
    Type Report/Sql Report
    Provide a Title like "Employees" and accept defaults
    Template Reports Region
    Sequence 20
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT empno,
           ename,
           job,
           mgr,
           hiredate,
           sal,
           comm,
           deptno
    FROM   empClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-1Click - Apply ChangesCreate a third Region
    Type Report/Sql Report
    Provide a Title like "Departments" and accept defaults
    Template Reports Region
    Sequence 30
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT deptno,
           dname,
           loc
    FROM   deptClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-2Click - Apply ChangesRun you page and you should see you tabs.
    Jeff

    Great post Jeff,
    With regard to Jquery UI and tabs I've contacted the Apex dev team and received a reply from them.
    All the jQueryUI files are included in the APEX 4.0 distribution, but not all jQueryUI components
    are loaded by default to avoid a huge initial download. It's not necessary to load your own version of jQueryUI, just load the missing component.
    For the "Tabs" you have to add
    <link href="IMAGE_PREFIX#libraries/jquery-ui/1.8/themes/base/jquery.ui.tabs.css" rel="stylesheet" type="text/css" />
    <script src="#IMAGE_PREFIX#libraries/jquery-ui/1.8/ui/minified/jquery.ui.tabs.min.js" type="text/javascript"></script>
    to your page template or the header attribute of your page where you want to use it.They did not mention which other Jquery UI widgets were not included so people need to check to see if they get any JS errors Like "$('#tabs').tabs() is not a function" this would suggest that tabs is not being loaded. To included it in you page header directly after #HEAD# you need to place the css and js as stated above.
    If you need jquery help just post you queries here or the is some other jquery links that maybe of some use
    jQuery
    http://jquery.com/ - Official jQuery Website
    http://api.jquery.com/ - jQuery API Library
    http://plugins.jquery.com/ - jQuery Plugins (Not APEX related)|
    http://yayquery.com/ - yayQuery - jQuery Podcast
    http://jqueryui.com/ - Official jQuery UI Website
    http://jqueryui.com/demos/ - jQuery UI Demos
    Edited by: Alistair Laing on Jun 9, 2010 4:04 PM
    Add more links
    Edited by: Alistair Laing on Jun 9, 2010 4:09 PM

  • Security realm - Security:097533 - Developing own authentication provider

    hi everyone,
    i Developing own authentication provider and i installed a security patch, so while i restarting the weblogic server  encountered the below Exeption:
    <10/05/2013 05:54:33 PM COT> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified..
    weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at weblogic.security.service.CSSWLSDelegateImpl.initializeServiceEngine(CSSWLSDelegateImpl.java:341)
    at weblogic.security.service.CSSWLSDelegateImpl.initialize(CSSWLSDelegateImpl.java:220)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.InitializeServiceEngine(CommonSecurityServiceManagerDelegateImpl.java:1789)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealm(CommonSecurityServiceManagerDelegateImpl.java:443)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadRealm(CommonSecurityServiceManagerDelegateImpl.java:841)
    Truncated. see log file for complete stacktrace
    Caused By: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)
    at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)
    at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)
    at weblogic.security.service.internal.WLSIdentityServiceImpl.initialize(WLSIdentityServiceImpl.java:46)
    Truncated. see log file for complete stacktrace
    Caused By: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at com.bea.common.security.internal.legacy.service.SecurityProviderImpl.init(SecurityProviderImpl.java:42)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:363)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)
    at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)
    at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)
    Truncated. see log file for complete stacktrace
    this is the config.xml :
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://xmlns.oracle.com/weblogic/security/extension http://xmlns.oracle.com/weblogic/1.0/security.xsd">
    <name>base_domain</name>
    <domain-version>12.1.1.0</domain-version>
    <security-configuration>
    <name>base_domain</name>
    <realm>
    <sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
    <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
    <sec:active-type>AuthenticatedUser</sec:active-type>
    </sec:authentication-provider>
    <sec:authentication-provider xmlns:ext="http://xmlns.oracle.com/weblogic/security/extension" xsi:type="ext:as400-realmType">
    <sec:name>AS400Realm</sec:name>
    <sec:control-flag>OPTIONAL</sec:control-flag>
    </sec:authentication-provider>
    <sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
    <sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
    <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
    <sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
    <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
    <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
    <sec:user-lockout-manager>
    <sec:lockout-enabled>false</sec:lockout-enabled>
    </sec:user-lockout-manager>
    <sec:deploy-role-ignored>false</sec:deploy-role-ignored>
    <sec:deploy-policy-ignored>false</sec:deploy-policy-ignored>
    <sec:security-dd-model>DDOnly</sec:security-dd-model>
    <sec:name>myrealm</sec:name>
    <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
    <sec:name>SystemPasswordValidator</sec:name>
    <pas:min-password-length>8</pas:min-password-length>
    <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
    </sec:password-validator>
    </realm>
    <default-realm>myrealm</default-realm>
    <credential-encrypted>{AES}kyVB/9J9Fbvp11tAnYgn6grV6wQwNZZGHSh2JLQtesxS46Re+QCfIAttNE5JugllQvUHOhE+pz0AnEfYL2p5q2oeRsjqoQz2/1Lg8x+3WMoKic0xnRzw2RWoFjQo3F9x</credential-encrypted>
    <node-manager-username>weblogic</node-manager-username>
    <node-manager-password-encrypted>{AES}4jkSbv5dMOl6cRpRa4QwB83XVavtq168cV4L+NSFDcI=</node-manager-password-encrypted>
    <cross-domain-security-enabled>true</cross-domain-security-enabled>
    </security-configuration>
    <server>
    <name>AdminServer</name>
    <listen-address>localhost</listen-address>
    <staging-mode>nostage</staging-mode>
    </server>
    <embedded-ldap>
    <name>base_domain</name>
    <credential-encrypted>{AES}9YeG1UFRNQzM0v6/j8cFvT9x9fkJUl1FJOWGInl5dax26FgMNEVwKNxOBHvW2opm</credential-encrypted>
    </embedded-ldap>
    <configuration-version>12.1.1.0</configuration-version>
    this is the mbean xml (A400Realmmbean.xml):
    <?xml version="1.0" ?>
    <!DOCTYPE MBeanType SYSTEM "commo.dtd">
    <MBeanType Name = "AS400Realm" DisplayName = "AS400Realm"
    Package = "co.com.claro.security"
    Extends = "weblogic.management.security.authentication.Authenticator"
    PersistPolicy = "OnUpdate"
    >
    <MbeanAttribute Name = "ProviderClassName" Type = "java.lang.String"
    Writeable = "false"
    Default =
    "&quot;co.com.claro.AS400Realm&quot;"
    />
    <MBeanAttribute Name = "Description" Type = "java.lang.String"
    Writeable = "false" Default = "&quot;My Identity Assertion Provider&quot;"
    />
    <MBeanAttribute Name = "Version" Type = "java.lang.String"
    Writeable = "false" Default = "&quot;1.0&quot;"
    />
    </MBeanType>
    and the runtime class:
    AS400Realm.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package co.com.claro.security;
    import java.util.HashMap;
    import javax.security.auth.login.AppConfigurationEntry;
    import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
    import weblogic.management.security.ProviderMBean;
    import weblogic.security.provider.PrincipalValidatorImpl;
    import weblogic.security.spi.AuthenticationProviderV2;
    import weblogic.security.spi.IdentityAsserterV2;
    import weblogic.security.spi.PrincipalValidator;
    import weblogic.security.spi.SecurityServices;
    import weblogic.security.principal.WLSGroupImpl;
    import weblogic.security.principal.WLSUserImpl;
    public final class AS400Realm implements AuthenticationProviderV2
    private String description;
    // private SimpleSampleAuthenticatorDatabase database;
    private LoginModuleControlFlag controlFlag;
    // public String PARAM_JAAS_CONTEXT = "jaas-context";
    // public String PARAM_DATASOURCE_NAME = "jdbc/Oracle";
    // public String DEFAULT_GROUP_NAME = "default";
    public void initialize(ProviderMBean mbean, SecurityServices services)
    System.out.println("AS400Realm.initialize");
    AS400RealmMBean myMBean = (AS400RealmMBean)mbean;
    description = myMBean.getDescription() + "\n" + myMBean.getVersion();
    // database = new SimpleSampleAuthenticatorDatabase(myMBean);
    String flag = myMBean.getControlFlag();
    if (flag.equalsIgnoreCase("REQUIRED")) {
    controlFlag = LoginModuleControlFlag.REQUIRED;
    } else if (flag.equalsIgnoreCase("OPTIONAL")) {
    controlFlag = LoginModuleControlFlag.OPTIONAL;
    } else if (flag.equalsIgnoreCase("REQUISITE")) {
    controlFlag = LoginModuleControlFlag.REQUISITE;
    } else if (flag.equalsIgnoreCase("SUFFICIENT")) {
    controlFlag = LoginModuleControlFlag.SUFFICIENT;
    } else {
    throw new IllegalArgumentException("invalid flag value" + flag);
    public String getDescription()
    return description;
    public void shutdown()
    System.out.println("AS400Realm.shutdown");
    private AppConfigurationEntry getConfiguration(HashMap options)
    options.put("PARAM_DATASOURCE_NAME", "jdbc/Oracle");
    return new
    AppConfigurationEntry(
    "co.com.claro.security.AS400LoginModule",
    controlFlag,
    options
    public AppConfigurationEntry getLoginModuleConfiguration()
    HashMap options = new HashMap();
    return getConfiguration(options);
    public AppConfigurationEntry getAssertionModuleConfiguration()
    HashMap options = new HashMap();
    options.put("IdentityAssertion","true");
    return getConfiguration(options);
    public PrincipalValidator getPrincipalValidator()
    return new PrincipalValidatorImpl();
    public IdentityAsserterV2 getIdentityAsserter()
    return null;
    AS400LoginModule.java :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package co.com.claro.security;
    import com.ibm.as400.access.AS400;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Enumeration;
    import java.util.Map;
    import java.util.Vector;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.security.auth.Subject;
    import javax.security.auth.callback.Callback;
    import javax.security.auth.callback.CallbackHandler;
    import javax.security.auth.callback.NameCallback;
    import javax.security.auth.callback.PasswordCallback;
    import javax.security.auth.callback.UnsupportedCallbackException;
    import javax.security.auth.login.LoginException;
    import javax.security.auth.login.FailedLoginException;
    import javax.security.auth.spi.LoginModule;
    import javax.sql.DataSource;
    import weblogic.security.spi.WLSGroup;
    import weblogic.security.spi.WLSUser;
    import weblogic.security.principal.WLSGroupImpl;
    import weblogic.security.principal.WLSUserImpl;
    * @author dmunoz
    final public class AS400LoginModule implements LoginModule {
    private Subject subject;
    private CallbackHandler callbackHandler;
    private String PARAM_DATASOURCE_NAME = "jdbc/Oracle";
    private String DEFAULT_GROUP_NAME = "default";
    // Determine whether this is a login or assert identity
    private boolean isIdentityAssertion;
    // Authentication status
    private boolean loginSucceeded;
    private boolean principalsInSubject;
    private Vector principalsForSubject = new Vector();
    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
    // only called (once!) after the constructor and before login
    System.out.println("SimpleSampleLoginModuleImpl.initialize");
    this.subject = subject;
    this.callbackHandler = callbackHandler;
    // Check for Identity Assertion option
    isIdentityAssertion =
    "true".equalsIgnoreCase((String) options.get("IdentityAssertion"));
    private boolean authenticateAS400(String user, String passwd) throws Exception {
    String host ="172.31.2.80";//Config.getProperty(Config.AS400_AUTHENTICATION_HOST);
    AS400 as400System;
    as400System = new AS400(host, user, passwd);
    return as400System.validateSignon();
    public boolean login() throws LoginException {
    // only called (once!) after initialize
    System.out.println("SimpleSampleLoginModuleImpl.login");
    // loginSucceeded should be false
    // principalsInSubject should be false
    Callback[] callbacks = getCallbacks();
    String userName = getUserName(callbacks);
    if (userName.length() > 0) {       
    if (!isIdentityAssertion) {               
    String passwordHave = getPasswordHave(userName, callbacks);
    try{
    loginSucceeded = authenticateAS400(userName, passwordHave);
    }catch(Exception e){
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.WARNING, null, e);
    throw new LoginException(e.getMessage());
    } else {
    // anonymous login - let it through?
    System.out.println("\tempty userName");
    if (loginSucceeded) {
    principalsForSubject.add(new WLSUserImpl(userName));
    addGroupsForSubject(userName);
    return loginSucceeded;
    public boolean commit() throws LoginException {
    // only called (once!) after login
    // loginSucceeded should be true or false
    // principalsInSubject should be false
    // user should be null if !loginSucceeded, null or not-null otherwise
    // group should be null if user == null, null or not-null otherwise
    System.out.println("SimpleSampleLoginModule.commit");
    if (loginSucceeded) {
    subject.getPrincipals().addAll(principalsForSubject);
    principalsInSubject = true;
    return true;
    } else {
    return false;
    public boolean abort() throws LoginException {
    // The abort method is called to abort the authentication process. This is
    // phase 2 of authentication when phase 1 fails. It is called if the
    // LoginContext's overall authentication failed.
    // loginSucceeded should be true or false
    // user should be null if !loginSucceeded, otherwise null or not-null
    // group should be null if user == null, otherwise null or not-null
    // principalsInSubject should be false if user is null, otherwise true
    // or false
    System.out.println("SimpleSampleLoginModule.abort");
    if (principalsInSubject) {
    subject.getPrincipals().removeAll(principalsForSubject);
    principalsInSubject = false;
    return true;
    public boolean logout() throws LoginException {
    // should never be called
    System.out.println("SimpleSampleLoginModule.logout");
    return true;
    private void throwLoginException(String msg) throws LoginException {
    System.out.println("Throwing LoginException(" + msg + ")");
    throw new LoginException(msg);
    private void throwFailedLoginException(String msg) throws FailedLoginException {
    System.out.println("Throwing FailedLoginException(" + msg + ")");
    throw new FailedLoginException(msg);
    private Callback[] getCallbacks() throws LoginException {
    if (callbackHandler == null) {
    throwLoginException("No CallbackHandler Specified");
    Callback[] callbacks;
    if (isIdentityAssertion) {
    callbacks = new Callback[1];
    } else {
    callbacks = new Callback[2];
    callbacks[1] = new PasswordCallback("password: ", false);
    callbacks[0] = new NameCallback("username: ");
    try {
    callbackHandler.handle(callbacks);
    } catch (IOException e) {
    throw new LoginException(e.toString());
    } catch (UnsupportedCallbackException e) {
    throwLoginException(e.toString() + " " + e.getCallback().toString());
    return callbacks;
    private String getUserName(Callback[] callbacks) throws LoginException {
    String userName = ((NameCallback) callbacks[0]).getName();
    if (userName == null) {
    throwLoginException("Username not supplied.");
    System.out.println("\tuserName\t= " + userName);
    return userName;
    private void addGroupsForSubject(String userName) {
    try {
    for (Enumeration e = getGroupNamesAS400(userName);
    e.hasMoreElements();) {
    String groupName = (String) e.nextElement();
    System.out.println("\tgroupName\t= " + groupName);
    principalsForSubject.add(new WLSGroupImpl(groupName));
    } catch (Exception ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    public Enumeration getGroupNamesAS400(String usuario)
    throws Exception {
    if(usuario == null) {
    throw new Exception("Usuario no puede ser vacio");
    Vector<String> grupos = new Vector<String>();
    grupos.add(DEFAULT_GROUP_NAME);
    Connection conn = null;
    ResultSet rs = null;
    PreparedStatement statement = null;
    try {
    Context c = new InitialContext();
    DataSource dst = (DataSource) c.lookup(PARAM_DATASOURCE_NAME);
    conn = dst.getConnection();
    String query = "SELECT COD_ROL AS ROL " +
    "FROM gestionnew.us_rol_perfil " +
    "JOIN gestionnew.usuarios " +
    "ON us_rol_perfil.id_perfil = usuarios.id_perfil " +
    "WHERE upper(usuarios.usuariorr) = ?";
    statement = conn.prepareStatement(query);
    statement.setString(1, usuario.toUpperCase());
    rs = statement.executeQuery();
    while (rs.next()) {
    grupos.add(rs.getString("ROL"));
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    } catch (NamingException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    } finally {
    if (conn != null) {
    try {
    conn.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    if (rs != null) {
    try {
    rs.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    if (statement != null) {
    try {
    statement.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    return grupos.elements();
    private String getPasswordHave(String userName, Callback[] callbacks) throws
    LoginException {
    PasswordCallback passwordCallback = (PasswordCallback) callbacks[1];
    char[] password = passwordCallback.getPassword();
    passwordCallback.clearPassword();
    if (password == null || password.length < 1) {
    throwLoginException("Authentication Failed: User " + userName +
    ". Password not supplied");
    String passwd = new String(password);
    System.out.println("\tpasswordHave\t= " + passwd);
    return passwd;
    thanks

    hi everyone,
    i Developing own authentication provider and i installed a security patch, so while i restarting the weblogic server  encountered the below Exeption:
    <10/05/2013 05:54:33 PM COT> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified..
    weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at weblogic.security.service.CSSWLSDelegateImpl.initializeServiceEngine(CSSWLSDelegateImpl.java:341)
    at weblogic.security.service.CSSWLSDelegateImpl.initialize(CSSWLSDelegateImpl.java:220)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.InitializeServiceEngine(CommonSecurityServiceManagerDelegateImpl.java:1789)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealm(CommonSecurityServiceManagerDelegateImpl.java:443)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadRealm(CommonSecurityServiceManagerDelegateImpl.java:841)
    Truncated. see log file for complete stacktrace
    Caused By: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)
    at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)
    at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)
    at weblogic.security.service.internal.WLSIdentityServiceImpl.initialize(WLSIdentityServiceImpl.java:46)
    Truncated. see log file for complete stacktrace
    Caused By: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097533]SecurityProvider service class name for AS400Realm is not specified.
    at com.bea.common.security.internal.legacy.service.SecurityProviderImpl.init(SecurityProviderImpl.java:42)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:363)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)
    at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)
    at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)
    Truncated. see log file for complete stacktrace
    this is the config.xml :
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://xmlns.oracle.com/weblogic/security/extension http://xmlns.oracle.com/weblogic/1.0/security.xsd">
    <name>base_domain</name>
    <domain-version>12.1.1.0</domain-version>
    <security-configuration>
    <name>base_domain</name>
    <realm>
    <sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
    <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
    <sec:active-type>AuthenticatedUser</sec:active-type>
    </sec:authentication-provider>
    <sec:authentication-provider xmlns:ext="http://xmlns.oracle.com/weblogic/security/extension" xsi:type="ext:as400-realmType">
    <sec:name>AS400Realm</sec:name>
    <sec:control-flag>OPTIONAL</sec:control-flag>
    </sec:authentication-provider>
    <sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
    <sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
    <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
    <sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
    <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
    <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
    <sec:user-lockout-manager>
    <sec:lockout-enabled>false</sec:lockout-enabled>
    </sec:user-lockout-manager>
    <sec:deploy-role-ignored>false</sec:deploy-role-ignored>
    <sec:deploy-policy-ignored>false</sec:deploy-policy-ignored>
    <sec:security-dd-model>DDOnly</sec:security-dd-model>
    <sec:name>myrealm</sec:name>
    <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
    <sec:name>SystemPasswordValidator</sec:name>
    <pas:min-password-length>8</pas:min-password-length>
    <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
    </sec:password-validator>
    </realm>
    <default-realm>myrealm</default-realm>
    <credential-encrypted>{AES}kyVB/9J9Fbvp11tAnYgn6grV6wQwNZZGHSh2JLQtesxS46Re+QCfIAttNE5JugllQvUHOhE+pz0AnEfYL2p5q2oeRsjqoQz2/1Lg8x+3WMoKic0xnRzw2RWoFjQo3F9x</credential-encrypted>
    <node-manager-username>weblogic</node-manager-username>
    <node-manager-password-encrypted>{AES}4jkSbv5dMOl6cRpRa4QwB83XVavtq168cV4L+NSFDcI=</node-manager-password-encrypted>
    <cross-domain-security-enabled>true</cross-domain-security-enabled>
    </security-configuration>
    <server>
    <name>AdminServer</name>
    <listen-address>localhost</listen-address>
    <staging-mode>nostage</staging-mode>
    </server>
    <embedded-ldap>
    <name>base_domain</name>
    <credential-encrypted>{AES}9YeG1UFRNQzM0v6/j8cFvT9x9fkJUl1FJOWGInl5dax26FgMNEVwKNxOBHvW2opm</credential-encrypted>
    </embedded-ldap>
    <configuration-version>12.1.1.0</configuration-version>
    this is the mbean xml (A400Realmmbean.xml):
    <?xml version="1.0" ?>
    <!DOCTYPE MBeanType SYSTEM "commo.dtd">
    <MBeanType Name = "AS400Realm" DisplayName = "AS400Realm"
    Package = "co.com.claro.security"
    Extends = "weblogic.management.security.authentication.Authenticator"
    PersistPolicy = "OnUpdate"
    >
    <MbeanAttribute Name = "ProviderClassName" Type = "java.lang.String"
    Writeable = "false"
    Default =
    "&quot;co.com.claro.AS400Realm&quot;"
    />
    <MBeanAttribute Name = "Description" Type = "java.lang.String"
    Writeable = "false" Default = "&quot;My Identity Assertion Provider&quot;"
    />
    <MBeanAttribute Name = "Version" Type = "java.lang.String"
    Writeable = "false" Default = "&quot;1.0&quot;"
    />
    </MBeanType>
    and the runtime class:
    AS400Realm.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package co.com.claro.security;
    import java.util.HashMap;
    import javax.security.auth.login.AppConfigurationEntry;
    import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
    import weblogic.management.security.ProviderMBean;
    import weblogic.security.provider.PrincipalValidatorImpl;
    import weblogic.security.spi.AuthenticationProviderV2;
    import weblogic.security.spi.IdentityAsserterV2;
    import weblogic.security.spi.PrincipalValidator;
    import weblogic.security.spi.SecurityServices;
    import weblogic.security.principal.WLSGroupImpl;
    import weblogic.security.principal.WLSUserImpl;
    public final class AS400Realm implements AuthenticationProviderV2
    private String description;
    // private SimpleSampleAuthenticatorDatabase database;
    private LoginModuleControlFlag controlFlag;
    // public String PARAM_JAAS_CONTEXT = "jaas-context";
    // public String PARAM_DATASOURCE_NAME = "jdbc/Oracle";
    // public String DEFAULT_GROUP_NAME = "default";
    public void initialize(ProviderMBean mbean, SecurityServices services)
    System.out.println("AS400Realm.initialize");
    AS400RealmMBean myMBean = (AS400RealmMBean)mbean;
    description = myMBean.getDescription() + "\n" + myMBean.getVersion();
    // database = new SimpleSampleAuthenticatorDatabase(myMBean);
    String flag = myMBean.getControlFlag();
    if (flag.equalsIgnoreCase("REQUIRED")) {
    controlFlag = LoginModuleControlFlag.REQUIRED;
    } else if (flag.equalsIgnoreCase("OPTIONAL")) {
    controlFlag = LoginModuleControlFlag.OPTIONAL;
    } else if (flag.equalsIgnoreCase("REQUISITE")) {
    controlFlag = LoginModuleControlFlag.REQUISITE;
    } else if (flag.equalsIgnoreCase("SUFFICIENT")) {
    controlFlag = LoginModuleControlFlag.SUFFICIENT;
    } else {
    throw new IllegalArgumentException("invalid flag value" + flag);
    public String getDescription()
    return description;
    public void shutdown()
    System.out.println("AS400Realm.shutdown");
    private AppConfigurationEntry getConfiguration(HashMap options)
    options.put("PARAM_DATASOURCE_NAME", "jdbc/Oracle");
    return new
    AppConfigurationEntry(
    "co.com.claro.security.AS400LoginModule",
    controlFlag,
    options
    public AppConfigurationEntry getLoginModuleConfiguration()
    HashMap options = new HashMap();
    return getConfiguration(options);
    public AppConfigurationEntry getAssertionModuleConfiguration()
    HashMap options = new HashMap();
    options.put("IdentityAssertion","true");
    return getConfiguration(options);
    public PrincipalValidator getPrincipalValidator()
    return new PrincipalValidatorImpl();
    public IdentityAsserterV2 getIdentityAsserter()
    return null;
    AS400LoginModule.java :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package co.com.claro.security;
    import com.ibm.as400.access.AS400;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Enumeration;
    import java.util.Map;
    import java.util.Vector;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.security.auth.Subject;
    import javax.security.auth.callback.Callback;
    import javax.security.auth.callback.CallbackHandler;
    import javax.security.auth.callback.NameCallback;
    import javax.security.auth.callback.PasswordCallback;
    import javax.security.auth.callback.UnsupportedCallbackException;
    import javax.security.auth.login.LoginException;
    import javax.security.auth.login.FailedLoginException;
    import javax.security.auth.spi.LoginModule;
    import javax.sql.DataSource;
    import weblogic.security.spi.WLSGroup;
    import weblogic.security.spi.WLSUser;
    import weblogic.security.principal.WLSGroupImpl;
    import weblogic.security.principal.WLSUserImpl;
    * @author dmunoz
    final public class AS400LoginModule implements LoginModule {
    private Subject subject;
    private CallbackHandler callbackHandler;
    private String PARAM_DATASOURCE_NAME = "jdbc/Oracle";
    private String DEFAULT_GROUP_NAME = "default";
    // Determine whether this is a login or assert identity
    private boolean isIdentityAssertion;
    // Authentication status
    private boolean loginSucceeded;
    private boolean principalsInSubject;
    private Vector principalsForSubject = new Vector();
    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
    // only called (once!) after the constructor and before login
    System.out.println("SimpleSampleLoginModuleImpl.initialize");
    this.subject = subject;
    this.callbackHandler = callbackHandler;
    // Check for Identity Assertion option
    isIdentityAssertion =
    "true".equalsIgnoreCase((String) options.get("IdentityAssertion"));
    private boolean authenticateAS400(String user, String passwd) throws Exception {
    String host ="172.31.2.80";//Config.getProperty(Config.AS400_AUTHENTICATION_HOST);
    AS400 as400System;
    as400System = new AS400(host, user, passwd);
    return as400System.validateSignon();
    public boolean login() throws LoginException {
    // only called (once!) after initialize
    System.out.println("SimpleSampleLoginModuleImpl.login");
    // loginSucceeded should be false
    // principalsInSubject should be false
    Callback[] callbacks = getCallbacks();
    String userName = getUserName(callbacks);
    if (userName.length() > 0) {       
    if (!isIdentityAssertion) {               
    String passwordHave = getPasswordHave(userName, callbacks);
    try{
    loginSucceeded = authenticateAS400(userName, passwordHave);
    }catch(Exception e){
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.WARNING, null, e);
    throw new LoginException(e.getMessage());
    } else {
    // anonymous login - let it through?
    System.out.println("\tempty userName");
    if (loginSucceeded) {
    principalsForSubject.add(new WLSUserImpl(userName));
    addGroupsForSubject(userName);
    return loginSucceeded;
    public boolean commit() throws LoginException {
    // only called (once!) after login
    // loginSucceeded should be true or false
    // principalsInSubject should be false
    // user should be null if !loginSucceeded, null or not-null otherwise
    // group should be null if user == null, null or not-null otherwise
    System.out.println("SimpleSampleLoginModule.commit");
    if (loginSucceeded) {
    subject.getPrincipals().addAll(principalsForSubject);
    principalsInSubject = true;
    return true;
    } else {
    return false;
    public boolean abort() throws LoginException {
    // The abort method is called to abort the authentication process. This is
    // phase 2 of authentication when phase 1 fails. It is called if the
    // LoginContext's overall authentication failed.
    // loginSucceeded should be true or false
    // user should be null if !loginSucceeded, otherwise null or not-null
    // group should be null if user == null, otherwise null or not-null
    // principalsInSubject should be false if user is null, otherwise true
    // or false
    System.out.println("SimpleSampleLoginModule.abort");
    if (principalsInSubject) {
    subject.getPrincipals().removeAll(principalsForSubject);
    principalsInSubject = false;
    return true;
    public boolean logout() throws LoginException {
    // should never be called
    System.out.println("SimpleSampleLoginModule.logout");
    return true;
    private void throwLoginException(String msg) throws LoginException {
    System.out.println("Throwing LoginException(" + msg + ")");
    throw new LoginException(msg);
    private void throwFailedLoginException(String msg) throws FailedLoginException {
    System.out.println("Throwing FailedLoginException(" + msg + ")");
    throw new FailedLoginException(msg);
    private Callback[] getCallbacks() throws LoginException {
    if (callbackHandler == null) {
    throwLoginException("No CallbackHandler Specified");
    Callback[] callbacks;
    if (isIdentityAssertion) {
    callbacks = new Callback[1];
    } else {
    callbacks = new Callback[2];
    callbacks[1] = new PasswordCallback("password: ", false);
    callbacks[0] = new NameCallback("username: ");
    try {
    callbackHandler.handle(callbacks);
    } catch (IOException e) {
    throw new LoginException(e.toString());
    } catch (UnsupportedCallbackException e) {
    throwLoginException(e.toString() + " " + e.getCallback().toString());
    return callbacks;
    private String getUserName(Callback[] callbacks) throws LoginException {
    String userName = ((NameCallback) callbacks[0]).getName();
    if (userName == null) {
    throwLoginException("Username not supplied.");
    System.out.println("\tuserName\t= " + userName);
    return userName;
    private void addGroupsForSubject(String userName) {
    try {
    for (Enumeration e = getGroupNamesAS400(userName);
    e.hasMoreElements();) {
    String groupName = (String) e.nextElement();
    System.out.println("\tgroupName\t= " + groupName);
    principalsForSubject.add(new WLSGroupImpl(groupName));
    } catch (Exception ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    public Enumeration getGroupNamesAS400(String usuario)
    throws Exception {
    if(usuario == null) {
    throw new Exception("Usuario no puede ser vacio");
    Vector<String> grupos = new Vector<String>();
    grupos.add(DEFAULT_GROUP_NAME);
    Connection conn = null;
    ResultSet rs = null;
    PreparedStatement statement = null;
    try {
    Context c = new InitialContext();
    DataSource dst = (DataSource) c.lookup(PARAM_DATASOURCE_NAME);
    conn = dst.getConnection();
    String query = "SELECT COD_ROL AS ROL " +
    "FROM gestionnew.us_rol_perfil " +
    "JOIN gestionnew.usuarios " +
    "ON us_rol_perfil.id_perfil = usuarios.id_perfil " +
    "WHERE upper(usuarios.usuariorr) = ?";
    statement = conn.prepareStatement(query);
    statement.setString(1, usuario.toUpperCase());
    rs = statement.executeQuery();
    while (rs.next()) {
    grupos.add(rs.getString("ROL"));
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    } catch (NamingException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    } finally {
    if (conn != null) {
    try {
    conn.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    if (rs != null) {
    try {
    rs.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    if (statement != null) {
    try {
    statement.close();
    } catch (SQLException ex) {
    Logger.getLogger(AS400LoginModule.class.getName()).log(Level.SEVERE, null, ex);
    return grupos.elements();
    private String getPasswordHave(String userName, Callback[] callbacks) throws
    LoginException {
    PasswordCallback passwordCallback = (PasswordCallback) callbacks[1];
    char[] password = passwordCallback.getPassword();
    passwordCallback.clearPassword();
    if (password == null || password.length < 1) {
    throwLoginException("Authentication Failed: User " + userName +
    ". Password not supplied");
    String passwd = new String(password);
    System.out.println("\tpasswordHave\t= " + passwd);
    return passwd;
    thanks

  • How can i implement "my own" security in ADF 11g

    Hi everybody,
    I have a problem and hope anyone could help me...
    Currently i am developing a ADF application, and i want to implement the security... the problem i have (and i read a lot of posts in the forum and other blogs and i don't found anything that help me) is that the "validation" of the user of password is with a webservice..... and the "roles" of the application are given to me with another web service.
    I read a lot and in the Fusion's Developer Guide in chapter 30 (Enabling ADF Security in a Fusion Web Application) explains very good how to implement the security in the application, but, that example really doesn't work for my problem.
    I wan't to know any way to in the "doLogin" action of my "Login button in my login page" to implement my own logic.
    public String doLogin() {
    2 String un = _username;
    3 byte[] pw = _password.getBytes();
    4 FacesContext ctx = FacesContext.getCurrentInstance();
    5 HttpServletRequest request =
    6 (HttpServletRequest)ctx.getExternalContext().getRequest();
    7 CallbackHandler handler = new SimpleCallbackHandler(un, pw);
    8 try {
    9 Subject mySubject = Authentication.login(handler); <<----------------------------- Here i wan't to invoke the WS that validate the user and pwd.
    10 ServletAuthentication.runAs(mySubject, request);
    11 String loginUrl = "/adfAuthentication?success_url=/faces" +
    12 ctx.getViewRoot().getViewId();
    13 HttpServletResponse response =
    14 (HttpServletResponse)ctx.getExternalContext().getResponse();
    15 sendForward(request, response, loginUrl);
    16 } catch (FailedLoginException fle) {
    17 FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
    18 "Incorrect Username or Password",
    19 "An incorrect Username or Password" +
    20 " was specified");
    21 ctx.addMessage(null, msg);
    22 } catch (LoginException le) {
    23 reportUnexpectedLoginError("LoginException", le);
    24 }
    25 return null;
    26 }
    And i wan't to know if i can save some other user information in some kind of session (like company, mail and other stuff).....
    And when i can login validating usr and pwd from the WS... how could i manage my roles ?
    Welll i hope anyone can help me.
    Regards from Mexico.

    Hi,
    to do this, you create a JAAS Login Module to authenticate against the Web Service. This then you wrap in an authentication provider that you configure with WLS. ADF Security does not perform any authentication itself and instead leaves it for the container.
    http://download.oracle.com/docs/cd/E17904_01/web.1111/e13718/atn.htm#i1154044
    Frank

  • Family sharing- invitiation to your own account!?!?

    I set up a new family sharing.  I use one Apple ID and my wife is another one.
    I logged in my Iphone6 with my ID and did Family Sharing to my Wife 's ID.
    Response "Cannot send invitation"  You cannot send an invitation to your own account.
    How can I separated our account?
    Thanks

    Howdy,
    Thanks for using the Apple Support Communities.
    From your post I see that you are unable to send an invitation to your family group to your wife.  Given the error states you cannot send an invitation to your own account, it looks like you may have an alias associated with your Apple ID, of which you are sharing with your wife.  This means you are under the same Apple ID, and would not need to use Family Sharing.  I'd like you to please check your iCloud settings to check if this is indeed the case.
    Change, deactivate, reactivate, or delete an alias
    In iCloud Mail, choose Preferences from the Action pop-up menu  in the sidebar. 
    Click Accounts.
    Select the alias in the Addresses list, then do any of the following:
    To choose a new color for incoming messages, click a Label Color option. Alias labels appear only in the iCloud Mail app on iCloud.com. 
    To change the name or label, enter a new alias name and label in the fields provided. Alias names must contain between 3 and 20 characters. 
    To turn off an alias, select “Disable alias.”
    When an alias is turned off, all email messages addressed to that alias are returned to the sender.
    To turn on an alias, deselect “Disable alias.”
    To delete an alias, click Delete.
    Click Done.
    iCloud: Create or change email aliases
    Cheers,
    Alex H.

  • I want to use Back to my mac. When I try to turn it on, it says "Back to My Mac may be slow because more than one device on your network is providing network services.   Turn off NAT and DHCP on one of the devices and try again." How do I fix this?

    Not sure if I am doing this right. This is my first time in the support community.
    I imagine what I put in my heading was supposed to go in here.
    I want to use Back to my mac. When I try to turn it on, it says "Back to my mac may be slow because more than one device on your network is providing network services. Turn off NAT and DHCP on one of the devices and try again. See the documentation that came with your device for information about turning off network services"
    Does anyone know how I do this? I contacted my ISP (Telus in Canada) and they did not know anything (not that they usually do).

    Why do ISPs insist upon making things so difficult for their customers?
    If you cannot get them to understand that you would prefer to use your own router over their piece of cheap junk, perhaps the information in the following will be useful:
    http://keithbalomben.wordpress.com/2012/03/29/telus-actiontec-v1000h-hacks-and-i nformation/
    Scroll down to DHCP Settings
    You will need to log in with proper "technician" credentials. They are provided in the above link as
    Username: tech
    Password: t3lu5tv
    ... but these may or may not work. Try it, and if you cannot get anywhere at least now you know what to ask Telus to do in return for your business.

  • USEREXIT to adjust the rebate credit memo request to your own require

    We are using function module SD_BONUS_CREDIT_NOTE_CREATE in one of our rebate program.
    This Functional provides the option to use USEREXIT to adjust the rebate credit memo request to your      own requirements.
    With Present form of  functionl module it take standard doc type to  create the  rebate credit memo request.
    So Question here which  are userexit we have in this FM  which can be used to create  the  rebate credit memo request to our requirement.
    Has any body used this FM before to this length..
    appreacite your help
    Thanks
    rao

    Hi Serma,
    I haven't use this FM. I only can advise you how to find user exits in this (any) FM.
    Open your FM via SE37 and then try to find in this Function Group any CALL CUSTOMER-FUNCTION 'xxx' ..., where xxx is a 3-digit number which refers to the relevant FM EXIT_<FG>_xxx.
    <FG> is the name of the Function group to which the FM belongs to.
    When you find such an EXIT-Function, take a look at the parameters. When you find parameters which satisfy your needs, go ahead and build your EXIT enhancement in the predefined ZX-Include (you can find this inside the FM EXIT_<FG>_xxx).
    I hope this helps,
    Heinz

  • Making Your Own Map Component in crystal xcelsius

    Post Author: sunbrain
    CA Forum: Xcelsius and Live Office
    http://www.liwaili.com.cn support
    http://www.liwaili.com.cn support
    http://www.liwaili.com.cn support
    Making Your Own Map Component in crystal xcelsius
    Although the Map components in Crystal Xcelsius are cool, your choice ofmaps is severely limited. This might leave you wondering how you can createyour own Map components in Crystal Xcelsius. Although there is no way totechnically make a Map component, you do have a workaround that you canuse to create interactivity based on your own maps.As an example, I created the dashboard in Figure 13-25 to report on popula-tion data for the five counties in Rhode Island. In this dashboard, movingyour mouse from county to county changes the data that displays.
    Take a closer look at this dashboard to see that the map is nothing more thanan Image component that has a few Icon Selector components on top. Hereu2019show it works:1. Import an image of the map by adding an Image component onto yourdashboard and selecting the image using the Filename property, asshown in Figure 13-26.
    2. Add Icon Selectors on each point in the map where you want interactivity.These icon selectors provide the hot spot areas on your map (seeFigure 13-27): that is, the areas that give you interactivity at run-time.
    3. Expand the selectors to ensure that you optimize the hot spots on yourmap. (See Figure 13-28.)You can expand the Icon selectors by clicking on the bounding box han-dles and dragging them until the selector is the appropriate size andshape. Expanding the size of the selectors reduces the chance of hittingdead spots that donu2019t have interactivity at run-time.
    At this point, the icon selectors can be given some functionality basedon some scenario, but thatu2019s not your focus here. The point is that afteryou configure the icon selectors with some functionality, you haveessentially added interactivity to your map.Time for smoke and mirrors.4. Make the icon selectors invisible so that only the map is showing bygoing to the Appearance tab and adjusting the Transparency propertyto 0, as shown in Figure 13-29.The final effect is a custom map that has interactivity.
    Keep in mind that you can use this technique with any image; it doesnu2019t have tobe a map per se. For instance, you can use this technique with organizationalcharts, floor plans, park maps, and various types of diagrams. Incorporatingpictures into your dashboards in this way can help you add something extrato your dashboards.
    liwaili.com.cn
    http://www.liwaili.com.cn support

    Post Author: sam pewgo
    CA Forum: Xcelsius and Live Office
    Hiit is rather disappointing that one can not import maps into crystal xcelsius as this is my main operation, the alternative approach that you so in great detail, whilst it works is not sutable for the tasks I carryout. I have access to all the maps for our operations and some are quite detailed, however I cannot use them? becuase your programme cannot import them. Is there a tool or method that you guys use to get the maps in to crystal xcelsius that you would be willing to share, as I would hate to have to find an alternative product to do that job Thnx Sam

  • How To Use Your Own Router with Out Loosing Verizon's FIOS Services

    How to use your own router with Verizon’s FIOS Service
    First, you need a basic understanding of how FIOS works but unfortunately there are two types of FIOS systems out there. All of the systems utilize a fiber optic cable to bring TV, phone and internet to your location over one optic cable. In addition these systems provide interactivity including widgets, remote DVR, movies on demand and so forth via an IP (Internet Protocol) signal.  Your STB (Set Tip Box) requires both a video and IP signal. The IP signal is necessary for all of the aforementioned interactivity.  The fiber cable terminates at the Optical Network Terminal or ONT for short.  The ONT converts the optics into a digital signal that can be utilized by ones equipment.  From the ONT your video, phone and internet are provided to the location.  This is where things can differ as the internet signal can be provided via a coaxial (MoCA or Multimedia over Coax Alliance) or RJ45 Cat5 (Ethernet) cable.  It is important to identify and understand the differences of these two setups.  In my case I have my internet entering via Ethernet cable, which in my humble opinion makes things a heck of a lot easier.
    How does one tell the difference? In most cases it’s rather simple; just look at the Verizon’s router WAN (Wide Area Network) Port.  Does it have a RJ45 (Ethernet) or Coax (TV cable Cord) going to it? If the router’s WAN port doesn’t have a coaxial connector then one will need to convert the MoCA signal into a usable Ethernet signal that routers understand. The easiest way is to use Verizon’s router as a bridge. In this method the Verizon’s router simply converts the signal and passes it along to your own router. The challenge is to try to maintain the interactivity that FIOS TV provides. Because of this one needs to supply the IP routed signal back to the FIOS router.  There are multiple methods for doing this and I would recommend investigates which one make the most sense.   
    In my particular case the IP signal was provided by Ethernet.  Again there are various ways of installing one’s own router. The hardest is to utilize Verizon’s router as a bridge.  This setup requires configuring Verizon’s router as a bridge and also creating a VLAN (Virtual Local Area Networks). In addition one needs to set up their own router so it will work with the various routing tables and networks. For me this is too complex for the average person and it can be difficult to trouble shoot if something goes wrong. Please consider that Verizon will not support utilizing third party routers.   
    The easier method is to request an Ethernet signal (if you don’t already have one) from their ONT.  I would highly recommend getting your hands on a NIM or Network Interface Module. This device is used to convert Ethernet to Coaxial so it can be fed back to your STBs.  These can be purchased online and Verizon technicians can be a valuable resource with these sorts of acquisition.  At the very least they can point you to the right direction.  Once you have a NIM the rest is rather simple.
    Log into the current Verizon Router.
    Located the router’s MAC address and copy it down.
    Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.
    Look at your current device list, typically found on the home screen. Copy down your STB MAC and IP address.
    Example:
    IP-STB1
    Connection Type: Ethernet
    * IP Address: 192.168.1.100
    IP Address Allocation: DHCP
    *MAC Address:                07:73:fFe:ad:8b:3f
    * Things you will need to write down
    Go to the network section and look for the main Ethernet connection.  Select this and then select more setting, typically found at the bottom. Release the current lease.
    Remove the Verizon router
    Install your router
    Connect the NIM by plugging in an Ethernet from one of the routers LAN (Local Area Network) ports to your NIM. Then connect the coax cable, the same cable that was used by Verizon router.
    Set you DHCP routing IP pool to accommodate Verizon’s STB IP’s  (note their IP’s start at 192.168.1.100)
    Go to DHCP section and reserve the STB IP’s by inserting the IP’s and MAC addresses. This shall ensure that nothing else utilizes the same IPs as the STBs thereby preventing IP address conflict.  
    Add the port forwards from Step 5 above.
    Clone Verizon’s Mac Address utilizing the info from step 2
    Finish setting up the router in typical fashion.
    Unplug and re-plugin your STB’s and test functionality.  It’s best to try using a widget or Movie on demand function.
    Note: if the new router can net get an internet signal contact Verizon’s support and have them release the IP and reset the ONT.  
    EVERYTHING should be working at this point.

     3 Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.G
    Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
    whatever, the STB's start at 192.168.1.100 and icement by 1 for each
    the port addr's will be 63145 alo incrementing by 1
    there is 1 entry for each in my pf list
    however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
    For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
    Why do you clone the mac addr??

  • AP Check printing setups for printing checks on your own

    HI
    I am wondering if there a good document which deals with AP check printing with MICR and signature on your own check stock
    thanks

    Recently we started to deal with AP check printing in our organizatin. It was a daunting task with the information and resources scattered all over and missing critical pieces of information to make sense out of the whole process flow. We attempted to go through the AP check printing internally and succeded.
    I decided to post the information for the benefit of people about the our experience
    Check Printing Basics and Beyond for Printing Checks on Your Own
    by
    Sarma Chilukuri
    This article deals with what is needed to get your own checks printed. It is a first attempt to uncover all the hidden rules that one should be aware to get your own checks printed. The first section deals with the basic AP check printing setup, while the 2nd half explores some of the flow of events that make it possible to print the check.
    Part I – Basic Setup
    AP Setup for check printing
    There are multiple steps in the AP check printing. First set of steps deal with the AP side setups. The second step is to get the System side setups. The system side setup deals with printer setup and program options setups. The last step would be to make the print format files configured with the vendor provided escape sequences in the laser print format file.
    Step 1: login as Payable Manager
    Step 2: Bank Setup: Navigate to Setup: Payments > Banks
    1.     Make sure the Bank # etc are present
    2.     Tab to “Bank Accounts”, and make sure your account # has been setup
    3.     On the Bank Accounts screen, tab to the “Payables Documents” and verify that Payment format (E.g., COK Laser Format) has been entered. This “Payment format links to next section where we associate it to the right payment program.
    Fig 1. AP Payment Bank Setup Screen
    Step 3: Program Setup (Setup: Payments > Programs)
    As we know there are only 5 formats 3 of which are “Ever Green Laser” (APXPBFE G|L|F) which are explained in the AP Users Guide. For your own form printing, you have to associate the format to APXPFEL (laser format) program. Also, the APXPBFEL or APXPBFEF call the APXPBFEG, which is the base program that pulls the data from oracle base tables. APXPBFEL is the one which allows us to print the checks with MICR and signature on a plain paper not on a pre printed stationery.
    Fig. 2 AP Payment Format Setup Screen
    Printer Styles, Drivers setup
    The above process summarizes the AP Setup. As a DBA, the printer setup needs to be validated. The base install provides the right setup to some extent. But the differences in printers and print queues may add some complexity to the final configuration. The following section discusses the set up the base install provides and changes as needed.
    Step 1. Login as system Administrator
    Step 2: Style (Install : Printer > Style)
    Look for the “PORTRAITHPLJ4LASCHECK”. This one is associated with the SRW Driver Called, “APLASP” (AP Laser printer format).
    Step 3: Driver (Install : Printer > Driver).
         1. The “PORTRAITHPLJ4LASCHECK” is associated with a “User Driver” of PORTRAIT for HPLJ4 and and a SRW driver of “APLASP”
         2. Also notice that there is an Initialization string at the bottom of it. This initialization string gets called as pre-report trigger for the APXPBFEG program (APXPBFEG.rdf) file. It sets the kind of format it should be. Please see the Appendix A for details on these printer pcl code translations. The Initialization string was as follows:
    Initialization: /eE/e&l0o2a7C/e(s0P/e(8U
    Step 4: Printer type (Install : Printer > Register)
    Each printer type is associated with a set of styles. Make sure the printer that was selected has the above style and its associated driver listed against that.
    Fig. 3 System Administrator Printer Seups
    Step 5: Program Setup (Concurrent > Program > Define)
    This step holds the key for check printing. It is necessary to define whether you need the check on top followed by the Stub or the other way around. The way it is controlled is based on the APXPBFEG.rdf, the report definition file and the APLASP.prt (Printer Style associate with the Portrait laser check format SRW driver). The APLASP.prt file ($FND_TOP/reports) has two identical setups called the 100 series and the 200 series. Those identical sets of setups define where the MICR and signature print on the check. The following table lists the some of the codes in the 100 series. Please refer to Doc ID #146452.1 for complete details.
    Fig. 4 System Administrator Concurrent Program Definitions
    CODE #     Code Definition
    100     Electronic check activation string
    101     1st Check #
    102     2nd Check #
    104     Deactivate check number mode string
    111     Activate MICR line
    112     MICR Deactivation / reset the printer head position
    121     1st Signature
    122     2nd Signature
    141     Address font activation string
    199     Return to default state string
    Table 1. APLASP.prt -- MICR Activation Codes
    The above code block repeats itself the same way in the 200 series. The decision to activate one way or the other controls the Check printing.
    Step 2: Setting up the Option block
    In the concurrent program definition for the APXPBFEL, there is an Options block in the middle. You need to list the codes that you want to activate. Please refer to Doc ID # 186640.1 for some explanation on these.
    E.g.,
    p_printer_code_mask="201,211,221,241" p_sig2_amount="" p_sig3_amount="" p_sig1_vendnum="" p_sig2_vendnum="" p_sig3_vendnum="" p_country_to_ignore="US" p_continuous_stationery="N"
    Step 3: Output format is Text
    Text format is sufficient, as the printer will pick up these escape sequences anyway.
    Fig. 5 System Administrator Concurrent Program APXPBFEL Options Definition
    UIPRINT.TXT, UIFONTS.ALI
    One needs to be aware of a few more pieces in this puzzle. The UIPRINT.TXT identifies to the Oracle Applications the print queues that were setup. This file is needed to set your PCL / Post Script printer definitions. I did not have to really tinker with these files other than identifying the PCL and Post Script Q’s that were setup on the UNIX box.
    Part II: Integrating all the pieces
    The above setups are all documented in various articles. We need to understand a few more steps to see how all these pieces come together.
    What you need to know about APXPBFEG.rdf
    APXPBFEG (.rdf) is the report file which when called pulls the data from Oracle. If you open the APXPBFEG.rdf in the Oracle reports, there is initialization to the report called, SRW.Init. This will bring in the initialization string associated with the PORTRAITHPLJ4LASCHECK driver definition file. Also, please be very careful with this report format file. When you open it, there is small tiny empty block. in the first block which calls the printer initialization code 100/200 under the Format Mask (from APLASP.prt). If this portion gets changed or messed up, one can end up with some unexpected results. Each of those blocks like MICR, CHECK etc… have associated format triggers and printer codes.
    Please make sure that the printer mask is properly handled. I noticed that the 200 series MICR (211) and Signature (221) printer masks were tied to 111 and 121 respectively. These should have been 211 and 221. The other place you need to be careful was the printer code before and after is proper.
    For E.g.,
    For the MICR, the ”printer code before and after columns “ should be 111 and 112 (or 211 / 212) respectively while Format Trigger should reference to 111 (211).
    Fig. 6 APXPBFEG rdf file printer mask and Format Triggers
    The escape sequences in the APLASP.prt file for these codes will play the crucial role in getting our format around the report output that gets generated from the APXPBFEG program. Please refer to the explanation of these escape sequence codes in the APPENDIX A.
    At this point when you run the program, you will see that the formatted output report file will have all the initialization strings and the output associated with that. You can compare the fields and verify the results. Let us closely examine the parts of the 111 and 121 where the micr and signature prints. The key to this to code the escape sequences the right way to get the associate MICR and signature print out correctly.
    Fig. 7 APXPBFEG rdf file MICR printer mask and Format Triggers
    Code 111 and Code 112 from the APLASP.prt file.
    I broke the line into pieces to illustrate the exact escape sequence code.
    Code "211"
    Part 1: esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    Part 2: esc "(8M" esc "(s0p8.00h8.0v0s0b80T" --- This will be provided by the ROM
    Cartridge provider
    Part 3: esc "&k15H" esc "*p3215Y" esc "&a13.8C"
    code "212"
    Part 1 : esc "&f1x3x8X"
    Part 2 : esc "&f1S"
    Let us go over these 2 sets of codes carefully.
    Escape Code     Meaning     Comment
    esc "&f0S"      Push Cursor Position     
    esc "&f0y0X"     Define Macro ID 0 and Start Macro Definition     
    esc "&l0E"      Define Top Margin at 0 Lines     
    esc "&a0L"      Define Left Margin at Column 0     
    esc "(8M"     8M Symbol SetNote : As per pcl codes this happens to be Font Primary JIS Math 8 symbol     MICR Part 1 : Provided by the Vendor from where you the ROM cartridge
    esc "(s0p8.00h8.40s0b0T"     {Fixed Pitch}{pitch 8.00 cpi}{Font Style 8.40}{Medium Weight}{Typeface 0}     MICR Part 2 : Provided by the Vendor
    esc "&k15H" esc "*p907Y"     Set HMI = 15/120" Vert position = 907 Dots     
    esc "&a13.8C"     Move to Column 13.8     
         CODE 112     
    esc "&f1x3x8X"     {End Macro Definition}{Call Macro}{Delete Macro ID}     
    esc "&f1S"     {Pop Cursor Position}     At this point, the MICR gets printed
    Table 2. Escape Sequences in APLAP.prt file Explanation
    Fig. 8 APXPBFEG rdf file Signature printer mask and Format Triggers
    The signature piece (221) has also similar meaning.
    Escape Code     Meaning     Comment
    esc "&f0S"     Push Cursor Position     
    esc "*t300R"     300 DPI Graphics resolution     
    esc "*p1500X"     Horiz position = 1500 Dots     
    esc "*p650Y"     Vert position = 470 Dots     
    esc "(4B" esc "(s1p53v0s0b102T"esc "&f0S!"     Symbol SetProportionalPoint Size 53UprightMedium WeightTypeface 102Push Cursor Position!     Vendor gave the us esc "(4B"esc"(s1p53v0s0b102T!"Note: the ! when the it pushes the ! and that is where it prints the signature piece. The first part forms the symbol set , say (4B and the later part forms the signature font and ! is the piece. I took the ! from the above and let it stay with the 3rd part of it so that signature does not print twice.
    esc "&f1S"      Pop Cursor Position     
    esc "*p+121Y"     Move down 121 Dots     
    esc "&f1S"     Pop Cursor Position     
    Table 3. Escape Sequences for Signature in APLAP.prt file and Explanation
    Summary
    One can print their own checks using the above steps. This can work as a cost effective solution for small organizations where the budgetary constraints are tighter. We are successful in getting the AP Checks printed using the above method.
    References
    Metalink Doc ID # 186640.1, Different Payment Formats …
    Metalink Doc ID # 60936.1, Step by Step Guide to Setup a Printer in Oracle Applications
    Metalink Doc ID # 250543.1, How to Create An Initialization String for a Payable Check Format
    Metalink Doc ID # 48680.1, Accounts Payable FAQ – Payment Batch, Check
    Metalink Doc ID # 1074792.6, Exclamation Point (!) Prints On Check When Using APXPBFEL And Cartridge
    Metalink Doc ID # 158486.1, APXPBFEL Evergreen (Long Laser)
    Metalink Doc ID # 146452.1, Listing of p_printer_code_mask Default Values for APXPBFEL
    Chapter 2, Oracle Payables user guide
    Appendix A
    APLASP.prt printer codes explanation
    code "200" esc "&l0o2a6d66p8.000c2e1x0l63f1H" esc "&k12.00H" esc "(8U"
    esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&a1l0R" control(M) esc"&f3005y4X"
    {Portrait}
    {Letter}
    {6 LPI}
    {Define Page Length to 66 Lines}
    {Set VMI = 8.000/48"}
    {Define Top Margin at 2 Lines}
    {Select 1 Copies}
    {Disable Perf Skip}
    {Define Text Length as 63 Lines}
    {Feed from Tray 1 (upper)}
    0.1 esc "&k12.00H"
    {Set HMI = 12.00/120"}
    0.2 esc "(8U"
    {Roman-8 Symbol Set}
    0.3 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    0.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    0.5 esc "&a1l0R"
    {Define Left Margin at Column 1}
    {Move to Row 0}
    control(M)
    0.6 esc"&f3005y4X"
    {Define Macro ID 3005}
    {Enable Overlay}
    code "201" esc "&f0S" esc "&a1.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position} esc "&f0S"
    1.1 esc "&a1.25r70C"
    {Move to Row 1.25}
    {Move to Column 70}
    1.2 esc "(8U"
    {Roman-8 Symbol Set}
    1.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "202" esc "&f0S" esc "&a20.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position}
    2.1 esc "&a20.25r70C"
    {Move to Row 20.25}
    {Move to Column 70}
    2.2 esc "(8U"
    {Roman-8 Symbol Set}
    2.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "211" esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    esc "(0Q" esc "(s0p8.00h8.40s0b0T" esc "&k15H" esc "*p907Y" esc "&a13.8C"
    {Push Cursor Position}
    11.1 esc "&f0y0X"
    {Define Macro ID 0}
    {Start Macro Definition}
    11.2 esc "&l0E"
    {Define Top Margin at 0 Lines}
    11.3 esc "&a0L"
    {Define Left Margin at Column 0}
    11.4 esc "(0Q"
    {0Q Symbol Set}
    11.5 esc "(s0p8.00h8.40s0b0T"
    {Fixed Pitch}
    {pitch 8.00 cpi}
    {Font Style 8.40}
    {Medium Weight}
    {Typeface 0}
    11.6 esc "&k15H" esc "*p907Y"
    {Set HMI = 15/120"}
    {Vert position = 907 Dots}
    11.7 esc "&a13.8C"
    {Move to Column 13.8}
    code "212" esc "&f1x3x8X" esc "&f1S"
    {End Macro Definition}
    {Call Macro}
    {Delete Macro ID}
    12.1 esc "&f1S"
    {Pop Cursor Position}
    code "221" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p470Y"
    esc "(30C" esc "(4B" esc "(s1p53v0s0b102T!"
    esc "&f0S!" esc "&f1S" esc "*p+121Y" esc "&f1S"
    esc "&f0S"
    {Push Cursor Position}
    21.1 esc "*t300R"
    {300 DPI Graphics resolution}
    21.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    21.3 esc "*p470Y"
    {Vert position = 470 Dots}
    21.4 esc "(30C"
    {30C Symbol Set}
    21.5 esc "(4B"
    {4B Symbol Set}
    21.6 esc "(s1p53v0s0b102T!"
    {Proportional}
    {Point Size 53}
    {Upright}
    {Medium Weight}
    {Typeface 102}
    21.7 esc "&f0S!"
    {Push Cursor Position}
    21.8 esc "&f1S"
    {Pop Cursor Position}
    21.9 esc "*p+141Y"
    {Move down 121 Dots}
    21.10 esc "&f1S"
    {Pop Cursor Position}
    code "222" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p650Y"
    esc "(30A" esc "(s0p.426h35.25v0s0b128T" esc "&f0S!"
    esc "&f1S" esc "*p+141Y" esc "&f1S"
    {Push Cursor Position}
    22.1 esc "*t300R"
    {300 DPI Graphics resolution}
    22.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    22.3 esc "*p650Y"
    {Vert position = 650 Dots}
    22.4 esc "(30A
    {30A Symbol Set}
    22.5 esc "(s0p.426h35.25v0s0b128T"
    {Fixed Pitch}
    {pitch .426 cpi}
    {Point Size 35.25}
    {Upright}
    {Medium Weight}
    {Typeface 128}
    22.6 esc "&f0S!"
    {Push Cursor Position}
    22.7 esc "&f1S"
    {Pop Cursor Position}
    22.8 esc "*p+141Y"
    {Move down 141 Dots}
    22.9 esc "&f1S"
    {Pop Cursor Position}
    code "241" esc "&a-100V" esc "&l5.8C" esc "(8U" esc "(s0p12.00h10.00v0s3b3T" esc "&k11.75H"
    41.0 esc "&a-100V"
    {Move up 100 Decipoints}
    41.1 esc "&l5.8C"
    {Set VMI = 5.8/48"}
    41.2 esc "(8U"
    {Roman-8 Symbol Set}
    41.3 esc "(s0p12.00h10.00v0s3b3T"
    {Fixed Pitch}
    {pitch 12.00 cpi}
    {Point Size 10.00}
    {Upright}
    {Bold}
    {Typeface 3}
    41.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    code "299" esc "(8U" esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&l6D"
    {Roman-8 Symbol Set}
    99.1 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    99.2 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    99.3 esc "&l6D"
    {6 LPI}

Maybe you are looking for