{% macro showtime(tstr) -%} {% if tstr %} {{time.strftime("%d/%b/%Y %H:%M:%S", time.localtime(float(tstr)))}} {% endif %} {% endmacro %} Igor Access Control Failures

Igor Access Control Failures

{% if not igor.internal.accessControl('hasCapabilitySupport') %}

This Igor runs without capability support. It is unlikely you see anything interesting here.

{% endif %} {% if igor.app.getSessionItem('user', None) %} {% set user = igor.app.getSessionItem('user') %}

You are logged in as {{user}}.

{% else %} {% set user = "admin" %} {% endif %}

This page lists all access control failures (missing capabilities) encountered by Igor in the current invocation. (So, this information may be incorrect, because issues have been fixed already, and may be incomplete because Igor may have restarted since a failure). For each failure the first occurrence is shown, so you can look it up in the Igor log.

If you (the user currently logged in) do have the correct capabilities to allow the operation you will see a Fix button which will create the capability and assign it to the action. Or you may see a Create button which will create the correct capability in your user account, so you can export it to the device that issued the request.

{% set errors = igor.databaseAccessor.get_key('services/igor/accessFailures', 'application/x-python-object', 'content', token) %} {% if 'accessFailure' in errors %} {% set errors = errors.get('accessFailure') %} {% if errors is mapping %} {% set errors = [errors] %} {% endif %} {% else %} {% set errors = [] %} {% endif %} {% for error in errors %} {% set keep = error %} {% endfor %}
time action request path op path capabilities ... Can fix?
{{showtime(error.pop('timestamp', ''))}} {{error.pop('action', '')}} {% if 'representing' in error %}
representing {{error.pop('representing', '')}} {% endif %}
{{error.pop('requestPath', '')}} {{error.pop('operation', '')}} {{error.pop('path', '')}} {% if 'external' in error %}
external={{error.pop('external','')}} {% endif %}
{% for cid in error.pop('capID', []) %} {{cid}}
{% endfor %}
{% for k, v in error.items() %} {{k}}={{str(v)}}
{% endfor %}
{% if 'path' in keep and 'operation' in keep %} {% set kwargs = {keep['operation']:'self'} %} {% if keep.get('external', '') %} {% do kwargs.update(aud='to-be-provided') %} {% endif %} {% set myCaps = igor.access.findCompatibleTokens(token, keep['path'], **kwargs) %} {% if myCaps %} {% set myCaps = myCaps|join('/') %} {% if 'action' in keep %}
{% if 'external' in keep %} {% endif %}
{% else %}
{% if 'external' in keep %} {% endif %}
{% endif %} {% endif %} {% endif %}

Return to Igor homepage

{% if 'returnTo' in kwargs %}

Return to {{kwargs['returnTo']}}.

{% endif %}