Skip to content

Insights: enforce https:// connection URLs#768

Open
ecmel wants to merge 3 commits into
devfrom
ee-fixes
Open

Insights: enforce https:// connection URLs#768
ecmel wants to merge 3 commits into
devfrom
ee-fixes

Conversation

@ecmel

@ecmel ecmel commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Changes introduced by this PR

  • Require https:// for Insights connection URLs — reject protocol-less and http:// URLs with a validation error (add & edit).
  • Follow auth redirects in getAuthPrefix (maxRedirects 0 → 5) instead of misreading a 301 as needing the auth/ prefix.
  • Fix the dialog's address example to https://myinsights.example.com.
  • Downgrade the "No database running" datasource notice from error to warning.
  • Add tests for rejecting http://, protocol-less, and empty URLs.

…ow auth redirects, use example.com in address placeholder, downgrade missing-database datasource notice to warning
@ecmel ecmel self-assigned this Jul 14, 2026
@kx-sonarqube

kx-sonarqube Bot commented Jul 14, 2026

Copy link
Copy Markdown

@ecmel
ecmel marked this pull request as draft July 14, 2026 13:57
@ecmel
ecmel marked this pull request as ready for review July 16, 2026 07:50
@ecmel
ecmel requested a review from bjeffery-kx July 18, 2026 06:45
placeholder="${serverType === ServerType.KDB
? "127.0.0.1 or localhost"
: `myinsights.clouddeploy.com`}"
: `https://myinsights.example.com`}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

After manually testing the connection dialog for a while, there are some changes that could make the field names and descriptions clearer.

For Server Name and Name the server., it's not obvious that this can be any name you like. I can see a user asking "How do I know what my server name is?". It might make more sense if the title were "Connection Name" and the description was "A name to uniquely identify this connection".

And for the description of "Define connection address" the current description for non-Insights connections is Set the IP of your kdb+ database connection, your Insights connection must be deployed for kdb VS Code to access., but there are a few issues with that

  • IP addresses will probably be less common that domain names (as many certificate authorities won't issue certificates for bare IP addresses). Given that IP addresses need to be prefixed with the protocol anyways, it seems simpler to just say URL
  • Insights has many different IP addresses/URLs for the different database microservices, so "kdb+ database connection" is ambiguous here. "Insights Instance" would be clearer
  • It seems odd to say that your Insights connection must be deployed in the connection creation dialog. Was this meant to say "Insights Instance?"

For Insights connections, I'd propose the description "The URL for your Insights instance. This instance must be deployed for the extension to access it."

and for non-Insights connections, I'd propose "The IP or URL of your kdb+ process"

@ecmel ecmel Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@bjeffery-kx This may need another ticket. This is for https://kxl.atlassian.net/browse/KXI-72058 and I need this to be merged in my connection refactoring.

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.

2 participants