Showing posts with label hpbsm. Show all posts
Showing posts with label hpbsm. Show all posts

2014-04-23

HP BSM: Decrypt Management password

You will need filesystem access.

  1. Get crypt.seed.key from %HPBSM%\conf\seed.properties (also note crypt.seed.conf, it is usually AES/ECB)
  2. Get crypt.secret.key from %HPBSM%\conf\encryption.properties (also note crypt.conf.1 [substitute your crypt.conf.active.id], should be same as crypt.seed.conf)
  3. Split crypt.secret.key around the one Z in it.
    1. pre-Z part: cryptedSecretKey
    2. post-Z part: MAC
  4. Get ManagementDb.password from %HPBSM%\conf\TopazInfra.ini
    1. Split the HEX string to 4 pieces, there are three Z-s in it.
    2. Third of the four parts is the cryptText
    3. Note: This method was only checked out with ManagementDb.dbEType=1, and crypt.seed.conf=AES/ECB settings.
  5. Go here: http://aes.online-domain-tools.com
    1. Input text (hex): cryptedSecretKey
    2. Key (hex): crypt.seed.key
    3. Function: AES (note: crypt.seed.conf)
    4. Mode: ECB (note: crypt.seed.conf)
    5. Decrypted text: plaintextSecretKey, will be a HEX string, trim the 0x0A-like garbages from the end (some kind of padding I did not bother to research).
  6. Go here again: http://aes.online-domain-tools.com
    1. Input text (hex): cryptText
    2. Key (hex): plaintextSecretKey
    3. Function: AES (note: crypt.seed.conf)
    4. Mode: ECB (note: crypt.seed.conf)
    5. Decrypted text: will be the plaintext database password used for the ConnectString in TopazInfra.ini, trim the garbage bytes again, as usual.

2014-01-31

JMX connection to a remote HP BSM in VisualVM


  1. Add Remote Host... and enter your BSM's hostname (this will be the <bsm host>)
  2. Add JMX Connection...
    1. To the connection field, enter "<bsm host>:11020" (for BSM, JMX listens on 11020)
    2. Use security credentials: enter the same that you use at HP Business Service Management Status.
  3. When VisualVM  nags about no SSL, say Yes, if you accept the risks.

2013-09-10

HP BSM: Using Oracle Services instead of SID (useful if having a RAC)

This cannot be set on the wizard, this has to be done by hand. Origin of this information

  1. Log into the server. (rdp or other)
  2. Stop BSM.
  3. Create the file D:\HPBSM\conf\bsm-tnsnames.ora with content:
    hpbsm_service = 
    (DESCRIPTION = 
        (ADDRESS_LIST = 
            (ADDRESS = 
                (PROTOCOL = TCP)
                (HOST = oraclerac-vip.example.com)
                (PORT = 1521)
            )
            (LOAD_BALANCE = on)
            (FAILOVER = on)
        )
        (CONNECT_DATA = 
            (SERVER = DEDICATED)
            (SERVICE_NAME = hpbsm_service)
        )
    )
    
  4. Edit D:\HPBSM\conf\jdbc.drivers.properties
    1. Comment out the line starting with: ddoracle.url=
    2. Add new line (literally): ddoracle.url=jdbc:mercury:oracle:TNSNamesFile=D:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=${sid}
  5. Create the file D:\HPBSM\odb\conf\jdbc.properties:
    Oracle = ddoracle
    cmdb.url = jdbc:mercury:oracle:TNSNamesFile=D:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=hpbsm_service
    
    (here you have to include the service name from the bsm-tnsnames.ora)
  6. Run the "Configure HP Business Service Management" utility, and enter hpbsm_service in the SID field (it will be converted to a tnsnames.ora entry lookup by our hack above).
  7. Connect to hp_mgr with SQL Developer or TOAD (or whatever you like):
    SELECT SESSION_ID, SESSION_DB_SID FROM sessions WHERE SESSION_DB_NAME = 'profile_mgr'; -- Must be hpbsm_service. If not, update.
    SELECT SP_ID, SP_VALUE FROM setting_parameters WHERE SP_NAME IN ('opr.db.connection.sid', 'dal.bpi.runtime.sid', 'dal.bpi.pr.repos.sid');  -- All must be hpbsm_service. If not, update.
    
    UPDATE SESSIONS SET SESSION_DB_SID = 'hpbsm_service' WHERE SESSION_ID IN (SELECT SESSION_ID FROM SESSIONS WHERE SESSION_DB_NAME = 'profile_mgr');
    UPDATE SETTING_PARAMETERS SET SP_VALUE = 'hpbsm_service' WHERE SP_ID IN (SELECT SP_ID FROM SETTING_PARAMETERS WHERE SP_NAME IN ('opr.db.connection.sid', 'dal.bpi.runtime.sid', 'dal.bpi.pr.repos.sid'));
    
    
  8. Start BSM.
  9. VALIDATE

HP BSM: Removing licenses

As you already know, you cannot remove licenses through the BUI. The only way there is to remove it from the database directly!
Log in to the DB, into the hp_mgr schema, and:
SELECT license_key FROM licenses;
The rows ending with a "T*" identifier are the actual licenses. Select the license you want to remove, and delete that row (note: the license_key is the key candidate here), and restart BSM, to get the change in effect!

Useful, if you have mistakenly added a prod license to your dev tier, or vice versa.