config/sysinv/sysinv/sysinv/sysinv/common
amantri cca5becb65 Implement new certificate APIs
Add an API /v1/certificate/get_all_certs to retrieve all the
platform certs(oidc, wra, adminep, etcd,
service account certs, system-restapi-gui-certificate,
open-ldap, openstack, system-registry-local-certificate,
k8s certs) in JSON response and use this response to format
the "system certificate-list" output as "show-certs.sh" output.

Add an API /v1/certificate/get_all_k8s_certs to retrieve all the
tls,opaque certs in JSON response and use this response to
format the "system k8s-certificate-list" output as
"show-certs.sh -k" output

Implement "system certificate-show <cert name>",
"system k8s-certificate-show <cert name>" to show the full
details of the certificate.

Implement filters in api and cli to show the expired and expiry
certificates

Testcases:
PASS: Verify all the cert values(Residual Time,Issue  Date, Expiry Date
      ,Issuer,Subject,filename,Renewal) are showing fine for all the
      following cert paths when "system certificate-list" is executed
	  /etc/kubernetes/pki/apiserver-etcd-client.crt
	  /etc/kubernetes/pki/apiserver-kubelet-client.crt
	  /etc/pki/ca-trust/source/anchors/dc-adminep-root-ca.crt
	  /etc/ssl/private/admin-ep-cert.pem
	  /etc/etcd/etcd-client.crt
	  /etc/etcd/etcd-server.crt
	  /etc/kubernetes/pki/front-proxy-ca.crt
	  /etc/kubernetes/pki/front-proxy-client.crt
	  /var/lib/kubelet/pki/kubelet-client-current.pem
	  /etc/kubernetes/pki/ca.crt
	  /etc/ldap/certs/openldap-cert.crt
	  /etc/ssl/private/registry-cert.crt
	  /etc/ssl/private/server-cert.pem
PASS: Verify all the cert values(Residual Time,Issue Date, Expiry Date
      ,Issuer,Subject,filename,Renewal) are showing fine for all the
       service accts when "system certificate-list" is executed
          /etc/kubernetes/scheduler.conf
          /etc/kubernetes/admin.conf
	  /etc/kubernetes/controller-manager.conf
PASS: Verify the system-local-ca secret is shown in the output of
      "system certificate-list"
PASS: List ns,secret name in the output of ssl,docker certs if the
      system-restapi-gui-certificate, system-registry-local-certificate
      exist on the system when "system certificate-list" executed
PASS: Apply oidc app verify that in "system certificate-list" output
      "oidc-auth-apps-certificate", oidc ca issuer and wad cert are
      shown with all proper values
PASS: Deploy WRA app verify that "mon-elastic-services-ca-crt",
      "mon-elastic-services-extca-crt" secrets are showing in the
      "system certificate-list" output and also kibana,
      elastic-services cert from mon-elastic-services-secrets secret
PASS: Verify all the cert values(Residual Time,Issue Date, Expiry Date
      ,Issuer,Subject,filename,Renewal) are showing fine for all the
      Opaque,tls type secrets when "system k8s-certificate-list" is
      executed
PASS: Execute "system certificate-show <cert name>" for each
      cert in the "system ceritificate-list" output and
      check all details of it
PASS: Execute "system certificate-list --expired" shows the
      certificates which are expired
PASS: Execute "system certificate-list --soon_to_expiry <N>"
      shows the expiring certificates with in the specified
      N days
PASS: Execute "system k8s-certificate-list --expired" shows the
      certificates which are expired
PASS: Execute "system k8s-certificate-list --soon_to_expiry <N>"
      shows the expiring certificates with in the specified
      N days
PASS: On DC system verify that admin endpoint certificates are
      shown with all values when "system certificate-list" is
      executed
PASS: Verify the following apis
	/v1/certificate/get_all_certs
        /v1/certificate/get_all_k8s_certs
        /v1/certificate/get_all_certs?soon_to_expiry=<no of days>
        /v1/certificate/get_all_k8s_certs?soon_to_expiry=<no of days>
        /v1/certificate/get_all_certs?expired=True
        /v1/certificate/get_all_k8s_certs?expired=True

Story: 2010848
Task: 48730
Task: 48785
Task: 48786

Change-Id: Ia281fe1610348596ccc1e3fad7816fe577c836d1
Signed-off-by: amantri <ayyappa.mantri@windriver.com>
2024-04-17 14:18:21 -04:00
..
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
app_metadata.py Make minimum Kubernetes version field mandatory 2024-04-05 11:11:05 -03:00
barbican_config.py Move bootstrap endpoint reconfig from puppet to sysinv 2024-02-27 13:56:31 -03:00
ceph.py Additional mechanism for unsafe force 2023-10-27 17:12:04 -03:00
config.py Deprecate sysinv.openstack.common.db in favor of oslo_db 2020-02-07 11:55:49 -06:00
configp.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
constants.py Implement new certificate APIs 2024-04-17 14:18:21 -04:00
context.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
dc_api.py Update license file with a detailed open source license 2022-06-02 12:08:16 -04:00
device.py Added the support of ACC200 device 2022-11-17 15:32:52 +00:00
disk_utils.py Replace parted and sgdisk with sfdisk in sysinv 2022-12-05 21:37:41 +00:00
etcd.py Backup control-plane during k8s network upgrade 2023-05-05 23:00:44 +00:00
exception.py Merge "Deprecate,add new system certificate commands" 2024-04-17 17:42:50 +00:00
extension_manager.py Deprecate sysinv.openstack.common.log 2019-11-05 15:29:20 -06:00
fernet.py Unsupported 'message' Exception attribute in PY3 2021-06-23 12:47:23 -04:00
fm.py Only use required fault management endpoint 2022-12-09 18:52:56 +00:00
fpga_constants.py Merge sysinv_fpga_agent with sysinv_agent 2022-10-03 14:12:28 -04:00
health.py Fix failed pods not being detected by rootca health check 2024-03-14 08:58:42 -03:00
image_service.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
images.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
inotify.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
interface.py Fix mention of python-k8sapp-openstack in sysinv 2023-03-08 09:45:24 -03:00
kubernetes.py Implement new certificate APIs 2024-04-17 14:18:21 -04:00
openstack_config_endpoints.py Create a set_users_options method in openstack endpoint config 2024-04-10 10:01:14 -03:00
paths.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
platform_firewall.py Correct typo for PTP's UDP ports in the OAM firewall 2023-10-12 10:01:24 -03:00
policy.py Deprecate old policy engine and restrict access 2022-08-10 11:18:38 -03:00
rest_api.py Initial implementation of IPsec Auth Server 2024-01-30 14:31:05 -03:00
retrying.py Re-enable important py3k checks for sysinv 2021-11-10 11:08:12 -03:00
service_parameter.py Update dns hostname validation for host-records 2024-01-05 00:03:46 -05:00
service.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
states.py Fix word and statement errors in comments 2018-11-14 10:04:51 +08:00
storage_backend_conf.py Preserve ceph monitor order for overrides 2022-11-01 16:17:09 +02:00
utils.py Implement new certificate APIs 2024-04-17 14:18:21 -04:00
wsgi_service.py Use FQDN for MGMT network 2023-10-31 20:45:40 -04:00