Hi @dchiesa1
This morning we were trying using https://github.com/DinoChiesa/apigee-load-pem-key-into-kvm
but looks like it needed the private & public key pair to upload to KVM.
In our use case we have public keys only(but not pair) from vendor which are being used for encryption (in request flow) & signature verification (in response flow). Similarly we have our private keys for signing (in request) & decryption (in response). Now we need to upload them to KVM & refer.
we have them hardcoded in AM policy & we have the flow working seamlessly. Need your help on this.
error:
Checking for existing entries in KVM 'kvm-secrets'...
Found existing entries.
Found public key rsa-public-key-xenc.pubkey.pem, but the corresponding private key
rsa-private-key-xenc.pubkey.pem is missing. Exiting.
Solved! Go to Solution.
ok can you just modify the example script to fit your requirements?
There's a test in the script that looks for both public and private key. Just remove that. And you may need to modify it to look for a file that matches the pattern your file has.
And then there is a loop that uploads 2 files. Just modify it so that t uploads only one file.
would that work?
Remove lines 111-117
Modify line 159 to look only at keytype "public" (remove the word private)
Would that work?
Also this is an EXAMPLE. In the end you have to own the provisioning scripts. So I don't suppose you would be using exactly what is provided in a git repo. You will want to understand and own the scripts, maybe parameterize them differently, make them less interactive (because you would want to make them automated, I guess).
I have found... Gemini to be super useful in coaching me through those kinds of modifications of existing code.
Especially now that there is a Gemini CLI. I just ask it questions and get answers and code suggestions. Pretty slick!
Good luck.
ok can you just modify the example script to fit your requirements?
There's a test in the script that looks for both public and private key. Just remove that. And you may need to modify it to look for a file that matches the pattern your file has.
And then there is a loop that uploads 2 files. Just modify it so that t uploads only one file.
would that work?
Remove lines 111-117
Modify line 159 to look only at keytype "public" (remove the word private)
Would that work?
Also this is an EXAMPLE. In the end you have to own the provisioning scripts. So I don't suppose you would be using exactly what is provided in a git repo. You will want to understand and own the scripts, maybe parameterize them differently, make them less interactive (because you would want to make them automated, I guess).
I have found... Gemini to be super useful in coaching me through those kinds of modifications of existing code.
Especially now that there is a Gemini CLI. I just ask it questions and get answers and code suggestions. Pretty slick!
Good luck.
Thank you @dchiesa1 . I was able to modify the script according to my needs & upload the PEM files to the KVM. Removed all the AM policies which had hardcoded PEM files & tested. Its working fine. thanks for all your help.
whoo! Excellent!
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |