aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/server
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-moon/keystone/server')
-rw-r--r--keystone-moon/keystone/server/backends.py22
-rw-r--r--keystone-moon/keystone/server/common.py10
-rw-r--r--keystone-moon/keystone/server/eventlet.py4
-rw-r--r--keystone-moon/keystone/server/wsgi.py30
4 files changed, 28 insertions, 38 deletions
diff --git a/keystone-moon/keystone/server/backends.py b/keystone-moon/keystone/server/backends.py
index ebe00a81..a518e777 100644
--- a/keystone-moon/keystone/server/backends.py
+++ b/keystone-moon/keystone/server/backends.py
@@ -14,15 +14,14 @@ from keystone import assignment
from keystone import auth
from keystone import catalog
from keystone.common import cache
-from keystone.contrib import endpoint_filter
-from keystone.contrib import federation
-from keystone.contrib import oauth1
-from keystone.contrib import revoke
from keystone import credential
from keystone import endpoint_policy
+from keystone import federation
from keystone import identity
+from keystone import oauth1
from keystone import policy
from keystone import resource
+from keystone import revoke
from keystone import token
from keystone import trust
@@ -30,12 +29,23 @@ from keystone import trust
def load_backends():
# Configure and build the cache
- cache.configure_cache_region(cache.REGION)
+ cache.configure_cache()
+ cache.configure_cache(region=catalog.COMPUTED_CATALOG_REGION)
+ cache.apply_invalidation_patch(
+ region=catalog.COMPUTED_CATALOG_REGION,
+ region_name=catalog.COMPUTED_CATALOG_REGION.name)
+ cache.configure_cache(region=assignment.COMPUTED_ASSIGNMENTS_REGION)
+ cache.apply_invalidation_patch(
+ region=assignment.COMPUTED_ASSIGNMENTS_REGION,
+ region_name=assignment.COMPUTED_ASSIGNMENTS_REGION.name)
# Ensure that the identity driver is created before the assignment manager
# and that the assignment driver is created before the resource manager.
# The default resource driver depends on assignment, which in turn
# depends on identity - hence we need to ensure the chain is available.
+ # TODO(morganfainberg): In "O" release move _IDENTITY_API to be directly
+ # instantiated in the DRIVERS dict once assignment driver being selected
+ # based upon [identity]/driver is removed.
_IDENTITY_API = identity.Manager()
_ASSIGNMENT_API = assignment.Manager()
@@ -44,12 +54,12 @@ def load_backends():
catalog_api=catalog.Manager(),
credential_api=credential.Manager(),
domain_config_api=resource.DomainConfigManager(),
- endpoint_filter_api=endpoint_filter.Manager(),
endpoint_policy_api=endpoint_policy.Manager(),
federation_api=federation.Manager(),
id_generator_api=identity.generator.Manager(),
id_mapping_api=identity.MappingManager(),
identity_api=_IDENTITY_API,
+ shadow_users_api=identity.ShadowUsersManager(),
oauth_api=oauth1.Manager(),
policy_api=policy.Manager(),
resource_api=resource.Manager(),
diff --git a/keystone-moon/keystone/server/common.py b/keystone-moon/keystone/server/common.py
index 7bc5958e..4b1ee469 100644
--- a/keystone-moon/keystone/server/common.py
+++ b/keystone-moon/keystone/server/common.py
@@ -15,9 +15,9 @@
from oslo_config import cfg
from oslo_log import log
+from keystone.common import config
from keystone.common import dependency
from keystone.common import sql
-from keystone import config
from keystone.i18n import _LW
from keystone.server import backends
@@ -30,7 +30,7 @@ def configure(version=None, config_files=None,
pre_setup_logging_fn=lambda: None):
config.configure()
sql.initialize()
- config.set_default_for_default_log_levels()
+ config.set_config_defaults()
CONF(project='keystone', version=version,
default_config_files=config_files)
@@ -38,9 +38,9 @@ def configure(version=None, config_files=None,
pre_setup_logging_fn()
config.setup_logging()
- if CONF.debug:
- LOG.warn(_LW(
- 'debug is enabled so responses may include sensitive '
+ if CONF.insecure_debug:
+ LOG.warning(_LW(
+ 'insecure_debug is enabled so responses may include sensitive '
'information.'))
diff --git a/keystone-moon/keystone/server/eventlet.py b/keystone-moon/keystone/server/eventlet.py
index 243f0234..e688baed 100644
--- a/keystone-moon/keystone/server/eventlet.py
+++ b/keystone-moon/keystone/server/eventlet.py
@@ -32,12 +32,12 @@ import pbr.version
oslo_i18n.enable_lazy()
+from keystone.common import config
from keystone.common import environment
from keystone.common import utils
-from keystone import config
from keystone.i18n import _
from keystone.server import common
-from keystone import service as keystone_service
+from keystone.version import service as keystone_service
CONF = cfg.CONF
diff --git a/keystone-moon/keystone/server/wsgi.py b/keystone-moon/keystone/server/wsgi.py
index ae24c48e..a62a8460 100644
--- a/keystone-moon/keystone/server/wsgi.py
+++ b/keystone-moon/keystone/server/wsgi.py
@@ -16,7 +16,6 @@ import logging
from oslo_config import cfg
import oslo_i18n
-import oslo_middleware.cors as cors
# NOTE(dstanek): i18n.enable_lazy() must be called before
@@ -26,28 +25,16 @@ import oslo_middleware.cors as cors
oslo_i18n.enable_lazy()
+from keystone.common import config
from keystone.common import environment
-from keystone import config
-import keystone.middleware.core as middleware_core
from keystone.server import common
-from keystone import service as keystone_service
+from keystone.version import service as keystone_service
CONF = cfg.CONF
-KEYSTONE_HEADERS = [
- middleware_core.AUTH_TOKEN_HEADER,
- middleware_core.SUBJECT_TOKEN_HEADER,
- 'X-Project-Id',
- 'X-Project-Name',
- 'X-Project-Domain-Id',
- 'X-Project-Domain-Name',
- 'X-Domain-Id',
- 'X-Domain-Name'
-]
-
-def initialize_application(name):
+def initialize_application(name, post_log_configured_function=lambda: None):
common.configure()
# Log the options used when starting if we're in debug mode...
@@ -56,21 +43,14 @@ def initialize_application(name):
environment.use_stdlib()
+ post_log_configured_function()
+
def loadapp():
return keystone_service.loadapp(
'config:%s' % config.find_paste_config(), name)
_unused, application = common.setup_backends(
startup_application_fn=loadapp)
-
- # Create a CORS wrapper, and attach keystone-specific defaults that must be
- # included in all CORS responses
- application = cors.CORS(application, CONF)
- application.set_latent(
- allow_headers=KEYSTONE_HEADERS,
- allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'],
- expose_headers=KEYSTONE_HEADERS
- )
return application