Skip to content

Saimon/pim 9561 external database - #380

Open
saimonation wants to merge 6 commits into
masterfrom
saimon/PIM-9561-external-database
Open

saimonation wants to merge 6 commits into
masterfrom
saimon/PIM-9561-external-database

Conversation

@saimonation

@saimonation saimonation commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Changes portal bootstrap/setup wiring and sends database credentials and TLS material to the server, though behavior stays backward-compatible when no remote DB is specified.

Overview
Adds optional external database configuration when initializing a CTERA Portal master or application server, while keeping embedded as the default when database is omitted.

Introduces RemoteDatabase (with credentials and certificate helpers) and SSLMode in cterasdk.core.types, and threads the config through Setup.init_master, Setup.init_application_server, and _init_server_params so setup XML sets databaseMode and externalDatabaseConfig. Setup logging now records the chosen database mode.

User docs and the 2.20.52 changelog document the new flows; unit tests expect databaseMode: embedded for the existing paths.

Reviewed by Cursor Bugbot for commit 8fc8aa7. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit c0f8207. Configure here.

Comment thread cterasdk/core/types.py
return RemoteDatabase(host, port, name, 'Cert', ssl_mode,
X509Certificate.load_certificate(ssl_ca_cert) if ssl_ca_cert else None,
auth_cert=X509Certificate.load_certificate(auth_cert),
auth_key=PrivateKey.load_private_key(auth_key))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Certificates omitted from setup payload

High Severity

RemoteDatabase.credentials and RemoteDatabase.certificate store X509Certificate and PrivateKey objects on sslCaCert, authCert, and authKey. The XML serializer only emits primitives and Object instances, so those fields are dropped from the setup request. Certificate authentication and custom CA verification never reach the Portal.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c0f8207. Configure here.

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