Skip to content

pass in the configured DB ca (if any) to the container#345

Open
evgeni wants to merge 7 commits intomasterfrom
ssldb
Open

pass in the configured DB ca (if any) to the container#345
evgeni wants to merge 7 commits intomasterfrom
ssldb

Conversation

@evgeni
Copy link
Member

@evgeni evgeni commented Dec 2, 2025

No description provided.

@ehelms
Copy link
Member

ehelms commented Dec 2, 2025

This looks related to #141 but is not an aspect I have incorporated. I was wanting to get in a version of remote database testing and then harden it with more of the options.

@evgeni
Copy link
Member Author

evgeni commented Dec 2, 2025

It is, @Gauravtalreja1 ran into this when testing ext db stuff

@evgeni evgeni force-pushed the ssldb branch 5 times, most recently from f8a1e26 to 1ba7910 Compare December 2, 2025 17:37
@evgeni evgeni force-pushed the ssldb branch 4 times, most recently from 921e621 to 7355577 Compare December 5, 2025 08:39
containers.podman.podman_secret:
state: present
name: candlepin-db-ca
data: "{{ lookup('ansible.builtin.file', candlepin_database_ssl_ca) if candlepin_database_ssl_ca else 'empty' }}"
Copy link
Member

Choose a reason for hiding this comment

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

This is creating an empty secret if there is no database SSL cert? Why not use a when conditional on the sercret?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because then I need to also conditionally mount it, and that's painful ;)

Copy link
Member

Choose a reason for hiding this comment

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

I get that, I worry about this being a red herring while debugging.

Copy link
Member Author

Choose a reason for hiding this comment

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

what kind of red herring? the file being present?

Copy link
Member

Choose a reason for hiding this comment

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

Correct. The file / secret being present but empty raises the "should it be empty? or is it accidentally empty?"

Copy link
Member Author

Choose a reason for hiding this comment

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

That's why the string is "empty", or should I do "this secret was intentionally left blank"?

@ehelms
Copy link
Member

ehelms commented Feb 18, 2026

What else do you think is needed to take it out of draft?

@evgeni
Copy link
Member Author

evgeni commented Feb 18, 2026

I wanted to write up some tests to validate it.

@evgeni evgeni force-pushed the ssldb branch 2 times, most recently from 46aeafa to 3a61d77 Compare February 19, 2026 08:06
Comment on lines 53 to 58
- certificate_source: default
security: none
database: external
- certificate_source: default
security: none
database: externalssl
Copy link
Member Author

Choose a reason for hiding this comment

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

I personally think that users should never run external db without SSL, but I know that today we document and support that, so I added this as another matrix entry instead of repurposing the external one. But do we really need to test both?

Copy link
Member

Choose a reason for hiding this comment

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

If you are proposing that we test external database only with TLS - I agree.

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, that's what I wanted to say

Choose a reason for hiding this comment

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

Do we intend to drop support for external DB without SSL altogether? If not, we should make sure both cases are covered by tests

Copy link
Member Author

@evgeni evgeni Feb 20, 2026

Choose a reason for hiding this comment

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

I see little chance that non-SSL ext-DB breaks while SSL-enabled continues to work.

and you can still verify that in robotello for formal support, I just don't think it needs to happen here

Copy link
Member

Choose a reason for hiding this comment

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

The internal database scenario should effectively test the non-ssl scenario for us since it's doing the same style connection and handling.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah.

I've now pushed a separate commit, flipping the setup to "only ssl" -- we can still drop it if Gaurav strongly disagrees :)

@evgeni evgeni force-pushed the ssldb branch 7 times, most recently from 481ca09 to d157f1a Compare February 19, 2026 10:55
@evgeni evgeni force-pushed the ssldb branch 2 times, most recently from 8953b69 to a0572e5 Compare February 19, 2026 11:47
@evgeni evgeni marked this pull request as ready for review February 19, 2026 13:26
@evgeni
Copy link
Member Author

evgeni commented Feb 19, 2026

@ehelms look, no draft!

if: matrix.database != 'internal'
run: |
./forge remote-database
./forge remote-database ${{ matrix.database == 'externalssl' && '--database-ssl true' || ''}}

Choose a reason for hiding this comment

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

Does that mean we introducing a new --database-mode here for externalssl scenario?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, this just instructs the forge tool (which we don't ship to users, it's CI/dev only) to deploy a DB with SSL

Copy link
Member Author

Choose a reason for hiding this comment

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

same here, externalssl is gone now

Comment on lines +2 to +3
database_ssl:
type: Boolean

Choose a reason for hiding this comment

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

Do we really need a new variable here? Could we use the existing --database-ssl-ca, given that it would be only defined for the external SSL scenario, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

for forge we don't have --database-ssl-ca as it will generate an own CA for the DB

Copy link
Member Author

Choose a reason for hiding this comment

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

now that we only test ssl on the external db, we could drop this new variable again

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.

3 participants