miércoles, 9 de diciembre de 2015

Rotating the STDOUT logfile Weblogic 12c Linux - Crontab

1. Verify that the logrotate tool is installed. Run the following command with root credentials:
which logrotate
2. Create a logrotate.conf file. Add the following lines:
/{logs_route}/managed_server1.out {
missingok
copytruncate
compress
rotate=150
size=200M
}
Note: Files rotate every 200 MB and will be stored the last 150 files. Additionally, each file will be compressed to rotate consecutively.

3. Create a  logrotate.status file. Add the following lines:
logrotate state -- version 2
"/{logs_route}/managed_server1.out" 2015-12-9
4. Create the scheduled task in the crontab file, that runs every 15 minutes every day:
0,15,30,45 * * * * /usr/sbin/logrotate -s /{directory}/logrotate.status /{directory}/logrotate.conf 
5. Final result:
managed_server1.out.6.gz
managed_server1.out.5.gz
managed_server1.out.4.gz
managed_server1.out.3.gz
managed_server1.out.2.gz
managed_server1.out.1.gz 

lunes, 27 de abril de 2015

Disable SSLv3 protocol SDS - POODLE Vulnerability

For reference vulnerability in SSL v3, see note http://www-01.ibm.com/support/docview.wss?uid=swg21687611. To disable the SSLv3 protocol and proceed to enable TLS protocols, you must perform the following steps:



1. Start Web Admin Tool  using cn=root user:


Web Admin Tool


2. Go to section Manage security properties> settings. Select TLS 1.0, TLS 1.1 and TLS 1.2 protocols:

Enable TLS protocols
3. Go to the Encryption section, Enable the following types of encryption:

     
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_3DES_EDE_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_128_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_256_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_128_GCM_SHA256 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_256_GCM_SHA384 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_128_CBC_SHA256 
    ibm-slapdSslCipherSpec: TLS_RSA_WITH_AES_256_CBC_SHA256 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 
    ibm-slapdSslCipherSpec: TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA

    TLS 1.2 Protocol
    TLS 1.2 protocol
    Go to the Implementation section. Enable "Use FIPS certified implementation" and "Run server in FIPS mode":

    Implementation


    5. To disable the SSLv3 protocol "EWAS" and "Web Admin Tool"  follow the note: http://www-01.ibm.com/support/docview.wss?uid=swg21694300

viernes, 24 de abril de 2015

Disable SSLv3 protocol Weblogic - POODLE Vulnerability

For reference vulnerability in SSL v3, see note http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html. To disable the SSLv3 protocol and proceed to enable TLS protocol, you must perform the following steps:

Configure startup arguments for managed servers:


1. Start admnistración console:


Weblogic Server Console
2. Select the managed server, go to the "Start Server" section. Add the following argument in the text box "Arguments":

-Dweblogic.security.SSL.protocolVersion=TLS1


3. Restart the managed server.


miércoles, 25 de marzo de 2015

Data source - String de conexión Base de Datos RAC ORACLE



1. Ingresar al datasource requerido


2. Hacer clic en la pestaña Connection Pool, en el campo URL ingresar el siguiente String de conexión cambiando el HOST, el SERVICE_NAME según lo indicado en el archivo TNSNAMES.ora definido en el servidor  donde está instalada la base de datos de la aplicación  y el puerto de conexión.

Connection Pool

String de conexión:

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(LOAD_BALANCE=yes))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service_name>)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))))

3. Reiniciar el nodo lógico que utiliza el datasource y validar que inicie sin errores. A su vez, realizar test de conectividad hacia la base de datos:

Test de coectividad




miércoles, 7 de enero de 2015

Managed server in Incompatible state - WLS 12c

Al intentar iniciar un servidor administrado aparece en la pantalla el siguiente error :

the server is in incompatible state which is incompatible with this operation or are 
not associated with a running Node Manager or you are not authorized to perform the 
action requested. No action will be performed


weblogic the server is in incompatible state
Error  de estado incompatible de un servidor.


Solución:

1. Bajamos proceso de nodemanager.

2. Ir a la ruta del servidor administrado donde el nodemanager registra su estado:

   /weblogic/app/oracle/config/domains/base_domain/servers/server1/data/nodemanager/

3. Cambiar el nombre del archivo .state, en nuestro caso server1.state:

      mv server1.state   server1_copia.state

4.  Iniciamos proceso de nodemanager.

5. Iniciamos servidor server1 desde la consola de administración de Weblogic.

Desbloquear usuario - BD ORACLE - sqlplus

1. Verificamos procesos  de bases de datos corriendo en el servidor:

      ps -fea|grep pmon






2. Exportamos la variable ORACLE_SID:

     export ORACLE_SID=PRUEBA

3.  Iniciamos sqplus

      sqlplus






4.  Nos conectamos como sysdba:
     
      / as sysdba



5. Para listar los usuarios bloqueados digitmos la siguiente consulta:

        SQL> select username,account_status from dba_users where lock_date is not null;


Imprime los usuarios que han expirado y están bloqueados,

6. Para listar el estado de todos los usuarios digitamos la siguiente consulta:

          SQL> SELECT username, account_status FROM dba_users;





7. Para desbloquear digitar algún usuario digitar el siguiente comando:

         alter user  USUARIO6 ACCOUNT unlock;


8. Iniciamos sesión con el usuario que se desbloqueó para confirmar que se haya desbloqueado exitosamente,