I see that it states it uses the credential configured for the device. Is there any way to specify what credential is used?
2 of 2 people found this helpful
No, you cannot specify an individual credential. It will try all enabled credentials with the appropriate credential type that are allowed to access the endpoint.
If you're feeling rebellious you could pass a specific username and password in the headers;)
I would just create the credential in discovery and let discovery do it's work for you.
1 of 1 people found this helpful
There are several negatives for including it in a pattern headers:
* the credential is visible in the pattern,
* the credential is visible in DDD nodes,
* updating the credential is painful,
* implementing authentication can be very hard, depending upon the mechanism.
I believe we've figured out the credential issue by having the host configured for SSH login with for the same credential the API uses. However, we're having a problem with the pattern upload. I'm seeing a failure when uploading that states "Function restfulGet not found" when I add the discovery.restfulGet function to the pattern. TPL version is 1.15 and discovery version is 11.3. I was thinking this was an adequate version level for these functions?
As What's new in TPL - Documentation for BMC Discovery 11.3 - BMC Documentation shows, 1.15 / 11.3 is perfectly fine to use discovery.restfulGet - Documentation for BMC Discovery 11.3 - BMC Documentation function.
Difficult to say more without additional details on your pattern.
There's no clear reason why unless I'm missing an update step. But like I said, the Discovery version is 184.108.40.206 and the TPL version is 1.15, as stated on the knowledge page. The TKUs are even updated to the Jan 2020 releases.
Below is the body of the pattern. Right now, not much is going on aside from simply testing functionality with uploading. The pattern upload works up until I add the discovery.restfulGet line towards the bottom. The full message: "failed because Function restfulGet not found - namespace discovery does not contain function at line 113"
addresses := device.#InferredElement:Inference:Associate:DiscoveryAccess.endpoint;
proxy_search := search(Host where name has subword "blah");
proxy := proxy_search;
configs := CheckpointSecurityControlsFunctions.callProxyScriptForConfigs(proxy,addresses);
discovery.restfulGet(device, '', '/about');
Thank you! Such a silly thing to overlook. Modifying the TPL version value in the pattern fixed the issue and the pattern was uploaded.