Repository navigation
mgr/dashboard : Update create/edit service modal to support certmg - #67276
Conversation
40dd079 to
a2e7d4b
Compare
5cf4dec to
1aa8164
Compare
|
PR is dependent on #67308 |
1aa8164 to
84c13b8
Compare
|
Fixed TCs |
84c13b8 to
aa3c031
Compare
aa3c031 to
161dc84
Compare
|
Removed unnecessary css in last amended commit |
|
jenkins test make check |
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive certificate management functionality to the Ceph dashboard's service creation and editing modal. It enables users to choose between cephadm-managed (internal) certificates and user-provided (external) certificates, with automatic certificate renewal for cephadm CA certificates. The PR also adds SSL support for NFS services.
Changes:
- Backend certificate lookup now supports both service-name-based and service-type-based certificate naming patterns for cephadm-signed certificates
- Frontend adds UI for selecting certificate authority type (internal vs external) with certificate status display
- NFS service now supports SSL configuration with CA certificate upload
- Icon component now supports dynamic icon updates via OnChanges lifecycle hook
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/pybind/mgr/dashboard/services/certificate.py |
Enhanced certificate lookup to check both service-name and service-type based cephadm certificates |
src/pybind/mgr/dashboard/controllers/certificate.py |
Updated certificate endpoint to pass service name for improved certificate matching |
src/pybind/mgr/dashboard/frontend/src/app/shared/models/service.interface.ts |
Added certificate status icon mapping and certificate_source field to service spec |
src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.ts |
Implemented OnChanges to support dynamic icon updates |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts |
Added router subscription to reload table on navigation and OnDestroy cleanup |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html |
Enhanced certificate status template with icon display |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts |
Major update adding certificate type selection, validation, and SSL config helper method |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html |
Added certificate management UI with internal/external selection and file upload |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-cert-details/* |
Updated certificate details to use shared icon mapping and support edit button filtering |
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts |
Added RadioModule import for certificate type selection |
| Test files | Updated tests to expect certificate_source field in service specs |
| { | ||
| service_type: 'oauth2-proxy', | ||
| unmanaged: false, | ||
| ssl: true | ||
| ssl: true, | ||
| certificateType: 'external' | ||
| }, | ||
| [Validators.required, CdValidators.sslPrivKey()] | ||
| ), |
There was a problem hiding this comment.
The validator prerequisites for mgmt-gateway key field are checking for ssl: false, but mgmt-gateway always sets ssl to true (see line 1149). This means the validator will never trigger for mgmt-gateway services.
The condition should check for ssl: true instead of ssl: false to properly validate private key input for mgmt-gateway services when external certificates are used.
161dc84 to
a064c5f
Compare
nizamial09
left a comment
There was a problem hiding this comment.
some minor comments.. you can chose to update it now or later..
| <div class="form-item"> | ||
| <label class="cds--label fw-bold" | ||
| i18n>Current Certificate</label> | ||
| <div class="row"> | ||
| <div class="col-6"> | ||
| <label class="cds--label" | ||
| i18n>Certificate</label> | ||
| <div>{{ currentCertificate.cert_name }}</div> | ||
| </div> | ||
| <div class="col-6"> | ||
| <label class="cds--label" | ||
| i18n>Valid Until</label> | ||
| <div>{{ currentCertificate.expiry_date | cdDate }} • {{ currentCertificate.days_to_expiration }} <span i18n>days left</span></div> | ||
| </div> | ||
| </div> | ||
| <div class="row mt-3"> | ||
| <div class="col-6"> | ||
| <label class="cds--label" | ||
| i18n>Status</label> | ||
| <div class="align-items-center"> | ||
| <cd-icon [type]="statusIconMap[currentCertificate.status] || statusIconMap['default']"></cd-icon> | ||
| @switch (currentCertificate.status) { | ||
| @case ('valid') { <span i18n>Valid</span> } | ||
| @case ('expiring') { <span i18n>Expiring soon</span> } | ||
| @case ('expired') { <span i18n>Expired</span> } | ||
| @case ('not_configured') { <span i18n>Not configured</span> } | ||
| @case ('invalid') { <span i18n>Invalid</span> } | ||
| @default { {{ currentCertificate.status }} } | ||
| } | ||
| </div> | ||
| </div> | ||
| <div class="col-6"> | ||
| <label class="cds--label" | ||
| i18n>Issuer</label> | ||
| <div> | ||
| @if (currentCertificate.signed_by === 'cephadm') { | ||
| <span i18n>Internal (Cephadm CA)</span> | ||
| } @else { | ||
| {{ currentCertificate.issuer || 'External' }} | ||
| } | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
we show something similar in the certificate details page, why not reuse that?
There was a problem hiding this comment.
Yes we can do it, but some of the UI designs are different and the field description was also differrent, Hence didn't make it generic
There was a problem hiding this comment.
okay, if its minor differences there should be a generic component with customizable fields to change description or whatever is different. But let's do it separately. can you create a cleanup tracker to do whatever cleanups needed for the feature and track them?
|
jenkins test make check |
a064c5f to
f16ef7a
Compare
|
unrelated make check failure |
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
@abhidesai6 I think you would need a rebase of this PR on top of main, to pass the make check. |



PS :
Description
UTC :
Screencast.From.2026-02-17.19-15-01.mp4
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.