Skip to content

mgr/dashboard : Update create/edit service modal to support certmg - #67276

Merged
nizamial09 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:74636-service-modal-with-certmgr
Mar 2, 2026
Merged

nizamial09 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:74636-service-modal-with-certmgr

Conversation

@abhidesai6

@abhidesai6 abhidesai6 commented Feb 9, 2026 •

Copy link
Copy Markdown

PS :

Add support for certificate mgmt in service edit/create modal

Description

User can create a service with cephadm/user-provided CA certs. 
User can edit the CA after creation. 
Cephadm CA certs are renewed automatically. 
Added support to  enable SSL for NFS from Dashboard 

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from 40dd079 to a2e7d4b Compare February 16, 2026 12:37
@abhidesai6
abhidesai6 marked this pull request as ready for review February 16, 2026 12:37
@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch 2 times, most recently from 5cf4dec to 1aa8164 Compare February 17, 2026 13:31
@abhidesai6

Copy link
Copy Markdown
Author

PR is dependent on #67308
Though we can merge the PR early as GUI would not break

@abhidesai6 abhidesai6 moved this from New to In progress in Ceph-Dashboard Feb 18, 2026
@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from 1aa8164 to 84c13b8 Compare February 18, 2026 15:01
@abhidesai6

Copy link
Copy Markdown
Author

Fixed TCs

@abhidesai6 abhidesai6 changed the title mgr/dashboard : Update create/edit service modal to support certmgr mgr/dashboard : Update create/edit service modal to support certmg Feb 18, 2026
@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from 84c13b8 to aa3c031 Compare February 18, 2026 18:07
@cloudbehl
cloudbehl requested review from Pegonzal and nizamial09 and removed request for Pegonzal February 23, 2026 07:19
@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from aa3c031 to 161dc84 Compare February 23, 2026 08:30
@abhidesai6

Copy link
Copy Markdown
Author

Removed unnecessary css in last amended commit

@abhidesai6

Copy link
Copy Markdown
Author

jenkins test make check

@nizamial09

Copy link
Copy Markdown
Member

I disabled the SSL after enabling it but it still showed me the SSL certificate information and status although the server is now non-ssl. Is there any cleanup to delete the certificates once we disable the ssl from cephadm which we can leverage here?

image

also if I create a manual certificate later and apply again, the internal certificate status still shows even though the external certificate is configured.

Screenshot From 2026-02-24 13-53-09

but that goes away if I redeploy the rgw service, but the table still shows the wrong certificate date (internal one) while the inside contents shows the correct date of the external cert

image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines 480 to 487
{
service_type: 'oauth2-proxy',
unmanaged: false,
ssl: true
ssl: true,
certificateType: 'external'
},
[Validators.required, CdValidators.sslPrivKey()]
),

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from 161dc84 to a064c5f Compare February 24, 2026 11:46

@nizamial09 nizamial09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments.. you can chose to update it now or later..

Comment on lines +1140 to +1181
<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>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we show something similar in the certificate details page, why not reuse that?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@github-project-automation github-project-automation Bot moved this from In progress to Reviewer approved in Ceph-Dashboard Feb 24, 2026
@cloudbehl

Copy link
Copy Markdown
Contributor

jenkins test make check

@abhidesai6
abhidesai6 force-pushed the 74636-service-modal-with-certmgr branch from a064c5f to f16ef7a Compare February 25, 2026 18:12
@nizamial09

Copy link
Copy Markdown
Member

unrelated make check failure


The following tests FAILED:
	268 - unittest_rbd_mirror (SEGFAULT)

@nizamial09

Copy link
Copy Markdown
Member

jenkins test make check

1 similar comment
@abhidesai6

Copy link
Copy Markdown
Author

jenkins test make check

@cloudbehl

Copy link
Copy Markdown
Contributor

@abhidesai6 I think you would need a rebase of this PR on top of main, to pass the make check.

@nizamial09
nizamial09 merged commit ae5c7ae into ceph:main Mar 2, 2026
6 checks passed
@nizamial09
nizamial09 deleted the 74636-service-modal-with-certmgr branch March 2, 2026 04:34
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants