Uploaded image for project: 'Optimization Framework'
  1. Optimization Framework
  2. OPTFRA-757

Incorrect post-filtering of policies in OSDF

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Kohn Release
    • Frankfurt Release
    • OSDF
    • None
    • SB-00

      The highlighted row is a bug. It can cause that further filtering of policies can be limited only to one resource - if more than one demand is in the request body. It is in policy/interface.py file

      scope_policies = []
      references = config_local.get('references', {})
      pscope = config_local.get('policy_info', {}).get(type_service, {}).get('policy_scope', [])
      scope_fields = {}
      policies = {}
      for scopes in pscope:
      for key in scopes.keys():
      for field in scopes[key]:
      scope_fields[key] = list_flatten([get_scope_fields(field, references, req, policies)
      if 'get_param' in field else field])
      if scope_fields.get('resources') and len(scope_fields['resources']) > 1:
      for s in scope_fields['resources']:
      scope_fields['resources'] = [s]

            vrvarma vrvarma
            rajewluk Lukasz Rajewski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: