Skip to content

feat(rethinkdb): add tls config auth profile #3937

@sicoyle

Description

@sicoyle

Describe the feature

The ReThinkDB component embeds the rethink connection options here at (state/rethinkdb/rethinkdb.go):

type stateConfig struct {
	r.ConnectOpts `mapstructure:",squash"`
	Archive       bool   `json:"archive"`
	Table         string `json:"table"`
}

This currently works fine for the basic auth using the address, username, pwd. However, the issue is that TLSConfig *tls.Config within ConnectOpts is a pointer to tls.Config that kitmd.DecodeMetadata() cannot automatically unmarshal from string metadata. The mapstructure:",squash" tag flattens all r.ConnectOpts fields into the metadata, but TLSConfig expects a *tls.Config object. The RethinkDB component needs to be updated to handle TLS configuration by adding separate caCert, clientCert, and clientKey string fields to stateConfig, then manually converting them to a *tls.Config before setting ConnectOpts.TLSConfig. The metadata.yaml also needs to reflect a new authenticationProfile.

Release Note

RELEASE NOTE:
Add TLSConfig authentication profile to RethinkDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions