2016-05-23 20:00:48 +00:00
|
|
|
from uuid import uuid4
|
|
|
|
|
2014-03-05 19:35:11 +00:00
|
|
|
import os.path
|
2016-03-23 22:16:03 +00:00
|
|
|
import requests
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2017-02-01 23:17:25 +00:00
|
|
|
from _init import ROOT_DIR, CONF_DIR
|
|
|
|
|
2013-10-01 03:54:12 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
def build_requests_session():
|
|
|
|
sess = requests.Session()
|
|
|
|
adapter = requests.adapters.HTTPAdapter(pool_connections=100,
|
|
|
|
pool_maxsize=100)
|
|
|
|
sess.mount('http://', adapter)
|
|
|
|
sess.mount('https://', adapter)
|
|
|
|
return sess
|
2014-02-18 23:09:14 +00:00
|
|
|
|
2014-01-27 22:46:21 +00:00
|
|
|
|
2014-04-08 23:14:24 +00:00
|
|
|
# The set of configuration key names that will be accessible in the client. Since these
|
2014-11-05 21:43:37 +00:00
|
|
|
# values are sent to the frontend, DO NOT PLACE ANY SECRETS OR KEYS in this list.
|
|
|
|
CLIENT_WHITELIST = ['SERVER_HOSTNAME', 'PREFERRED_URL_SCHEME', 'MIXPANEL_KEY',
|
|
|
|
'STRIPE_PUBLISHABLE_KEY', 'ENTERPRISE_LOGO_URL', 'SENTRY_PUBLIC_DSN',
|
|
|
|
'AUTHENTICATION_TYPE', 'REGISTRY_TITLE', 'REGISTRY_TITLE_SHORT',
|
2015-08-05 18:34:11 +00:00
|
|
|
'CONTACT_INFO', 'AVATAR_KIND', 'LOCAL_OAUTH_HANDLER', 'DOCUMENTATION_LOCATION',
|
2016-11-29 23:19:06 +00:00
|
|
|
'DOCUMENTATION_METADATA', 'SETUP_COMPLETE', 'DEBUG', 'MARKETO_MUNCHKIN_ID',
|
2017-04-05 18:01:55 +00:00
|
|
|
'STATIC_SITE_BUCKET', 'RECAPTCHA_SITE_KEY', 'CHANNEL_COLORS',
|
2017-06-08 17:13:22 +00:00
|
|
|
'TAG_EXPIRATION_OPTIONS', 'INTERNAL_OIDC_SERVICE_ID']
|
2014-04-08 23:14:24 +00:00
|
|
|
|
|
|
|
|
2015-08-03 20:56:32 +00:00
|
|
|
def frontend_visible_config(config_dict):
|
2014-04-08 23:14:24 +00:00
|
|
|
visible_dict = {}
|
|
|
|
for name in CLIENT_WHITELIST:
|
|
|
|
if name.lower().find('secret') >= 0:
|
|
|
|
raise Exception('Cannot whitelist secrets: %s' % name)
|
|
|
|
|
|
|
|
if name in config_dict:
|
|
|
|
visible_dict[name] = config_dict.get(name, None)
|
|
|
|
|
|
|
|
return visible_dict
|
|
|
|
|
2013-09-28 00:03:07 +00:00
|
|
|
|
2017-04-14 15:18:01 +00:00
|
|
|
# Configuration that should not be changed by end users
|
|
|
|
class ImmutableConfig(object):
|
|
|
|
|
|
|
|
# Requests based HTTP client with a large request pool
|
|
|
|
HTTPCLIENT = build_requests_session()
|
|
|
|
|
|
|
|
# Status tag config
|
|
|
|
STATUS_TAGS = {}
|
|
|
|
for tag_name in ['building', 'failed', 'none', 'ready', 'cancelled']:
|
2017-02-01 23:17:25 +00:00
|
|
|
tag_path = os.path.join(ROOT_DIR, 'buildstatus', tag_name + '.svg')
|
2017-04-14 15:18:01 +00:00
|
|
|
with open(tag_path) as tag_svg:
|
|
|
|
STATUS_TAGS[tag_name] = tag_svg.read()
|
|
|
|
|
|
|
|
# Reverse DNS prefixes that are reserved for internal use on labels and should not be allowable
|
|
|
|
# to be set via the API.
|
|
|
|
DEFAULT_LABEL_KEY_RESERVED_PREFIXES = ['com.docker.', 'io.docker.', 'org.dockerproject.',
|
|
|
|
'org.opencontainers.', 'io.cncf.',
|
|
|
|
'io.kubernetes.', 'io.k8s.',
|
|
|
|
'io.quay', 'com.coreos', 'com.tectonic',
|
|
|
|
'internal', 'quay']
|
|
|
|
|
|
|
|
# Colors for local avatars.
|
|
|
|
AVATAR_COLORS = ['#969696', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728',
|
|
|
|
'#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2',
|
|
|
|
'#7f7f7f', '#c7c7c7', '#bcbd22', '#1f77b4', '#17becf', '#9edae5', '#393b79',
|
|
|
|
'#5254a3', '#6b6ecf', '#9c9ede', '#9ecae1', '#31a354', '#b5cf6b', '#a1d99b',
|
|
|
|
'#8c6d31', '#ad494a', '#e7ba52', '#a55194']
|
|
|
|
|
|
|
|
# Colors for channels.
|
|
|
|
CHANNEL_COLORS = ['#969696', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728',
|
|
|
|
'#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2',
|
|
|
|
'#7f7f7f', '#c7c7c7', '#bcbd22', '#1f77b4', '#17becf', '#9edae5', '#393b79',
|
|
|
|
'#5254a3', '#6b6ecf', '#9c9ede', '#9ecae1', '#31a354', '#b5cf6b', '#a1d99b',
|
|
|
|
'#8c6d31', '#ad494a', '#e7ba52', '#a55194']
|
|
|
|
|
|
|
|
PROPAGATE_EXCEPTIONS = True
|
|
|
|
|
|
|
|
|
|
|
|
class DefaultConfig(ImmutableConfig):
|
2014-04-03 21:31:46 +00:00
|
|
|
# Flask config
|
|
|
|
JSONIFY_PRETTYPRINT_REGULAR = False
|
|
|
|
SESSION_COOKIE_SECURE = False
|
2014-02-16 23:59:24 +00:00
|
|
|
|
2014-05-01 23:44:28 +00:00
|
|
|
LOGGING_LEVEL = 'DEBUG'
|
2014-04-03 21:31:46 +00:00
|
|
|
SEND_FILE_MAX_AGE_DEFAULT = 0
|
|
|
|
PREFERRED_URL_SCHEME = 'http'
|
2014-04-11 15:17:45 +00:00
|
|
|
SERVER_HOSTNAME = 'localhost:5000'
|
2014-02-16 23:59:24 +00:00
|
|
|
|
2015-11-02 19:16:04 +00:00
|
|
|
REGISTRY_TITLE = 'Quay Enterprise'
|
|
|
|
REGISTRY_TITLE_SHORT = 'Quay Enterprise'
|
2015-01-04 19:38:41 +00:00
|
|
|
|
2014-10-22 18:49:33 +00:00
|
|
|
CONTACT_INFO = [
|
2014-11-24 21:07:38 +00:00
|
|
|
'mailto:support@quay.io',
|
2015-11-11 20:42:36 +00:00
|
|
|
'irc://chat.freenode.net:6665/quay',
|
2014-11-24 21:07:38 +00:00
|
|
|
'tel:+1-888-930-3475',
|
2014-10-22 18:49:33 +00:00
|
|
|
'https://twitter.com/quayio',
|
|
|
|
]
|
2014-08-08 17:50:04 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Mail config
|
|
|
|
MAIL_SERVER = ''
|
|
|
|
MAIL_USE_TLS = True
|
|
|
|
MAIL_PORT = 587
|
2014-11-21 17:32:30 +00:00
|
|
|
MAIL_USERNAME = None
|
|
|
|
MAIL_PASSWORD = None
|
2014-10-10 17:14:33 +00:00
|
|
|
MAIL_DEFAULT_SENDER = 'support@quay.io'
|
2014-04-03 21:31:46 +00:00
|
|
|
MAIL_FAIL_SILENTLY = False
|
|
|
|
TESTING = True
|
2014-02-16 23:59:24 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# DB config
|
2014-04-09 23:11:33 +00:00
|
|
|
DB_URI = 'sqlite:///test/data/test.db'
|
2013-09-30 23:10:27 +00:00
|
|
|
DB_CONNECTION_ARGS = {
|
2014-03-06 19:47:02 +00:00
|
|
|
'threadlocals': True,
|
|
|
|
'autorollback': True,
|
2013-09-30 23:10:27 +00:00
|
|
|
}
|
|
|
|
|
2014-02-16 23:59:24 +00:00
|
|
|
@staticmethod
|
|
|
|
def create_transaction(db):
|
2014-04-03 21:31:46 +00:00
|
|
|
return db.transaction()
|
2014-02-16 23:59:24 +00:00
|
|
|
|
|
|
|
DB_TRANSACTION_FACTORY = create_transaction
|
|
|
|
|
2016-09-22 22:28:57 +00:00
|
|
|
# If set to true, TLS is used, but is terminated by an external service (such as a load balancer).
|
|
|
|
# Note that PREFERRED_URL_SCHEME must be `https` when this flag is set or it can lead to undefined
|
|
|
|
# behavior.
|
|
|
|
EXTERNAL_TLS_TERMINATION = False
|
|
|
|
|
2014-05-09 22:49:33 +00:00
|
|
|
# If true, CDN URLs will be used for our external dependencies, rather than the local
|
|
|
|
# copies.
|
2017-04-03 18:31:28 +00:00
|
|
|
USE_CDN = False
|
2014-05-09 22:49:33 +00:00
|
|
|
|
2014-05-09 21:39:43 +00:00
|
|
|
# Authentication
|
|
|
|
AUTHENTICATION_TYPE = 'Database'
|
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Build logs
|
2014-10-14 18:37:02 +00:00
|
|
|
BUILDLOGS_REDIS = {'host': 'localhost'}
|
2014-05-30 18:25:29 +00:00
|
|
|
BUILDLOGS_OPTIONS = []
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Real-time user events
|
2014-10-14 18:37:02 +00:00
|
|
|
USER_EVENTS_REDIS = {'host': 'localhost'}
|
2014-02-07 01:58:26 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Stripe config
|
2014-04-10 19:20:16 +00:00
|
|
|
BILLING_TYPE = 'FakeStripe'
|
2014-02-07 01:58:26 +00:00
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Analytics
|
2014-05-21 23:50:37 +00:00
|
|
|
ANALYTICS_TYPE = 'FakeAnalytics'
|
|
|
|
|
|
|
|
# Build Queue Metrics
|
|
|
|
QUEUE_METRICS_TYPE = 'Null'
|
2016-12-05 23:10:04 +00:00
|
|
|
QUEUE_WORKER_METRICS_REFRESH_SECONDS = 300
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-04-28 22:59:22 +00:00
|
|
|
# Exception logging
|
|
|
|
EXCEPTION_LOG_TYPE = 'FakeSentry'
|
|
|
|
SENTRY_DSN = None
|
|
|
|
SENTRY_PUBLIC_DSN = None
|
|
|
|
|
2014-04-03 21:31:46 +00:00
|
|
|
# Github Config
|
2014-11-05 21:43:37 +00:00
|
|
|
GITHUB_LOGIN_CONFIG = None
|
|
|
|
GITHUB_TRIGGER_CONFIG = None
|
2014-04-08 23:14:24 +00:00
|
|
|
|
2014-08-11 19:47:44 +00:00
|
|
|
# Google Config.
|
2014-11-05 21:43:37 +00:00
|
|
|
GOOGLE_LOGIN_CONFIG = None
|
2014-08-11 19:47:44 +00:00
|
|
|
|
2015-04-24 19:13:08 +00:00
|
|
|
# Bitbucket Config.
|
|
|
|
BITBUCKET_TRIGGER_CONFIG = None
|
|
|
|
|
2015-12-21 18:34:27 +00:00
|
|
|
# Gitlab Config.
|
|
|
|
GITLAB_TRIGGER_CONFIG = None
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
NOTIFICATION_QUEUE_NAME = 'notification'
|
2014-04-11 23:23:57 +00:00
|
|
|
DOCKERFILE_BUILD_QUEUE_NAME = 'dockerfilebuild'
|
2015-06-28 10:29:22 +00:00
|
|
|
REPLICATION_QUEUE_NAME = 'imagestoragereplication'
|
2016-02-25 20:58:42 +00:00
|
|
|
SECSCAN_NOTIFICATION_QUEUE_NAME = 'security_notification'
|
2016-11-10 18:54:04 +00:00
|
|
|
CHUNK_CLEANUP_QUEUE_NAME = 'chunk_cleanup'
|
2014-03-05 19:35:11 +00:00
|
|
|
|
2014-04-10 19:51:39 +00:00
|
|
|
# Super user config. Note: This MUST BE an empty list for the default config.
|
|
|
|
SUPER_USERS = []
|
2014-04-10 04:26:55 +00:00
|
|
|
|
2016-10-10 17:00:59 +00:00
|
|
|
# Feature Flag: Whether sessions are permanent.
|
|
|
|
FEATURE_PERMANENT_SESSIONS = True
|
|
|
|
|
2015-01-04 19:38:41 +00:00
|
|
|
# Feature Flag: Whether super users are supported.
|
|
|
|
FEATURE_SUPER_USERS = True
|
|
|
|
|
2015-05-19 21:52:44 +00:00
|
|
|
# Feature Flag: Whether to allow anonymous users to browse and pull public repositories.
|
|
|
|
FEATURE_ANONYMOUS_ACCESS = True
|
|
|
|
|
2014-04-05 03:26:10 +00:00
|
|
|
# Feature Flag: Whether billing is required.
|
2014-05-30 18:25:29 +00:00
|
|
|
FEATURE_BILLING = False
|
2014-04-03 22:47:17 +00:00
|
|
|
|
2014-04-05 03:26:10 +00:00
|
|
|
# Feature Flag: Whether user accounts automatically have usage log access.
|
2014-04-07 20:59:22 +00:00
|
|
|
FEATURE_USER_LOG_ACCESS = False
|
2014-04-05 03:26:10 +00:00
|
|
|
|
|
|
|
# Feature Flag: Whether GitHub login is supported.
|
2014-04-17 02:51:56 +00:00
|
|
|
FEATURE_GITHUB_LOGIN = False
|
2014-04-09 03:05:45 +00:00
|
|
|
|
2014-08-11 19:47:44 +00:00
|
|
|
# Feature Flag: Whether Google login is supported.
|
|
|
|
FEATURE_GOOGLE_LOGIN = False
|
|
|
|
|
2017-02-13 19:14:44 +00:00
|
|
|
# Feature Flag: Whether Dex login is supported.
|
2015-09-04 20:14:46 +00:00
|
|
|
FEATURE_DEX_LOGIN = False
|
|
|
|
|
2017-02-16 21:30:31 +00:00
|
|
|
# Feature Flag: whether to enable support chat
|
2016-08-08 22:18:35 +00:00
|
|
|
FEATURE_SUPPORT_CHAT = False
|
2014-04-10 04:26:55 +00:00
|
|
|
|
2014-05-30 22:28:18 +00:00
|
|
|
# Feature Flag: Whether to support GitHub build triggers.
|
|
|
|
FEATURE_GITHUB_BUILD = False
|
2014-06-17 20:03:43 +00:00
|
|
|
|
2015-04-24 19:13:08 +00:00
|
|
|
# Feature Flag: Whether to support Bitbucket build triggers.
|
|
|
|
FEATURE_BITBUCKET_BUILD = False
|
|
|
|
|
2015-05-05 02:04:27 +00:00
|
|
|
# Feature Flag: Whether to support GitLab build triggers.
|
|
|
|
FEATURE_GITLAB_BUILD = False
|
|
|
|
|
2014-08-22 22:03:22 +00:00
|
|
|
# Feature Flag: Dockerfile build support.
|
|
|
|
FEATURE_BUILD_SUPPORT = True
|
|
|
|
|
2014-09-22 23:11:48 +00:00
|
|
|
# Feature Flag: Whether emails are enabled.
|
|
|
|
FEATURE_MAILING = True
|
|
|
|
|
2014-10-02 18:49:18 +00:00
|
|
|
# Feature Flag: Whether users can be created (by non-super users).
|
|
|
|
FEATURE_USER_CREATION = True
|
|
|
|
|
2017-09-14 19:34:41 +00:00
|
|
|
# Feature Flag: Whether users being created must be invited by another user. If FEATURE_USER_CREATION is off,
|
|
|
|
# this flag has no effect.
|
|
|
|
FEATURE_INVITE_ONLY_USER_CREATION = False
|
|
|
|
|
2014-11-20 20:36:39 +00:00
|
|
|
# Feature Flag: Whether users can be renamed
|
|
|
|
FEATURE_USER_RENAME = False
|
|
|
|
|
2015-03-25 22:43:12 +00:00
|
|
|
# Feature Flag: Whether non-encrypted passwords (as opposed to encrypted tokens) can be used for
|
|
|
|
# basic auth.
|
|
|
|
FEATURE_REQUIRE_ENCRYPTED_BASIC_AUTH = False
|
|
|
|
|
2015-06-28 10:29:22 +00:00
|
|
|
# Feature Flag: Whether to automatically replicate between storage engines.
|
|
|
|
FEATURE_STORAGE_REPLICATION = False
|
|
|
|
|
2015-09-04 20:14:46 +00:00
|
|
|
# Feature Flag: Whether users can directly login to the UI.
|
|
|
|
FEATURE_DIRECT_LOGIN = True
|
|
|
|
|
2015-10-26 16:14:31 +00:00
|
|
|
# Feature Flag: Whether the v2/ endpoint is visible
|
|
|
|
FEATURE_ADVERTISE_V2 = True
|
|
|
|
|
2015-12-15 21:21:06 +00:00
|
|
|
# Semver spec for which Docker versions we will blacklist
|
|
|
|
# Documentation: http://pythonhosted.org/semantic_version/reference.html#semantic_version.Spec
|
|
|
|
BLACKLIST_V2_SPEC = '<1.6.0'
|
|
|
|
|
2015-10-09 19:41:56 +00:00
|
|
|
# Feature Flag: Whether or not to rotate old action logs to storage.
|
|
|
|
FEATURE_ACTION_LOG_ROTATION = False
|
|
|
|
|
2016-02-16 20:31:23 +00:00
|
|
|
# Feature Flag: Whether to enable conversion to ACIs.
|
|
|
|
FEATURE_ACI_CONVERSION = False
|
|
|
|
|
2016-01-21 20:40:51 +00:00
|
|
|
# Feature Flag: Whether to allow for "namespace-less" repositories when pulling and pushing from
|
|
|
|
# Docker.
|
|
|
|
FEATURE_LIBRARY_SUPPORT = True
|
|
|
|
|
2016-09-20 20:45:00 +00:00
|
|
|
# Feature Flag: Whether to require invitations when adding a user to a team.
|
|
|
|
FEATURE_REQUIRE_TEAM_INVITE = True
|
|
|
|
|
2016-08-24 16:55:33 +00:00
|
|
|
# Feature Flag: Whether to proxy all direct download URLs in storage via the registry's nginx.
|
|
|
|
FEATURE_PROXY_STORAGE = False
|
|
|
|
|
2016-11-04 21:57:55 +00:00
|
|
|
# Feature Flag: Whether to collect and support user metadata.
|
|
|
|
FEATURE_USER_METADATA = False
|
|
|
|
|
2017-02-16 21:30:31 +00:00
|
|
|
# Feature Flag: Whether to support signing
|
|
|
|
FEATURE_SIGNING = False
|
|
|
|
|
2017-03-23 01:53:05 +00:00
|
|
|
# Feature Flag: Whether to enable support for App repositories.
|
2017-03-23 16:01:59 +00:00
|
|
|
FEATURE_APP_REGISTRY = False
|
2017-03-23 01:53:05 +00:00
|
|
|
|
2017-06-02 22:30:51 +00:00
|
|
|
# Feature Flag: If set to true, the _catalog endpoint returns public repositories. Otherwise,
|
|
|
|
# only private repositories can be returned.
|
|
|
|
FEATURE_PUBLIC_CATALOG = False
|
|
|
|
|
2017-08-07 19:24:36 +00:00
|
|
|
# Feature Flag: If set to true, build logs may be read by those with read access to the repo,
|
|
|
|
# rather than only write access or admin access.
|
|
|
|
FEATURE_READER_BUILD_LOGS = False
|
|
|
|
|
2017-09-12 19:55:37 +00:00
|
|
|
# Feature Flag: If set to true, autocompletion will apply to partial usernames.
|
|
|
|
FEATURE_PARTIAL_USER_AUTOCOMPLETE = True
|
|
|
|
|
2017-08-07 19:59:06 +00:00
|
|
|
# If a namespace is defined in the public namespace list, then it will appear on *all*
|
|
|
|
# user's repository list pages, regardless of whether that user is a member of the namespace.
|
|
|
|
# Typically, this is used by an enterprise customer in configuring a set of "well-known"
|
|
|
|
# namespaces.
|
|
|
|
PUBLIC_NAMESPACES = []
|
|
|
|
|
2016-01-21 20:40:51 +00:00
|
|
|
# The namespace to use for library repositories.
|
|
|
|
# Note: This must remain 'library' until Docker removes their hard-coded namespace for libraries.
|
|
|
|
# See: https://github.com/docker/docker/blob/master/registry/session.go#L320
|
|
|
|
LIBRARY_NAMESPACE = 'library'
|
|
|
|
|
2014-11-25 21:14:44 +00:00
|
|
|
BUILD_MANAGER = ('enterprise', {})
|
|
|
|
|
2014-06-17 20:03:43 +00:00
|
|
|
DISTRIBUTED_STORAGE_CONFIG = {
|
2014-08-07 17:45:15 +00:00
|
|
|
'local_eu': ['LocalStorage', {'storage_path': 'test/data/registry/eu'}],
|
|
|
|
'local_us': ['LocalStorage', {'storage_path': 'test/data/registry/us'}],
|
2014-06-17 20:03:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DISTRIBUTED_STORAGE_PREFERENCE = ['local_us']
|
2015-06-28 10:29:22 +00:00
|
|
|
DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS = ['local_us']
|
2014-09-09 22:30:14 +00:00
|
|
|
|
2014-11-02 20:06:17 +00:00
|
|
|
# Health checker.
|
|
|
|
HEALTH_CHECKER = ('LocalHealthCheck', {})
|
|
|
|
|
2014-09-09 22:30:14 +00:00
|
|
|
# Userfiles
|
|
|
|
USERFILES_LOCATION = 'local_us'
|
|
|
|
USERFILES_PATH = 'userfiles/'
|
2014-09-11 15:18:28 +00:00
|
|
|
|
|
|
|
# Build logs archive
|
|
|
|
LOG_ARCHIVE_LOCATION = 'local_us'
|
|
|
|
LOG_ARCHIVE_PATH = 'logarchive/'
|
2014-10-29 19:42:44 +00:00
|
|
|
|
2015-10-09 19:41:56 +00:00
|
|
|
# Action logs archive
|
|
|
|
ACTION_LOG_ARCHIVE_LOCATION = 'local_us'
|
|
|
|
ACTION_LOG_ARCHIVE_PATH = 'actionlogarchive/'
|
|
|
|
|
2014-12-23 19:01:00 +00:00
|
|
|
# System logs.
|
|
|
|
SYSTEM_LOGS_PATH = "/var/log/"
|
2015-06-16 00:55:23 +00:00
|
|
|
SYSTEM_LOGS_FILE = "/var/log/syslog"
|
2017-02-01 23:17:25 +00:00
|
|
|
SYSTEM_SERVICES_PATH = os.path.join(CONF_DIR, "init/service/")
|
2014-12-23 19:01:00 +00:00
|
|
|
|
2017-02-15 20:44:08 +00:00
|
|
|
# Allow registry pulls when unable to write to the audit log
|
|
|
|
ALLOW_PULLS_WITHOUT_STRICT_LOGGING = False
|
2017-01-25 16:38:30 +00:00
|
|
|
|
2014-12-23 19:01:00 +00:00
|
|
|
# Services that should not be shown in the logs view.
|
2015-02-18 21:37:38 +00:00
|
|
|
SYSTEM_SERVICE_BLACKLIST = []
|
|
|
|
|
|
|
|
# Temporary tag expiration in seconds, this may actually be longer based on GC policy
|
2015-02-19 21:54:23 +00:00
|
|
|
PUSH_TEMP_TAG_EXPIRATION_SEC = 60 * 60 # One hour per layer
|
|
|
|
|
|
|
|
# Signed registry grant token expiration in seconds
|
|
|
|
SIGNED_GRANT_EXPIRATION_SEC = 60 * 60 * 24 # One day to complete a push/pull
|
2015-03-30 21:55:04 +00:00
|
|
|
|
2015-07-16 19:49:06 +00:00
|
|
|
# Registry v2 JWT Auth config
|
2016-05-31 20:48:19 +00:00
|
|
|
REGISTRY_JWT_AUTH_MAX_FRESH_S = 60 * 60 + 60 # At most signed one hour, accounting for clock skew
|
2015-07-16 19:49:06 +00:00
|
|
|
|
2015-06-01 17:43:38 +00:00
|
|
|
# The URL endpoint to which we redirect OAuth when generating a token locally.
|
|
|
|
LOCAL_OAUTH_HANDLER = '/oauth/localapp'
|
|
|
|
|
2015-03-30 21:55:04 +00:00
|
|
|
# The various avatar background colors.
|
|
|
|
AVATAR_KIND = 'local'
|
2015-06-19 18:55:44 +00:00
|
|
|
|
2015-08-03 20:56:32 +00:00
|
|
|
# The location of the Quay documentation.
|
|
|
|
DOCUMENTATION_LOCATION = 'http://docs.quay.io'
|
2015-08-05 18:34:11 +00:00
|
|
|
DOCUMENTATION_METADATA = 'https://coreos.github.io/quay-docs/search.json'
|
2015-08-03 20:56:32 +00:00
|
|
|
|
2015-12-16 20:41:15 +00:00
|
|
|
# How often the Garbage Collection worker runs.
|
|
|
|
GARBAGE_COLLECTION_FREQUENCY = 30 # seconds
|
2015-10-21 20:35:08 +00:00
|
|
|
|
2016-11-08 23:20:38 +00:00
|
|
|
# How long notifications will try to send before timing out.
|
|
|
|
NOTIFICATION_SEND_TIMEOUT = 10
|
|
|
|
|
2015-10-21 20:35:08 +00:00
|
|
|
# Security scanner
|
2015-11-05 21:28:30 +00:00
|
|
|
FEATURE_SECURITY_SCANNER = False
|
2016-03-01 20:35:00 +00:00
|
|
|
FEATURE_SECURITY_NOTIFICATIONS = False
|
2016-05-02 19:29:31 +00:00
|
|
|
|
|
|
|
# The endpoint for the security scanner.
|
|
|
|
SECURITY_SCANNER_ENDPOINT = 'http://192.168.99.101:6060'
|
|
|
|
|
2017-02-27 20:02:29 +00:00
|
|
|
# The number of seconds between indexing intervals in the security scanner
|
|
|
|
SECURITY_SCANNER_INDEXING_INTERVAL = 30
|
|
|
|
|
2017-03-03 18:55:25 +00:00
|
|
|
# If specified, the security scanner will only index images newer than the provided ID.
|
|
|
|
SECURITY_SCANNER_INDEXING_MIN_ID = None
|
|
|
|
|
2016-05-02 19:29:31 +00:00
|
|
|
# If specified, the endpoint to be used for all POST calls to the security scanner.
|
|
|
|
SECURITY_SCANNER_ENDPOINT_BATCH = None
|
|
|
|
|
2017-01-23 19:36:19 +00:00
|
|
|
# If specified, GET requests that return non-200 will be retried at the following instances.
|
|
|
|
SECURITY_SCANNER_READONLY_FAILOVER_ENDPOINTS = []
|
|
|
|
|
2016-05-02 19:29:31 +00:00
|
|
|
# The indexing engine version running inside the security scanner.
|
2017-05-31 00:46:35 +00:00
|
|
|
SECURITY_SCANNER_ENGINE_VERSION_TARGET = 3
|
2016-05-02 19:29:31 +00:00
|
|
|
|
|
|
|
# The version of the API to use for the security scanner.
|
|
|
|
SECURITY_SCANNER_API_VERSION = 'v1'
|
|
|
|
|
|
|
|
# API call timeout for the security scanner.
|
|
|
|
SECURITY_SCANNER_API_TIMEOUT_SECONDS = 10
|
|
|
|
|
|
|
|
# POST call timeout for the security scanner.
|
|
|
|
SECURITY_SCANNER_API_TIMEOUT_POST_SECONDS = 480
|
|
|
|
|
|
|
|
# The issuer name for the security scanner.
|
|
|
|
SECURITY_SCANNER_ISSUER_NAME = 'security_scanner'
|
2016-04-29 01:10:28 +00:00
|
|
|
|
|
|
|
# JWTProxy Settings
|
|
|
|
# The address (sans schema) to proxy outgoing requests through the jwtproxy
|
|
|
|
# to be signed
|
2016-04-27 17:48:15 +00:00
|
|
|
JWTPROXY_SIGNER = 'localhost:8080'
|
2016-05-02 19:29:31 +00:00
|
|
|
|
2016-04-29 01:10:28 +00:00
|
|
|
# The audience that jwtproxy should verify on incoming requests
|
|
|
|
# If None, will be calculated off of the SERVER_HOSTNAME (default)
|
|
|
|
JWTPROXY_AUDIENCE = None
|
2015-12-30 22:19:19 +00:00
|
|
|
|
|
|
|
# Torrent management flags
|
2016-01-08 21:38:02 +00:00
|
|
|
FEATURE_BITTORRENT = False
|
2016-01-22 20:52:28 +00:00
|
|
|
BITTORRENT_PIECE_SIZE = 512 * 1024
|
|
|
|
BITTORRENT_ANNOUNCE_URL = 'https://localhost:6881/announce'
|
2016-05-23 20:00:48 +00:00
|
|
|
BITTORRENT_FILENAME_PEPPER = str(uuid4())
|
2016-02-08 21:51:38 +00:00
|
|
|
BITTORRENT_WEBSEED_LIFETIME = 3600
|
2015-12-22 14:05:17 +00:00
|
|
|
|
|
|
|
# "Secret" key for generating encrypted paging tokens. Only needed to be secret to
|
|
|
|
# hide the ID range for production (in which this value is overridden). Should *not*
|
|
|
|
# be relied upon for secure encryption otherwise.
|
2016-05-23 20:00:48 +00:00
|
|
|
# This value is a Fernet key and should be 32bytes URL-safe base64 encoded.
|
|
|
|
PAGE_TOKEN_KEY = '0OYrc16oBuksR8T3JGB-xxYSlZ2-7I_zzqrLzggBJ58='
|
2016-03-23 22:16:03 +00:00
|
|
|
|
|
|
|
# The timeout for service key approval.
|
|
|
|
UNAPPROVED_SERVICE_KEY_TTL_SEC = 60 * 60 * 24 # One day
|
2016-04-12 23:17:19 +00:00
|
|
|
|
|
|
|
# How long to wait before GCing an expired service key.
|
|
|
|
EXPIRED_SERVICE_KEY_TTL_SEC = 60 * 60 * 24 * 7 # One week
|
|
|
|
|
2016-04-26 19:16:55 +00:00
|
|
|
# The ID of the user account in the database to be used for service audit logs. If none, the
|
|
|
|
# lowest user in the database will be used.
|
|
|
|
SERVICE_LOG_ACCOUNT_ID = None
|
2016-04-27 18:39:01 +00:00
|
|
|
|
2016-05-31 20:48:19 +00:00
|
|
|
# The service key ID for the instance service.
|
|
|
|
# NOTE: If changed, jwtproxy_conf.yaml.jnj must also be updated.
|
|
|
|
INSTANCE_SERVICE_KEY_SERVICE = 'quay'
|
|
|
|
|
|
|
|
# The location of the key ID file generated for this instance.
|
2017-02-01 23:17:25 +00:00
|
|
|
INSTANCE_SERVICE_KEY_KID_LOCATION = os.path.join(CONF_DIR, 'quay.kid')
|
2016-05-31 20:48:19 +00:00
|
|
|
|
|
|
|
# The location of the private key generated for this instance.
|
|
|
|
# NOTE: If changed, jwtproxy_conf.yaml.jnj must also be updated.
|
2017-02-01 23:17:25 +00:00
|
|
|
INSTANCE_SERVICE_KEY_LOCATION = os.path.join(CONF_DIR, 'quay.pem')
|
2016-05-02 19:29:31 +00:00
|
|
|
|
2016-05-31 20:48:19 +00:00
|
|
|
# This instance's service key expiration in minutes.
|
2016-05-03 17:11:21 +00:00
|
|
|
INSTANCE_SERVICE_KEY_EXPIRATION = 120
|
2016-05-02 19:29:31 +00:00
|
|
|
|
2016-05-31 20:48:19 +00:00
|
|
|
# Number of minutes between expiration refresh in minutes. Should be the expiration / 2 minus
|
|
|
|
# some additional window time.
|
|
|
|
INSTANCE_SERVICE_KEY_REFRESH = 55
|
2016-05-13 18:52:22 +00:00
|
|
|
|
|
|
|
# The whitelist of client IDs for OAuth applications that allow for direct login.
|
|
|
|
DIRECT_OAUTH_CLIENTID_WHITELIST = []
|
|
|
|
|
2016-07-01 18:16:15 +00:00
|
|
|
# URL that specifies the location of the prometheus stats aggregator.
|
|
|
|
PROMETHEUS_AGGREGATOR_URL = 'http://localhost:9092'
|
2016-07-18 22:20:00 +00:00
|
|
|
|
2016-10-05 07:33:35 +00:00
|
|
|
# Namespace prefix for all prometheus metrics.
|
|
|
|
PROMETHEUS_NAMESPACE = 'quay'
|
|
|
|
|
2016-07-18 22:20:00 +00:00
|
|
|
# Overridable list of reverse DNS prefixes that are reserved for internal use on labels.
|
|
|
|
LABEL_KEY_RESERVED_PREFIXES = []
|
2016-10-28 21:11:36 +00:00
|
|
|
|
|
|
|
# Delays workers from starting until a random point in time between 0 and their regular interval.
|
2016-11-01 16:31:12 +00:00
|
|
|
STAGGER_WORKERS = True
|
2016-11-29 23:19:06 +00:00
|
|
|
|
|
|
|
# Location of the static marketing site.
|
|
|
|
STATIC_SITE_BUCKET = None
|
2016-12-05 21:07:00 +00:00
|
|
|
|
2016-12-06 18:59:47 +00:00
|
|
|
# Count and duration used to produce a rate of builds allowed to be queued per repository before
|
|
|
|
# rejecting requests. Values less than zero disable rate limiting.
|
|
|
|
# Example: 10 builds per minute is accomplished by setting ITEMS = 10, SECS = 60
|
|
|
|
MAX_BUILD_QUEUE_RATE_ITEMS = -1
|
|
|
|
MAX_BUILD_QUEUE_RATE_SECS = -1
|
2016-12-17 07:13:36 +00:00
|
|
|
|
|
|
|
# Site key and secret key for using recaptcha.
|
|
|
|
FEATURE_RECAPTCHA = False
|
|
|
|
RECAPTCHA_SITE_KEY = None
|
|
|
|
RECAPTCHA_SECRET_KEY = None
|
2017-02-13 19:14:44 +00:00
|
|
|
|
|
|
|
# Server where TUF metadata can be found
|
|
|
|
TUF_SERVER = None
|
2017-04-14 15:18:01 +00:00
|
|
|
|
2017-04-11 18:43:32 +00:00
|
|
|
# Prefix to add to metadata e.g. <prefix>/<namespace>/<reponame>
|
|
|
|
TUF_GUN_PREFIX = None
|
2017-02-27 18:03:20 +00:00
|
|
|
|
|
|
|
# Maximum size allowed for layers in the registry.
|
|
|
|
MAXIMUM_LAYER_SIZE = '20G'
|
2017-02-23 18:26:47 +00:00
|
|
|
|
|
|
|
# Feature Flag: Whether team syncing from the backing auth is enabled.
|
|
|
|
FEATURE_TEAM_SYNCING = False
|
|
|
|
TEAM_RESYNC_STALE_TIME = '30m'
|
|
|
|
TEAM_SYNC_WORKER_FREQUENCY = 60 # seconds
|
2017-03-23 21:16:19 +00:00
|
|
|
|
2017-07-21 15:06:21 +00:00
|
|
|
# Feature Flag: If enabled, non-superusers can setup team syncing.
|
|
|
|
FEATURE_NONSUPERUSER_TEAM_SYNCING_SETUP = False
|
|
|
|
|
2017-04-05 18:01:55 +00:00
|
|
|
# The default configurable tag expiration time for time machine.
|
|
|
|
DEFAULT_TAG_EXPIRATION = '2w'
|
|
|
|
|
|
|
|
# The options to present in namespace settings for the tag expiration. If empty, no option
|
|
|
|
# will be given and the default will be displayed read-only.
|
|
|
|
TAG_EXPIRATION_OPTIONS = ['0s', '1d', '1w', '2w', '4w']
|
|
|
|
|
|
|
|
# Feature Flag: Whether users can view and change their tag expiration.
|
|
|
|
FEATURE_CHANGE_TAG_EXPIRATION = True
|
2017-05-24 22:26:22 +00:00
|
|
|
|
|
|
|
# Defines a secret for enabling the health-check endpoint's debug information.
|
|
|
|
ENABLE_HEALTH_DEBUG_SECRET = None
|