fix(react): add .cer and .crt certificate extension support to SAMLP provider - #435
fix(react): add .cer and .crt certificate extension support to SAMLP provider#435rax7389 wants to merge 6 commits into
Conversation
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughChangesCertificate extension centralization
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/react/src/lib/constants/my-organization/idp-management/idp-management-constants.ts (1)
7-7: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid the unnecessary type assertion.
Line 7 uses
as const, but the repository guidelines prohibit type assertions when alternatives exist. UseObject.freeze(...)or an explicit readonly type instead. As per coding guidelines, avoid type assertions (as) unless there is no other option.Proposed fix
-export const ALLOWED_CERT_EXTENSIONS = ['.pem', '.cer', '.crt'] as const; +export const ALLOWED_CERT_EXTENSIONS = Object.freeze(['.pem', '.cer', '.crt']);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/react/src/lib/constants/my-organization/idp-management/idp-management-constants.ts` at line 7, Update the ALLOWED_CERT_EXTENSIONS constant to remove the unnecessary as const assertion, using Object.freeze or an explicit readonly type while preserving the existing immutable tuple values.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@packages/react/src/lib/constants/my-organization/idp-management/idp-management-constants.ts`:
- Line 7: Update the ALLOWED_CERT_EXTENSIONS constant to remove the unnecessary
as const assertion, using Object.freeze or an explicit readonly type while
preserving the existing immutable tuple values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: efe42b5e-4031-4cea-9f11-bf32744f8368
📒 Files selected for processing (3)
packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-create/provider-configure/ping-federate-sso-configure-form.tsxpackages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-create/provider-configure/samlp-sso-configure-form.tsxpackages/react/src/lib/constants/my-organization/idp-management/idp-management-constants.ts
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #435 +/- ##
==========================================
- Coverage 90.86% 90.83% -0.03%
==========================================
Files 239 240 +1
Lines 17620 17653 +33
Branches 2467 1991 -476
==========================================
+ Hits 16010 16035 +25
- Misses 1610 1618 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Add support for
.cerand.crtcertificate file extensions to the SAMLP SSO provider configuration form, aligning it with PingFederate provider and the API specification.Why
The SAMLP provider form only accepted
.pemfiles for signing certificates, while:.pem,.cer, and.crtfiles.cerfilesThis inconsistency caused confusion and required users to manually rename their certificate files.
What
ALLOWED_CERT_EXTENSIONSconstant (['.pem', '.cer', '.crt']) in a new constants file.pemPackages
packages/corepackages/reactexamplesReferences
.cerand.crtare functionally equivalent certificate extensions (naming convention differs between Windows/Linux)Testing
Checklist
Contributing
Summary by CodeRabbit
.pem,.cer, and.crtfile types across SSO configuration forms.