Skip to content

[Studio] feat: add SslSettings page for SSL/TLS configuration management#477

Open
zhaohai666 wants to merge 2 commits into
apache:rocketmq-studiofrom
zhaohai666:feature/studio-ssl-settings-page
Open

[Studio] feat: add SslSettings page for SSL/TLS configuration management#477
zhaohai666 wants to merge 2 commits into
apache:rocketmq-studiofrom
zhaohai666:feature/studio-ssl-settings-page

Conversation

@zhaohai666

Copy link
Copy Markdown

Summary

Add an SSL/TLS configuration management page with route /studio/ssl-settings. It supports SSL toggle, TLS protocol version selection, KeyStore & TrustStore configuration, client authentication mode setup and certificate file upload.

File Changes

File Change Type Description
web/src/pages/studio/SslSettings.tsx New SSL/TLS config page component (327 lines), including toggle switch, configuration forms, certificate uploader and certificate info display panel
web/src/pages/studio/tests/SslSettings.test.tsx New 6 component test cases covering page title, hints, switch control, disabled/enabled state and KeyStore form fields
web/src/App.tsx Modified Import SslSettingsPage and register /studio/ssl-settings route entry

Feature Details

SSL Toggle Switch

  • Ant Design Switch to enable or disable SSL, with CheckCircle/XCircle status icons
  • Only the switch and prompt text are visible when SSL is disabled; full config form expands after enabling SSL

TLS Protocol Configuration

  • Supported TLS versions: TLS 1.3, TLS 1.2, TLS 1.1 (Deprecated), TLS 1.0 (Deprecated)
  • Client authentication modes: none / want / need

KeyStore Configuration

  • KeyStore type selector: JKS / PKCS12
  • Input field for KeyStore file path
  • Password input component for KeyStore secret
  • File uploader supporting .pem, .crt, .jks, .p12 certificate files

TrustStore Configuration (Conditional Render)

TrustStore panel only appears when client authentication mode is not none:

  • TrustStore type, file path, password input and file upload function

Certificate Info Card (Conditional Render)

Displayed only if SSL is enabled and valid certificate exists:

  • Descriptions panel showing certificate issuer, expiration date, protocol version and status

Upload File Validation

Reject file formats other than .pem/.crt/.jks/.p12 and show error feedback for invalid uploads.

Test Coverage (6 test cases total)

  1. Render page title "SSL/TLS Settings" correctly
  2. Render page hint text "SSL/TLS Configuration"
  3. Render switch label "Enable SSL/TLS"
  4. Hide KeyStore form fields under disabled SSL state
  5. Show TLS protocol, client auth and KeyStore sections after enabling SSL
  6. Display KeyStore type, path and password input fields once SSL is turned on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant