新增功能:查看secret和ingress对象的tls证书有效期域名等信息 (#213)

This commit is contained in:
awol2005ex
2024-06-25 11:15:40 +08:00
committed by GitHub
parent 017ab9126f
commit 02ff83c837
8 changed files with 552 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ RUN make build_web
RUN rm -fr web
FROM golang:1.20 as stage-bin-build
FROM golang:1.22 as stage-bin-build
ENV GOPROXY="https://goproxy.cn,direct"

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/KubeOperator/kubepi
go 1.20
go 1.22
require (
github.com/asdine/storm/v3 v3.2.1

View File

@@ -13,6 +13,7 @@
"@fortawesome/free-regular-svg-icons": "^5.15.2",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@fortawesome/vue-fontawesome": "^2.0.2",
"@peculiar/x509": "^1.11.0",
"axios": "^1.6.5",
"core-js": "^3.35.0",
"diff-match-patch": "^1.0.5",
@@ -2100,6 +2101,141 @@
"node": ">= 8"
}
},
"node_modules/@peculiar/asn1-cms": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-cms/-/asn1-cms-2.3.8.tgz",
"integrity": "sha512-Wtk9R7yQxGaIaawHorWKP2OOOm/RZzamOmSWwaqGphIuU6TcKYih0slL6asZlSSZtVoYTrBfrddSOD/jTu9vuQ==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"@peculiar/asn1-x509-attr": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-csr": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-csr/-/asn1-csr-2.3.8.tgz",
"integrity": "sha512-ZmAaP2hfzgIGdMLcot8gHTykzoI+X/S53x1xoGbTmratETIaAbSWMiPGvZmXRA0SNEIydpMkzYtq4fQBxN1u1w==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-ecc": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-ecc/-/asn1-ecc-2.3.8.tgz",
"integrity": "sha512-Ah/Q15y3A/CtxbPibiLM/LKcMbnLTdUdLHUgdpB5f60sSvGkXzxJCu5ezGTFHogZXWNX3KSmYqilCrfdmBc6pQ==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-pfx": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pfx/-/asn1-pfx-2.3.8.tgz",
"integrity": "sha512-XhdnCVznMmSmgy68B9pVxiZ1XkKoE1BjO4Hv+eUGiY1pM14msLsFZ3N7K46SoITIVZLq92kKkXpGiTfRjlNLyg==",
"dependencies": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-pkcs8": "^2.3.8",
"@peculiar/asn1-rsa": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-pkcs8": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.3.8.tgz",
"integrity": "sha512-rL8k2x59v8lZiwLRqdMMmOJ30GHt6yuHISFIuuWivWjAJjnxzZBVzMTQ72sknX5MeTSSvGwPmEFk2/N8+UztFQ==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-pkcs9": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.3.8.tgz",
"integrity": "sha512-+nONq5tcK7vm3qdY7ZKoSQGQjhJYMJbwJGbXLFOhmqsFIxEWyQPHyV99+wshOjpOjg0wUSSkEEzX2hx5P6EKeQ==",
"dependencies": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-pfx": "^2.3.8",
"@peculiar/asn1-pkcs8": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"@peculiar/asn1-x509-attr": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-rsa": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-rsa/-/asn1-rsa-2.3.8.tgz",
"integrity": "sha512-ES/RVEHu8VMYXgrg3gjb1m/XG0KJWnV4qyZZ7mAg7rrF3VTmRbLxO8mk+uy0Hme7geSMebp+Wvi2U6RLLEs12Q==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-schema": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz",
"integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==",
"dependencies": {
"asn1js": "^3.0.5",
"pvtsutils": "^1.3.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-x509": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-x509/-/asn1-x509-2.3.8.tgz",
"integrity": "sha512-voKxGfDU1c6r9mKiN5ZUsZWh3Dy1BABvTM3cimf0tztNwyMJPhiXY94eRTgsMQe6ViLfT6EoXxkWVzcm3mFAFw==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"asn1js": "^3.0.5",
"ipaddr.js": "^2.1.0",
"pvtsutils": "^1.3.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/asn1-x509-attr": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.3.8.tgz",
"integrity": "sha512-4Z8mSN95MOuX04Aku9BUyMdsMKtVQUqWnr627IheiWnwFoheUhX3R4Y2zh23M7m80r4/WG8MOAckRKc77IRv6g==",
"dependencies": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"node_modules/@peculiar/x509": {
"version": "1.11.0",
"resolved": "https://registry.npmmirror.com/@peculiar/x509/-/x509-1.11.0.tgz",
"integrity": "sha512-8rdxE//tsWLb2Yo2TYO2P8gieStbrHK/huFMV5PPfwX8I5HmtOus+Ox6nTKrPA9o+WOPaa5xKenee+QdmHBd5g==",
"dependencies": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-csr": "^2.3.8",
"@peculiar/asn1-ecc": "^2.3.8",
"@peculiar/asn1-pkcs9": "^2.3.8",
"@peculiar/asn1-rsa": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"pvtsutils": "^1.3.5",
"reflect-metadata": "^0.2.2",
"tslib": "^2.6.2",
"tsyringe": "^4.8.0"
}
},
"node_modules/@polka/url": {
"version": "1.0.0-next.24",
"resolved": "https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.24.tgz",
@@ -3472,6 +3608,19 @@
"node": ">=8"
}
},
"node_modules/asn1js": {
"version": "3.0.5",
"resolved": "https://registry.npmmirror.com/asn1js/-/asn1js-3.0.5.tgz",
"integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==",
"dependencies": {
"pvtsutils": "^1.3.2",
"pvutils": "^1.1.3",
"tslib": "^2.4.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/astral-regex/-/astral-regex-2.0.0.tgz",
@@ -6687,7 +6836,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz",
"integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==",
"dev": true,
"engines": {
"node": ">= 10"
}
@@ -8977,6 +9125,22 @@
"node": ">=6"
}
},
"node_modules/pvtsutils": {
"version": "1.3.5",
"resolved": "https://registry.npmmirror.com/pvtsutils/-/pvtsutils-1.3.5.tgz",
"integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==",
"dependencies": {
"tslib": "^2.6.1"
}
},
"node_modules/pvutils": {
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/pvutils/-/pvutils-1.1.3.tgz",
"integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -9088,6 +9252,11 @@
"node": ">=8.10.0"
}
},
"node_modules/reflect-metadata": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q=="
},
"node_modules/regenerate": {
"version": "1.4.2",
"resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz",
@@ -10334,8 +10503,23 @@
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"node_modules/tsyringe": {
"version": "4.8.0",
"resolved": "https://registry.npmmirror.com/tsyringe/-/tsyringe-4.8.0.tgz",
"integrity": "sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA==",
"dependencies": {
"tslib": "^1.9.3"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/tsyringe/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/type-check": {
"version": "0.4.0",
@@ -12851,6 +13035,141 @@
"fastq": "^1.6.0"
}
},
"@peculiar/asn1-cms": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-cms/-/asn1-cms-2.3.8.tgz",
"integrity": "sha512-Wtk9R7yQxGaIaawHorWKP2OOOm/RZzamOmSWwaqGphIuU6TcKYih0slL6asZlSSZtVoYTrBfrddSOD/jTu9vuQ==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"@peculiar/asn1-x509-attr": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-csr": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-csr/-/asn1-csr-2.3.8.tgz",
"integrity": "sha512-ZmAaP2hfzgIGdMLcot8gHTykzoI+X/S53x1xoGbTmratETIaAbSWMiPGvZmXRA0SNEIydpMkzYtq4fQBxN1u1w==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-ecc": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-ecc/-/asn1-ecc-2.3.8.tgz",
"integrity": "sha512-Ah/Q15y3A/CtxbPibiLM/LKcMbnLTdUdLHUgdpB5f60sSvGkXzxJCu5ezGTFHogZXWNX3KSmYqilCrfdmBc6pQ==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-pfx": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pfx/-/asn1-pfx-2.3.8.tgz",
"integrity": "sha512-XhdnCVznMmSmgy68B9pVxiZ1XkKoE1BjO4Hv+eUGiY1pM14msLsFZ3N7K46SoITIVZLq92kKkXpGiTfRjlNLyg==",
"requires": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-pkcs8": "^2.3.8",
"@peculiar/asn1-rsa": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-pkcs8": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.3.8.tgz",
"integrity": "sha512-rL8k2x59v8lZiwLRqdMMmOJ30GHt6yuHISFIuuWivWjAJjnxzZBVzMTQ72sknX5MeTSSvGwPmEFk2/N8+UztFQ==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-pkcs9": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.3.8.tgz",
"integrity": "sha512-+nONq5tcK7vm3qdY7ZKoSQGQjhJYMJbwJGbXLFOhmqsFIxEWyQPHyV99+wshOjpOjg0wUSSkEEzX2hx5P6EKeQ==",
"requires": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-pfx": "^2.3.8",
"@peculiar/asn1-pkcs8": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"@peculiar/asn1-x509-attr": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-rsa": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-rsa/-/asn1-rsa-2.3.8.tgz",
"integrity": "sha512-ES/RVEHu8VMYXgrg3gjb1m/XG0KJWnV4qyZZ7mAg7rrF3VTmRbLxO8mk+uy0Hme7geSMebp+Wvi2U6RLLEs12Q==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-schema": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz",
"integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==",
"requires": {
"asn1js": "^3.0.5",
"pvtsutils": "^1.3.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-x509": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-x509/-/asn1-x509-2.3.8.tgz",
"integrity": "sha512-voKxGfDU1c6r9mKiN5ZUsZWh3Dy1BABvTM3cimf0tztNwyMJPhiXY94eRTgsMQe6ViLfT6EoXxkWVzcm3mFAFw==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"asn1js": "^3.0.5",
"ipaddr.js": "^2.1.0",
"pvtsutils": "^1.3.5",
"tslib": "^2.6.2"
}
},
"@peculiar/asn1-x509-attr": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.3.8.tgz",
"integrity": "sha512-4Z8mSN95MOuX04Aku9BUyMdsMKtVQUqWnr627IheiWnwFoheUhX3R4Y2zh23M7m80r4/WG8MOAckRKc77IRv6g==",
"requires": {
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"asn1js": "^3.0.5",
"tslib": "^2.6.2"
}
},
"@peculiar/x509": {
"version": "1.11.0",
"resolved": "https://registry.npmmirror.com/@peculiar/x509/-/x509-1.11.0.tgz",
"integrity": "sha512-8rdxE//tsWLb2Yo2TYO2P8gieStbrHK/huFMV5PPfwX8I5HmtOus+Ox6nTKrPA9o+WOPaa5xKenee+QdmHBd5g==",
"requires": {
"@peculiar/asn1-cms": "^2.3.8",
"@peculiar/asn1-csr": "^2.3.8",
"@peculiar/asn1-ecc": "^2.3.8",
"@peculiar/asn1-pkcs9": "^2.3.8",
"@peculiar/asn1-rsa": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"pvtsutils": "^1.3.5",
"reflect-metadata": "^0.2.2",
"tslib": "^2.6.2",
"tsyringe": "^4.8.0"
}
},
"@polka/url": {
"version": "1.0.0-next.24",
"resolved": "https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.24.tgz",
@@ -13997,6 +14316,16 @@
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"asn1js": {
"version": "3.0.5",
"resolved": "https://registry.npmmirror.com/asn1js/-/asn1js-3.0.5.tgz",
"integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==",
"requires": {
"pvtsutils": "^1.3.2",
"pvutils": "^1.1.3",
"tslib": "^2.4.0"
}
},
"astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/astral-regex/-/astral-regex-2.0.0.tgz",
@@ -16595,8 +16924,7 @@
"ipaddr.js": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz",
"integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==",
"dev": true
"integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ=="
},
"is-arrayish": {
"version": "0.2.1",
@@ -18335,6 +18663,19 @@
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true
},
"pvtsutils": {
"version": "1.3.5",
"resolved": "https://registry.npmmirror.com/pvtsutils/-/pvtsutils-1.3.5.tgz",
"integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==",
"requires": {
"tslib": "^2.6.1"
}
},
"pvutils": {
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/pvutils/-/pvutils-1.1.3.tgz",
"integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ=="
},
"queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -18426,6 +18767,11 @@
"picomatch": "^2.2.1"
}
},
"reflect-metadata": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q=="
},
"regenerate": {
"version": "1.4.2",
"resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz",
@@ -19436,8 +19782,22 @@
"tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"tsyringe": {
"version": "4.8.0",
"resolved": "https://registry.npmmirror.com/tsyringe/-/tsyringe-4.8.0.tgz",
"integrity": "sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA==",
"requires": {
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"type-check": {
"version": "0.4.0",

View File

@@ -13,6 +13,7 @@
"@fortawesome/free-regular-svg-icons": "^5.15.2",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@fortawesome/vue-fontawesome": "^2.0.2",
"@peculiar/x509": "^1.11.0",
"axios": "^1.6.5",
"core-js": "^3.35.0",
"diff-match-patch": "^1.0.5",

View File

@@ -7,13 +7,39 @@
<ko-detail-basic :item="item" :yaml-show.sync="yamlShow"></ko-detail-basic>
</el-card>
</el-col>
<el-col :span="24">
<el-card class="el-card" style="width:800px" v-for="c in certificates" v-bind:key="c.key">
<div class="card_title">
<h3>{{ $t("business.configuration.certificate_info") }}:{{c.key}}</h3>
</div>
<table style="width: 100%" class="myTable">
<tr>
<td>{{ $t("business.configuration.certificate_signatureAlgorithm") }}</td>
<td>{{ c.signatureAlgorithm }}</td>
</tr>
<tr>
<td>subject</td>
<td>{{ c.subject }}</td>
</tr>
<tr>
<td>issuer</td>
<td>{{ c.issuer }}</td>
</tr>
<tr>
<td>{{ $t("business.configuration.certificate_validity") }}</td>
<td>{{ c.validity }}<font style='color:red' v-if="c.notAfter< new Date()">({{ $t("business.configuration.certificate_outdate") }})</font></td>
</tr>
</table>
</el-card>
</el-col>
<el-col :span="24">
<br>
<el-card class="el-card" style="width:800px">
<div class="card_title">
<h3>{{ $t("business.configuration.data") }}</h3>
</div>
<div v-for="(value,key) in item.data" v-bind:key="key">
<div v-for="(value,key) in item.data" v-bind:key="key">
<ko-data :title="key">
<json-viewer v-if="jsonV(value)&&key!=='token'" :value="getContent(value)" :copyable="copyable"
theme="jv-dark" :expanded="true" :expand-depth="3"></json-viewer>
@@ -44,6 +70,8 @@ import {isJSON} from "@/utils/data"
import KoData from "@/components/ko-data"
import YamlEditor from "@/components/yaml-editor"
import KoDetailBasic from "@/components/detail/detail-basic"
import * as x509 from "@peculiar/x509";
import { datetimeFormat } from "fit2cloud-ui/src/filters/time"
export default {
name: "SecretDetail",
@@ -62,7 +90,9 @@ export default {
yamlShow: false,
loading: false,
yaml: {},
copyable: { copyText: "复制" }
copyable: { copyText: this.$t("commons.actions.copy") },
/*证书信息*/
certificates:[]
}
},
methods: {
@@ -72,7 +102,27 @@ export default {
this.loading = false
this.item = res
this.yaml = JSON.parse(JSON.stringify(this.item))
/*分解证书信息*/
for (let key in this.item.data) {
const value =this.item.data[key]
const base64_decode_value =this.getValue(value)
if(base64_decode_value.startsWith("-----BEGIN CERTIFICATE-----")){
const cert = new x509.X509Certificate(base64_decode_value)
this.certificates.push({
key:key,
signatureAlgorithm:cert.signatureAlgorithm.name +" "+cert.signatureAlgorithm.hash.name,
subject:cert.subject,
issuer:cert.issuer,
validity:datetimeFormat(cert.notBefore) + " ~ " + datetimeFormat(cert.notAfter),
notBefore:cert.notBefore,
notAfter:cert.notAfter,
})
}
}
//console.log(this.certificates)
})
},
getContent (value) {
const { Base64 } = require("js-base64")

View File

@@ -8,6 +8,50 @@
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" class="row-box">
<el-col :span="24">
<el-card class="el-card" style="width:800px" v-for="c in certificates" v-bind:key="c.key">
<div class="card_title">
<h3>{{ $t("business.configuration.certificate_info") }}:{{c.secret}}:{{c.key}}</h3>
</div>
<table style="width: 100%" class="myTable">
<tr>
<td>{{ $t("business.configuration.certificate_signatureAlgorithm") }}</td>
<td>{{ c.signatureAlgorithm }}</td>
</tr>
<tr>
<td>subject</td>
<td>{{ c.subject }}</td>
</tr>
<tr>
<td>issuer</td>
<td>{{ c.issuer }}</td>
</tr>
<tr>
<td>{{ $t("business.configuration.certificate_validity") }}</td>
<td>{{ c.validity }}<font style='color:red' v-if="c.notAfter< new Date()">({{ $t("business.configuration.certificate_outdate") }})</font></td>
</tr>
</table>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" class="row-box">
<el-col :span="24" v-if="certificate_errs.length>0">
<el-card class="el-card" style="width:800px" >
<div class="card_title">
<h3>{{ $t("business.configuration.certificate_errors") }}</h3>
</div>
<table style="width: 100%" class="myTable">
<tr v-for="c in certificate_errs" v-bind:key="c.secret">
<td>Secret: {{ c.secret}}</td>
<td style='color:red'>{{ c.err }}</td>
</tr>
</table>
</el-card>
</el-col>
</el-row>
<el-row>
<br>
<el-col :span="24">
@@ -34,6 +78,9 @@ import {getIngress} from "@/api/ingress"
import YamlEditor from "@/components/yaml-editor"
import KoResourceRule from "@/components/detail/detail-rules"
import KoDetailBasic from "@/components/detail/detail-basic"
import {getSecret} from "@/api/secrets"
import * as x509 from "@peculiar/x509";
import { datetimeFormat } from "fit2cloud-ui/src/filters/time"
export default {
name: "IngressDetail",
@@ -51,19 +98,76 @@ export default {
cluster: "",
yamlShow: false,
loading: false,
yaml: {}
yaml: {},
/*证书信息*/
certificates:[],
certificate_errs:[],
}
},
methods: {
getDetail () {
async getDetail () {
this.loading = true
getIngress(this.cluster, this.namespace, this.name).then(res => {
this.item = res
this.yaml = JSON.parse(JSON.stringify(this.item))
}).finally(() => {
this.loading = false
})
const res= await getIngress(this.cluster, this.namespace, this.name)
this.item = res
this.yaml = JSON.parse(JSON.stringify(this.item))
//显示tls证书信息
await this.doWithCertificates()
this.loading = false
},
//显示tls证书信息
async doWithCertificates(){
const tls = this.item.spec.tls
if(!tls){
return
}
if(tls && tls.length==0){
this.certificate_errs.push({
secret: "No Settings",
err:"The tls attribute is not null but no secrets"
})
return ;
}
const { Base64 } = require("js-base64")
for(let i=0,s=tls.length;i<s;i++){
if(tls && tls.length>0){
const secretName=tls[i].secretName
if(secretName){
try{
const secret = await getSecret(this.cluster, this.namespace, secretName)
/*分解证书信息*/
for (let key in secret.data) {
const value =secret.data[key]
const base64_decode_value =Base64.decode(value)
if(base64_decode_value.startsWith("-----BEGIN CERTIFICATE-----")){
const cert = new x509.X509Certificate(base64_decode_value)
this.certificates.push({
secret: secretName,
key:key,
signatureAlgorithm:cert.signatureAlgorithm.name +" "+cert.signatureAlgorithm.hash.name,
subject:cert.subject,
issuer:cert.issuer,
validity:datetimeFormat(cert.notBefore) + " ~ " + datetimeFormat(cert.notAfter),
notBefore:cert.notBefore,
notAfter:cert.notAfter,
})
}
}
}catch(e){
console.log(e)
this.certificate_errs.push({
secret: secretName,
err:"not exists"
})
}
}
}
}
}
},
watch: {
yamlShow: function (newValue) {
@@ -74,10 +178,10 @@ export default {
})
}
},
created () {
async created () {
this.cluster = this.$route.query.cluster
this.yamlShow = this.$route.query.yamlShow === "true"
this.getDetail()
await this.getDetail()
}
}
</script>

View File

@@ -138,6 +138,9 @@ const message = {
name: "Name"
}
},
actions:{
copy: "Copy",
}
},
business: {
common: {
@@ -586,6 +589,11 @@ const message = {
name: "Name",
split_help: "Multiple values are separated by commas",
best_effort: "The {0} scope restricts a quota to tracking the following resource:",
certificate_info: "Certificate Info",
certificate_signatureAlgorithm: "signatureAlgorithm",
certificate_validity: "validity",
certificate_outdate: "The certificate is out of date",
certificate_errors: "Certificate errors"
},
access_control: {
access_control: "Access Control",

View File

@@ -139,6 +139,9 @@ const message = {
name: "名称"
}
},
actions:{
copy: "复制",
}
},
business: {
common: {
@@ -588,6 +591,11 @@ const message = {
name: "名称",
split_help: "多个值时以逗号分隔",
best_effort: "{0} 范围限制了跟踪以下资源的配额:",
certificate_info: "证书信息",
certificate_signatureAlgorithm: "证书签名算法",
certificate_validity: "证书有效期",
certificate_outdate: "证书已过期",
certificate_errors: "证书错误"
},
access_control: {
access_control: "访问控制",