Added check for certificate expiration issue - #407
Conversation
|
Attached log for reference. APIC Log : APIC Run log - SSL Cert expiry issue.docx Pytest Log: |
|
Attaching latest APIC & Pytest logs APIC Logs: APIC Run log - SSL Cert expiry issue.docx Pytest Logs: |
|
This is great — thanks for adding fault-based cert expiration detection. One As a complementary check (not a replacement), I've been running a script
Since fabric node SSL cert expiry/re-validation failures are a distinct |
|
@thjonson Thanks for sharing your suggesstions. In this PR itself added validation for leaf/spine certificate expiration using MO's "pkiFabricNodeSSLCertificate" irrespective of faults and alert the customer if it's expired and expiring (expires within ~30 days) which matched the days with expired & expiring fault codes and we maintain same with faults expiring & MO's based expiring. can you please provide details for below item ? how to verify ? what is the impact of this customer will face ? what is the recommended_action we have to provide to customer if they face this ? Flags notAfter in year 2099, which matches FN-72339 (renewed-SUDI |
|
@monrog2 this PR still hold validation for APIC Side cert expiry validation. Only leaf/spine cert validation has been reverted. |
|
Quick clarification first: looking at the current diff, I don't see the On to FN-72339 specifically: I hadn't realized your earlier changes had polled How to verify FN-72339FN-72339 hits switches manufactured after June 2020 (dual-cert ACT2 chip)
My script checks for these independently, as flags rather than a single
The reason I don't treat a lone Recommended action / remediation
Let me know if it'd help to see the actual bash logic — it's about 10 lines, happy to paste it inline here. |
| if fault_attrs['lc'] not in ("raised", "soaking"): | ||
| continue | ||
| data.append([fault_attrs['code'], fault_attrs['severity'], fault_attrs['descr']]) | ||
| if fault_attrs['severity'] == 'critical': |
There was a problem hiding this comment.
Using severity attribute to classify expired vs expiring is fragile. Better to check the fault code directly against the known expired/expiring sets.
| has_major = True | ||
|
|
||
| if data: | ||
| if has_error: |
There was a problem hiding this comment.
No test covers the case where fault API returns expired certs (has_critical=True) AND SSH to a controller fails (has_error=True) at the same time. In that scenario the code returns ERROR and hides the confirmed FAIL_O finding.
| @@ -0,0 +1,490 @@ | |||
| import os | |||
There was a problem hiding this comment.
No test covers lc: soaking state - the detection spec says soaking faults must also be caught but all fixtures only use raised.
Detection logic:
Find the fault using below query
'faultInst.json?query-target-filter=or(eq(faultInst.code,"F4501"),eq(faultInst.code,"F4502"),eq(faultInst.code,"F4503"),eq(faultInst.code,"F3081"),eq(faultInst.code,"F3082"),eq(faultInst.code,"F4617"),eq(faultInst.code,"F4752"),eq(faultInst.code,"F4753"))'
if one fault F4501, F3081, F4617, F4752 found and state is “raised” or “soaking”
Result = Manual & recommended_action ="Renew the certificate(s) before it expires to avoid service disruption."
if one fault F4502, F4503, F3082, F4753 and state is “raised” or “soaking”
Result = FAIL_O & recommended_action="Renew the certificate(s) immediately to restore functionality."
if faults found as combination (e.g. expiring F3081 & expired F4502 ) means
Result = FAIL_O & recommended_action="Renew expired certificate(s) immediately. For certificate(s) approaching expiry, renew before they expire to avoid service disruption."
Faults Short Description Introduced First build
F3081, F3082 SAML encryption cert expiring/expired 2018-02-22 3.1(2f)
F4501, F4502 KeyRing cert expiring/expired 2023-09-13 6.0(4c)
F4503, F4617 TP cert expired/expiring 2024-04-22 6.1(1e)
F4752,F4753 Factory cert expiring/expired 6.1(5e)
For Factory certificate status if cversion < 6.1(5e), check via cli command "acidiag verifyapic"
Fixes #408