During the last week I learned how seldom Oracles Connection Manager (cman) is used. This also means it's integrated into the ecosystem with less motivation - at least in comparison to other products.
One such a loose integration is the management of cman passwords in Oracle Enterprise Manager (OEM).
In the web interface it's quite easy: The password is just a property like anything else.
But it gets more complicated when trying to change the configuration with emcli. The "obvious" approach, use emcli set_credential fails:
emcli set_credential \
-target_type="oracle_cman" \
-target_name="$cman" \
-credential_set="CmanCredsMonitoring" \
-monitoring
Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.
Well, there are other methods to modify properties - and it somehow seems OEM indicates cmans password more a property than a password. With this in mind, the password can be modified:
emcli modify_target \
-type="oracle_cman" \
-name="$cman" \
-properties="Password:xxx"
Target "cman_········:oracle_cman" modified successfully
Unfortunately, this command can be used to set a password. but when trying to delete it (yes, this might happen sometimes) it fails:
emcli modify_target \
-type="oracle_cman" \
-name="$cman" \
-properties="Password:"
Syntax Error: Invalid value for parameter "properties": "Password:". Reason: "Password:" is not a name-value pair.
At the moment, I don't have a reasonable solution how to delete cmans password in OEM configuration. The only supported way is to do it in the web frontend - but this just doesn't scale and is not very cloud-ish (aka automated).
I can do the totally unsupported method by updating the OEM repository table SYSMAN.EM_NC_CRED_COLUMNS and set CREAD_ATTR_VALUE to NULL. My query to get it's content is
select mt.target_name
, mt.target_type
, mt.emd_url
, mt.target_guid
, etc.set_name
, encc.*
from sysman.MGMT$target mt
, sysman.EM_TARGET_CREDS etc
, sysman.em_nc_cred_columns encc
where 1=1
and mt.target_guid = etc.target_guid
and etc.cred_guid = encc.cred_guid
and mt.target_type = 'oracle_cman'
and mt.target_name like '%&cman_name%'
order by 1 ;
you can guess the update statement. OR, we hope Oracle will soon implement the Enhancement Request 35084478 : EMCLI delete password not working for cman target