Abhilash Perla created KNOX-2739: ------------------------------------ Summary: When exporting certificate using Knox CLI, the certificate is coming with wrong name when type=PEM Key: KNOX-2739 URL: https://issues.apache.org/jira/browse/KNOX-2739 Project: Apache Knox Issue Type: Bug Components: KnoxCLI Reporter: Abhilash Perla
According to this: ([https://knox.apache.org/books/knox-1-3-0/user-guide.html#Certificate+Export)] When we export a certificate using this command: h5. {{bin/knoxcli.sh export-cert [--type JKS|PEM|JCEKS|PKCS12] [–help]}} The certificate should come with name: 'gateway-client-trust.<type>'. This is working fine for formats JKS, JCEKS, PKCS12. But for PEM the certificate file name is "gateway-identity.pem" Execution Sample: {noformat} [root@quasar-dwblwf-2 ~]# export KNOX_GATEWAY_CONF_DIR=/var/lib/knox/gateway/conf [root@quasar-dwblwf-2 ~]# export KNOX_GATEWAY_DATA_DIR=/var/lib/knox/gateway/data [root@quasar-dwblwf-2 ~]# /opt/cloudera/parcels/CDH/lib/knox/bin/knoxcli.sh export-cert --type JKS Certificate gateway-identity has been successfully exported to: /var/lib/knox/gateway/data/security/keystores/gateway-client-trust.jks [root@quasar-dwblwf-2 ~]# /opt/cloudera/parcels/CDH/lib/knox/bin/knoxcli.sh export-cert --type PKCS12 Certificate gateway-identity has been successfully exported to: /var/lib/knox/gateway/data/security/keystores/gateway-client-trust.pkcs12 [root@quasar-dwblwf-2 ~]# /opt/cloudera/parcels/CDH/lib/knox/bin/knoxcli.sh export-cert --type JCEKS Certificate gateway-identity has been successfully exported to: /var/lib/knox/gateway/data/security/keystores/gateway-client-trust.jceks [root@quasar-dwblwf-2 ~]# /opt/cloudera/parcels/CDH/lib/knox/bin/knoxcli.sh export-cert --type PEM Certificate gateway-identity has been successfully exported to: /var/lib/knox/gateway/data/security/keystores/gateway-identity.pem{noformat} -- This message was sent by Atlassian Jira (v8.20.7#820007)