Thursday, February 26, 2015

Secure weblogic with Connection Filters ( Hardening and Kick out unknow users)




Connection Filters allow you to deny access to UNWANTED Connections at the network level. Connection Filters can be used to protect server resources on individual servers, server clusters, or an entire internal network or Intranet. Connection filters are particularly useful when using the Administration port. Depending on your network firewall configuration, you may be able to use a connection filter to further restrict administration access. A typical use might be to restrict access to the Administration port to only the servers and machines in the domain.
WebLogic Server provides a default connection filter called weblogic.security.net.ConnectionFilterImpl. This default connection filter accepts all incoming connections except the ones defined in your Administration Console as a Connection filter rule. You can write your own custom connection filter by implementing the classes in the weblogic.security.net package. This post will demonstrate the steps to configure Weblogic Connection Filters.



 
  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit.
    Change Center

     
  2. In the left pane, click on the domain name.
    Domain Structure

     
  3. In the right pane, select the Security -> Filter tab.
    Setting on Domain

     
  4. Click the Connection Logger Enabled attribute to enable the logging of accepted connections.
    Connection logger Enabled

     
  5. Specify the Connection Filter to be used with the domain. This example uses the default connection filter weblogic.security.net.ConnectionFilterImpl
    Connection Filter
  6. Specify the Connection Filter Rules. Make sure that you use the syntax below while writing the rules.

    Syntax:
    target localAddress localPort action protocols

    where
    • target specifies the client hosts that can connect to the Weblogic Server instance
    • localAddress defines the host address of the Weblogic Server instance to which any client can connect. If you specify an asterisk (*), the match returns all local IP addresses.
    • localPort defines the port on which the WebLogic Server instance is listening to which any client can connect. If you specify an asterisk (*), the match returns all available ports on the server.
    • action specifies the action to perform. This value must be only allow or deny.
    • protocols specifies the list of protocol names to match. The following protocols may be specified: http, https, t3, t3s, giop, giops, dcom, ftp, ldap. If no protocol is defined, all protocols will match a rule.
    Connection filter Rule

     
  7. Click Save and in the Change Center of the Administration Console, click Activate Changes.
    Change Center

    Once saved an entry is made in the config.xml file for these settings as below:
    <connection-filter>weblogic.security.net.ConnectionFilterImpl</connection-filter>
    <connection-filter-rule>10.1.xx.xx 10.1.xx.xx 7001 deny http</connection-filter-rule>
    <connection-logger-enabled>true</connection-logger-enabled>

     
  8. Restart all the WebLogic Server instances for changes to take effect.
    Notification

     
  9. Test the Connection Filter rules: Try to access the WebLogic Server instance with the port from the target server mentioned in the rule. This connection will be rejected because the rule says to deny the connection.
    ####<May 24, 2011 1:34:50 PM MDT> <Notice> <Socket> <NAND-S77> <AdminServer> <ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <> <1306265690809> <BEA-000445> <Connection rejected, filter blocked Socket[addr=10.1.xx.xx,port=48316,localport=7001], weblogic.security.net.FilterException: [Security:090220]rule 1>

    Try to access the WebLogic Server instance with the port from the target server which is not mentioned in the rule. This connection will be accepted because it is not denied by the rule:
    ####<May 24, 2011 1:34:23 PM MDT> <Info> <Socket> <NAND-S77> <AdminServer> <ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <> <1306265663662> <BEA-000431> <Accepted Connection: Filtering is set to: "true" Remote Address: "/0:0:0:0:0:0:0:1" Remote Port: "51655" Local Address: "0.0.0.0/0.0.0.0" Local Port: "7001" Protocol: "http">
Further reading on Connection Filter rules:

http://download.oracle.com/docs/cd/E13222_01/wls/docs81/security/con_filtr.html#1029299

Monday, February 23, 2015

Oracle Weblogic Server 12c: Install,Configure,Deploy Java EE Applications


Oracle Weblogic Server 12c:  Install and Configure






Oracle Weblogic Server 12c: Deploy Java EE Applications

We are going to Learn Below

Lesson1  : Weblogic Application Concepts
Lesson2  : Data Source Fundamentals
Lesson3  : JMS Fundamentals
Lesson4  : Deployment Techniques