Merge pull request #192 from coreos-inc/sqlssl

Allow SSL cert for the database to be configured
This commit is contained in:
Jimmy Zelinskie 2015-06-29 13:33:31 -04:00
commit 756d6784ca
8 changed files with 45 additions and 12 deletions

View file

@ -20,7 +20,7 @@ from app import app, CONFIG_PROVIDER, get_app_url, OVERRIDE_CONFIG_DIRECTORY
logger = logging.getLogger(__name__)
SSL_FILENAMES = ['ssl.cert', 'ssl.key']
SSL_FILENAMES = ['ssl.cert', 'ssl.key', 'database.pem']
JWT_FILENAMES = ['jwt-authn.cert']
CONFIG_FILENAMES = SSL_FILENAMES + JWT_FILENAMES
@ -54,7 +54,7 @@ def validate_service_for_config(service, config, password=None):
def _validate_database(config, _):
""" Validates connecting to the database. """
try:
validate_database_url(config['DB_URI'])
validate_database_url(config['DB_URI'], config.get('DB_CONNECTION_ARGS', {}))
except peewee.OperationalError as ex:
if ex.args and len(ex.args) > 1:
raise Exception(ex.args[1])