Forum Discussion
Is it possible to configure BIGIP with Node.js?
I am trying to configure BIGIP/iControl REST APIs with my node.js (JavaScript) application for uploading and installation of certificate. I could not find any document/forum on how to implement this in node.js.
I am using python to upload the certificate for now using the method specified in the BIGIP SDK documentation (https://f5-sdk.readthedocs.io/en/latest/userguide/file_transfers.html). However I want to achieve the same using node.js.
Also I have successfully uploaded the certificate to the downloads directory mentioned in the docs. I am facing issues with how to install the certificate? Can someone help me with the steps?
Is it possible with node.js? if not can someone suggest me what other options I have to achieve this?
- Lucas_ThompsonEmployee
Porting from Python to Node is probably outside the scope of this forum, but the certificate management stuff should work fine. You have to do these things (in order, so you'll have to use synchronous calls or promises):
1- Upload the cert to a file on big-ip (using the api you already use)
2- Upload the key to a file on big-ip (using the api you already use)
3- Create a cert object from that file using this API: https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_sys_crypto_cert.html
4- Create a key object from that file using this API: https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_sys_crypto_key.html
5- Create a client-ssl profile that reference that key and cert object you made using this API: https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_profile_client-ssl.html
I'm not sure off the top of my head if the REST API saves the running configuration into the permanent configuration by itself or if you have to call the equivalent of "tmsh save sys config" afterwards to ensure it's saved. But it any case make sure your changes are persisted after running "tmsh load sys config".
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com