Forum Discussion
Mass print of SSL certs and their Virtual Servers/Profiles
how would I get the details off a non-common partition?
i have another idea which uses icontrol rest and jq. since icontrol rest is not limited to single partition. all virtual servers and clientssl profiles should be recognized even it uses configuration object from another partition.
[root@bip1a:Active:In Sync] config for i in `curl -sk -u admin:admin https://localhost/mgmt/tm/sys/file/ssl-cert |jq '.items[]|{fullPath}' |awk '/fullPath/ {print $2}'`; do echo "===== cert: $i ====="; for j in `curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/profile/client-ssl |jq ".items[]|select(.cert==$i)|{fullPath}" |awk '/fullPath/ {print $2}'`; do echo "----- profile: $j -----"; for k in `curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/virtual?expandSubcollections=true |jq ".items[]|select(.profilesReference.items[].fullPath==$j)|{fullPath}" |awk '/fullPath/ {print $2}'`; do echo "virtual: $k"; echo ""; done; done; echo ""; done
===== cert: "/Common/ca-bundle.crt" =====
===== cert: "/Common/cert-one.crt" =====
----- profile: "/Common/clientssl-one" -----
virtual: "/Common/vs-one"
----- profile: "/jotunheim/clientssl-special" -----
virtual: "/jotunheim/vs-special"
===== cert: "/Common/default.crt" =====
----- profile: "/Common/clientssl" -----
----- profile: "/Common/clientssl-insecure-compatible" -----
----- profile: "/Common/clientssl-secure" -----
----- profile: "/Common/crypto-server-default-clientssl" -----
----- profile: "/Common/wom-default-clientssl" -----
===== cert: "/Common/f5-irule.crt" =====
===== cert: "/asgard/cert-heimdall.crt" =====
----- profile: "/asgard/clientssl-heimdall" -----
virtual: "/asgard/vs-heimdall"
===== cert: "/jotunheim/loki-cert.crt" =====
----- profile: "/jotunheim/clientssl-loki" -----
virtual: "/jotunheim/vs-loki"
- Duncan_ProffittDec 28, 2017
Altostratus
Thank you for all of that. So, on the GUI, I navigate to SSL Cert List There I drop down the partition drop-down and not only do I have Common, but I have two other partitions.
Lets call them red and green
Both Red and Green use Common partition/path certs as well as certs individual to their own partition.
You have very kindly helped me previously with the Common certs, and once again, you have scored another goal with this one liner!!
Thank you so much again!
- nitassDec 28, 2017
Employee
very welcome. what you are asking makes sense. i was enjoying playing around with it and hope i can use it too!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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