Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non-validated SSL on database connections. #54

Merged
merged 2 commits into from
Mar 31, 2017
Merged

Add support for non-validated SSL on database connections. #54

merged 2 commits into from
Mar 31, 2017

Conversation

gregswift
Copy link
Contributor

@gregswift gregswift commented Oct 25, 2016

We are working on various changes to the default katello install, such as splitting the database off to an external host. For that, we use an SSL'ed connection. I'd actually rather have an options of no, yes, verified but am not sure the best way to expose that.

I did not add this to the liquibase since the default local install doesnt use SSL, and it appears there might be an issue with [liquibase connecting to postgresql over SSL|https://liquibase.jira.com/browse/CORE-1281].

I'm open to other validation factories, but this seemed like the easy start.

Need to add testing. sorry.

Copy link
Member

@stbenjam stbenjam left a comment

Choose a reason for hiding this comment

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

Otherwise looks OK

@@ -23,6 +23,10 @@
# from standard port of the :db_type.
# ex. mysql will default to 3306 and postgresql will default to 5432.
#
# $db_ssl:: Boolean indicating if the connection to the database should be over
Copy link
Member

Choose a reason for hiding this comment

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

Please add a validate_bool for this, like $amq_enable on Line 168

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@gregswift
Copy link
Contributor Author

I addressed tso, not good enough yet. I forgot to take mysql into account and so not sure what this would do on a mysql system.

@ehelms
Copy link
Member

ehelms commented Jan 5, 2017

Is there also validated SSL connections as a possible configuration? Should the sslfactory aspect be parameterized or is that the only factory useful for SSL?

@ehelms
Copy link
Member

ehelms commented Jan 5, 2017

@stbenjam Looks like you also need to re-review this since oyu requested changes.

@gregswift
Copy link
Contributor Author

So, i believe that by default it would verify the cert, the factory is only needed to disable the CA verification (so trust non-ca chain signed certs).

Would you want that as $db_ssl_verify ?

@ekohl
Copy link
Member

ekohl commented Jan 10, 2017

I think a boolean would be good.

@ehelms
Copy link
Member

ehelms commented Mar 21, 2017

Looks like this will need a rebase and a few updates

@gregswift
Copy link
Contributor Author

gregswift commented Mar 21, 2017

okay... that should be better...

or not

@gregswift
Copy link
Contributor Author

Okay.. now it should be better. i missed a few things last comment.

@@ -10,6 +10,8 @@
$db_type = $::candlepin::db_type,
$db_host = $::candlepin::db_host,
$db_port = pick($::candlepin::db_port, 5432),
$db_ssl = $::candlepin::db_ssl
Copy link
Member

Choose a reason for hiding this comment

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

You're missing comma here and the line below.

Choose a reason for hiding this comment

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

ah.. so its in the init.pp. should it be in both or just here?

Copy link
Member

Choose a reason for hiding this comment

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

All class parameters are separated by comma's. init.pp isn't special in terms of syntax.

Copy link
Contributor Author

@gregswift gregswift Mar 21, 2017

Choose a reason for hiding this comment

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

that comment was for the validation comment. not sure how it ended up on the comma one.

…d this to the liquibase since the default local install doesnt use SSL, and it appears there might be an issue with liquibase connecting to postgresql over SSL. https://liquibase.jira.com/browse/CORE-1281
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Puppet code looks correct.

@ekohl
Copy link
Member

ekohl commented Mar 28, 2017

@stbenjam could you have a look again?

Copy link
Member

@stbenjam stbenjam left a comment

Choose a reason for hiding this comment

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

Looks good to me

@stbenjam stbenjam merged commit 6dc2fd0 into theforeman:master Mar 31, 2017
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.

None yet

5 participants