Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-9006

CustomPolicyDefinition should work out of the box for tenants

XMLWordPrintable

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • RHOAM Sprint 67

      Creating a new CustomPolicyDefinition as defined in doc  works for default tenant, but not for the custom tenants.

      To reproduce

      Create a tenant
      Create a CustomPolicyDefinition linked to that tenant, eg.:

      apiVersion: capabilities.3scale.net/v1beta1
      kind: CustomPolicyDefinition
      metadata:
        name: sihq-parse-query-args-sih-dev-yb8531
      spec:
        name: SIHQ Parse Query Args
        providerAccountRef:
          name: tenant-secret
        schema:
          $schema: 'http://json-schema.org/draft-07/schema#'
          configuration:
            properties:
              context_key:
                default: parsed_query_args
                description: Liquid context key where the parsed query args will be set
                type: string
            required: []
            type: object
          description:
            - 
          name: SIHQ Parse Query Args
          summary: Allows to parse the query args of a request.
          version: '1.0'
        version: '1.0' 
      

      Result: The above generates an error

      status:
        conditions:
          - lastTransitionTime: '2022-11-28T18:39:56Z'
            message: >-
              error calling 3scale system - reason: {"error":"Your access token does
              not have the correct permissions"} - code: 403
            status: 'True'
            type: Failed
          - lastTransitionTime: '2022-11-28T18:39:56Z'
            status: 'False'
            type: Invalid
          - lastTransitionTime: '2022-11-28T18:39:56Z'
            status: 'False'
            type: Ready
        observedGeneration: 1
        providerAccountHost: 'https://dev-admin.{tenant-name}'

       

      The workaround is to create a new token with the Read + Write permissions to the Account Management API and Policy Registry API.

              Unassigned Unassigned
              rhn-support-cvajjhal Chandrasekhar Vajjhala (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: