Forum Discussion
martijnbrands_3
Nimbostratus
Feb 22, 2019Rest API generate key with passphrase
How can I generate a key with passphrase through the REST API. I do the following :
POST mgmt/tm/sys/crypto/key
{
"name": "/Common/test.domain.nl123.key",
"keyType": "rsa-pri...
Feb 26, 2019
Fiddled around a bit in my lab and it does not seem to be possible the way you want it to.
Even via TMSH you are forced to enter it manually by using prompt-for-password (although you might be able to pipe input there via bash):
(/Common)(tmos) create sys crypto key test3 key-type rsa-private security-type password key-size 2048 ?
Options:
gen-certificate also generate a self signed certificate
gen-csr also generate a certificate signing request and display it
prompt-for-password Use password for key.
Properties:
consumer Specifies the TMOS component which will be making use of this.
curve-name Specifies the curve name to create elliptic curve (EC) key.
So the only way left as far as I can see is to upload a locally generated file, or do some work around with bash (you can run bash commands via REST).
/Patrik
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects