16d2c8d8c1
Since we already introduced apache server for redfish, it will be a good idea to use it for sharing iso also. These changes add file-exchanger config that can be used to share iso. In addition apache allows the specified users (see rbac config) to upload files. This may help in future to better emulate deployment environment, where it will be necessary to do this step after airshipctl generated iso and before airshipctl invokes redfish to run that iso. Change-Id: Ice47fe977fb71cf9df14d39c5ac26e365e2006f2
30 lines
932 B
Django/Jinja
30 lines
932 B
Django/Jinja
{% macro render_require(item) -%}
|
|
{% if item == "valid_user" %}
|
|
Require valid-user
|
|
{% elif item.group is defined %}
|
|
Require group {{ item.group | join(' ') }}
|
|
{% elif item.user is defined %}
|
|
Require user {{ item.user | join(' ') }}
|
|
{% elif item.all is defined %}
|
|
Require all {{ item.all }}
|
|
{% else %}
|
|
Require all denied
|
|
{% endif %}
|
|
{%- endmacro %}
|
|
{% macro render_rbac(rbac) -%}
|
|
{# rbac #}
|
|
{% if rbac is defined and rbac.policies is defined %}
|
|
{% for item in rbac.policies %}
|
|
<Limit {{ item.role | join(' ') }}>
|
|
{{ render_require(item) }}
|
|
</Limit>
|
|
{% endfor %}
|
|
<LimitExcept{% for item in rbac.policies %} {{ item.role | join(' ') }}{% endfor %}>
|
|
{{ render_require(rbac.default) }}
|
|
</LimitExcept>
|
|
{% else %}
|
|
{{ render_require(rbac.default) }}
|
|
{% endif %}
|
|
{%- endmacro %}
|
|
|