Skip to content

Conversation

@jtamagnan
Copy link

@jtamagnan jtamagnan commented Oct 13, 2025

What changed?

User provided connection attributes take precedent over ones set automatically the code.

Why?

This fixes #8436 by allowing users to set sslmode through connectAttributes.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

Users may override values that they didn't intend to, where the server would fail to start up before.

@jtamagnan jtamagnan requested review from a team as code owners October 13, 2025 19:13
@CLAassistant
Copy link

CLAassistant commented Oct 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Instead of what you've done here, let's change the if in line 96 to first check parameters.Get(sslMode) and avoid setting the mode if a user provided a specific mode.

@jtamagnan
Copy link
Author

Thanks for the review! Really excited to get this PR in.

Thanks for the contribution. Instead of what you've done here, let's change the if in line 96 to first check parameters.Get(sslMode) and avoid setting the mode if a user provided a specific mode.

I'm sorry. I'm a bit confused by this. On line 96 parameters.Get(sslMode) should always be "" since we haven't set it yet. Do you mean checking cfg.ConnectAttributes[sslMode]?

@bergundy
Copy link
Member

bergundy commented Nov 7, 2025

Thanks for the review! Really excited to get this PR in.

Thanks for the contribution. Instead of what you've done here, let's change the if in line 96 to first check parameters.Get(sslMode) and avoid setting the mode if a user provided a specific mode.

I'm sorry. I'm a bit confused by this. On line 96 parameters.Get(sslMode) should always be "" since we haven't set it yet. Do you mean checking cfg.ConnectAttributes[sslMode]?

Yes, that's what I meant. Sorry for the confusion.

@bergundy bergundy force-pushed the allow-sslmode-in-connectAttributes branch from 4af8ccb to 2a8ca00 Compare November 25, 2025 23:34
@bergundy bergundy changed the title Only set sslmode:disable if not set in connectAttributes Allow overriding postgres all connection attributes Nov 25, 2025
@bergundy bergundy changed the title Allow overriding postgres all connection attributes Allow overriding all postgres connection attributes Nov 25, 2025
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.

Temporal does not support setting postgresql sslmode=verify-ca

3 participants