8000 [Bug]: Go 1.0 metadata MySQL DSN cannot enable TLS or allowPublicKeyRetrieval · Issue #22714 · infiniflow/ragflow · GitHub
[go: up one dir, main page]

Skip to content

[Bug]: Go 1.0 metadata MySQL DSN cannot enable TLS or allowPublicKeyRetrieval #22714

Backlog

Description

@justrightnow

Self Checks

  • I have searched for existing issues, including closed ones.
  • I confirm that I am using English to submit this report.
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

main at acdb757ab (1.0 Go server)

Other environment information

External/managed MySQL 8.x (e.g. cloud managed MySQL) with TLS required.

Actual behavior

The Go 1.0 server builds the metadata database DSN with a fixed set of parameters:

  • internal/dao/database.go:325 — fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=%s&parseTime=True&loc=Local", ...)
  • internal/server/config/database_config.go:31 — MySQLConfig exposes no TLS-related fields.

There is no way to set the go-sql-driver/mysql tls or allowPublicKeyRetrieval DSN parameters for the metadata connection. As a result:

  1. The server cannot connect to managed MySQL offerings that require TLS.
  2. With MySQL 8.x using caching_sha2_password over a plaintext connection, deployments that need allowPublicKeyRetrieval=true to fetch the server RSA public key cannot connect either.

This is distinct from #22151, which is about the Agent ExeSQL/database-connector component; this issue is about the server's own metadata database connection.

This was also raised in the RAGFlow Discord #general channel on 2026-11-20 (blocker when moving to the 1.0 Go stack), and a maintainer responded on 2026-11-23 that community PRs for MySQL TLS support are welcome.

Expected behavior

Optional, backward-compatible settings under the mysql: section of service_conf.yaml (and the corresponding Docker environment variables) to:

  • enable TLS (tls=true, verifying against the system root CAs),
  • skip certificate verification (tls=skip-verify),
  • provide a custom CA certificate,
  • enable allowPublicKeyRetrieval.

When the new settings are not provided, the generated DSN and connection behavior stay unchanged.

Steps to reproduce

  1. Point the mysql: config at an external MySQL 8.x instance that requires TLS (or a caching_sha2_password account over a non-TLS connection).
  2. Start the Go server.
  3. The metadata connection fails; no configuration key exists to pass tls or allowPublicKeyRetrieval.

Additional information

Proposed keys: mysql.tls (true / skip-verify / custom), mysql.tls_ca_file, mysql.allow_public_key_retrieval. Happy to send a PR with Go unit tests covering DSN construction.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0