kolla-ansible/ansible/roles/freezer/templates/freezer.conf.j2
Ghanshyam Mann 283fa242ca Remove system scope token to access services
As per the RBAC new direction in Zed cycle, we have dropped the
system scope from API policies and all the policies are hardcoded
to project scoped so that any user accessing APIs using system scope
will get 403 error. It is dropped from all the OpenStack services
except for the Ironic service which will have system scope and to
support ironic only deployment, we are keeping system as well as project
scope in Keystone.

Complete discussion and direction can be found in the below gerrit
change and TC goal direction:

- https://review.opendev.org/c/openstack/governance/+/847418
- https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#the-issues-we-are-facing-with-scope-concept

As phase-2 of RBAC goal, services will start enabling the new
defaults and project scope by default. For example: Nova did in
- https://review.opendev.org/c/openstack/nova/+/866218

Kolla who start accessing the services using system scope token
- https://review.opendev.org/c/openstack/kolla-ansible/+/692179

This commit partially revert the above change except keeping
system scope usage for Keystone and Ironic. Rest all services are changed
to use the project scope token.

And enable the scope and new defaults for Nova which was disabled
by https://review.opendev.org/c/openstack/kolla-ansible/+/870804

Change-Id: I0adbe0a6c39e11d7c9542569085fc5d580f26c9d
2023-01-26 17:52:00 -06:00

76 lines
2.3 KiB
Django/Jinja

[DEFAULT]
debug = {{ freezer_logging_debug }}
log_dir = /var/log/kolla/freezer
{% if service_name == 'freezer-api' %}
bind_host = {{ api_interface_address }}
bind_port = {{ freezer_api_port }}
{% endif %}
{% if service_name == 'freezer-scheduler' %}
client_id = {{ inventory_hostname }}
jobs_dir = /etc/freezer/scheduler/conf.d
os_username = {{ openstack_auth.username }}
os_password = {{ openstack_auth.password }}
os_auth_url = {{ openstack_auth.auth_url }}
os_project_name = {{ openstack_auth.project_name }}
os_project_domain_name = {{ default_project_domain_name }}
os_user_domain_name = {{ openstack_auth.user_domain_name }}
{% endif %}
{% if service_name == 'freezer-api' %}
[keystone_authtoken]
service_type = backup
www_authenticate_uri = {{ keystone_internal_url }}
auth_url = {{ keystone_internal_url }}
auth_type = password
project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }}
project_name = service
username = {{ freezer_keystone_user }}
password = {{ freezer_keystone_password }}
cafile = {{ openstack_cacert }}
region_name = {{ openstack_region_name }}
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcache_secret_key }}
memcached_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_address(host) | put_address_in_context('memcache') }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if freezer_policy_file is defined %}
[oslo_policy]
policy_file = {{ freezer_policy_file }}
{% endif %}
[oslo_middleware]
enable_proxy_headers_parsing = True
[paste_deploy]
config_file = /etc/freezer/freezer-paste.ini
{% if freezer_database_backend == 'mariadb' %}
[storage]
backend = sqlachemy
driver = sqlalchemy
[database]
connection = mysql+pymysql://{{ freezer_database_user }}:{{ freezer_database_password }}@{{ freezer_database_address }}/{{ freezer_database_name }}
connection_recycle_time = {{ database_connection_recycle_time }}
max_pool_size = {{ database_max_pool_size }}
max_retries = -1
{% endif %}
{% if freezer_database_backend == 'elasticsearch' %}
[storage]
backend = elasticsearch
driver = elasticsearch
[elasticsearch]
hosts = {{ freezer_es_protocol }}://{{ freezer_es_address | put_address_in_context('url') }}:{{ freezer_es_port }}
number_of_replicas = {{ freezer_elasticsearch_replicas }}
index = freezer
{% endif %}
{% endif %}