Merge pull request #5891 from Amitind/fix/5128-hide-certificate-key

fix: omit certificate_key from certificate API responses
This commit is contained in:
jc21
2026-09-26 19:30:31 +10:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ const certbotLogsDir = "/data/logs";
const certbotWorkDir = "/tmp/letsencrypt-lib";
const omissions = () => {
return ["is_deleted", "owner.is_deleted", "meta.dns_provider_credentials"];
return ["is_deleted", "owner.is_deleted", "meta.dns_provider_credentials", "meta.certificate_key"];
};
const internalCertificate = {
+3
View File
@@ -69,6 +69,9 @@ describe('Certificates endpoints', () => {
}).then((data) => {
cy.validateSwaggerSchema('get', 200, '/nginx/certificates', data);
expect(data.length).to.be.greaterThan(0);
const cert = data.find((c) => c.id === certID);
expect(cert.meta).to.have.property('certificate');
expect(cert.meta).to.not.have.property('certificate_key');
// Delete cert
cy.task('backendApiDelete', {