#
# SAMPLE CONFIG FILE TO TEST MEMCACHE TOKEN STORE
#
# TO USE:
# in /bin, run:
#   ./keystone -c ../etc/memcache.conf
# also run
#   ./sampledata -c ../etc/memcache.conf
#
# Note: since the data in this config is distributed between a sqlite database
# and memcache, when the memcache server is restarted the token data is lost
# but the other sample data remains in the sqlite database. This results in
# the sample data being partially erased which prevents many samples from
# running and also results in calls to sampldata failing because values already
# exist. TO address this, delete the keystone.memcache.db file and rerun
# sampledata.


[DEFAULT]
verbose = False
debug = False
default_store = sqlite
log_file = keystone.memcache.log
log_dir = .
backends = keystone.backends.sqlalchemy,keystone.backends.memcache
extensions= osksadm,oskscatalog
service-header-mappings = {
    'nova' : 'X-Server-Management-Url',
    'swift' : 'X-Storage-Url',
    'cdn' : 'X-CDN-Management-Url'}
service_host = 0.0.0.0
service_port = 5000
service_ssl = False
admin_host = 0.0.0.0
admin_port = 35357
admin_ssl = False
keystone-admin-role = Admin
keystone-service-admin-role = KeystoneServiceAdmin

[keystone.backends.sqlalchemy]
sql_connection = sqlite:///keystone.memcache.db
sql_idle_timeout = 30
backend_entities = ['Endpoints', 'Credentials',  'EndpointTemplates', 'Tenant', 'User', 'UserRoleAssociation', 'Role', 'Service']

[keystone.backends.memcache]
memcache_hosts = 127.0.0.1:11211
backend_entities = ['Token']
cache_time = 86400

[pipeline:admin]
pipeline =
        urlrewritefilter
        admin_api

[pipeline:keystone-legacy-auth]
pipeline =
        urlrewritefilter
        legacy_auth
        service_api

[app:service_api]
paste.app_factory = keystone.server:service_app_factory

[app:admin_api]
paste.app_factory = keystone.server:admin_app_factory

[filter:urlrewritefilter]
paste.filter_factory = keystone.middleware.url:filter_factory

[filter:legacy_auth]
paste.filter_factory = keystone.frontends.legacy_token_auth:filter_factory
