Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-4468

SVC4301 RESTRICTED_OPERATION on service composition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • London Release
    • Kohn Release
    • SDC, SDC-ONAP-UI
    • None

      Steps to reproduce

      1. Login into SDC GUI as designer (cs0008) use
      2. Create new service
      3. Open compisotion page for this service. Try to add  sample component (e.g. Port) to the service by drag & drop action.

      You should receive error SVC4301 error displayed on GUI.

       

      Cause

      Example HTTP request on component drop action (translated to curl format) is:
      curl 'https://sdc.api.fe.simpledemo.onap.org:30207/sdc1/feProxy/rest/v1/catalog/services/3ca333e1-cf9a-48a9-9bf1-208c55aee12c/resourceInstance' \
        -H 'Accept: application/json, text/plain, /' \
        -H 'Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7' \
        -H 'Cache-Control: no-cache' \
        -H 'Connection: keep-alive' \
        -H 'Content-Type: application/json; charset=UTF-8' \
        -H 'Cookie: JSESSIONID=node01txq0is517ery1gs6eywag8j3h11.node0; USER_ID=eaGi1IQqP9kbgBHuG/pZm9frcXMQUvoQ59rKkiz6+ug=; EPService=CE576B9CBECC65C5373F7E2132C68B61; UserId=Mp/Gp/302UGQ0Ics25+F4A==' \
        -H 'Origin: https://sdc.api.fe.simpledemo.onap.org:30207' \
        -H 'Pragma: no-cache' \
        -H 'Referer: https://sdc.api.fe.simpledemo.onap.org:30207/sdc1/portal' \
        -H 'Sec-Fetch-Dest: empty' \
        -H 'Sec-Fetch-Mode: cors' \
        -H 'Sec-Fetch-Site: same-origin' \
        -H 'USER_ID: eaGi1IQqP9kbgBHuG/pZm9frcXMQUvoQ59rKkiz6+ug=' \
        -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36' \
        -H 'sec-ch-ua: "Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"' \
        -H 'sec-ch-ua-mobile: ?0' \
        -H 'sec-ch-ua-platform: "Windows"' \
        --data-raw '{"uniqueId":"efe4a8ab-f880-453b-92b3-83a0363f778b1680086418829","posX":-32,"posY":-381,"name":"asr","componentVersion":"1.0","originType":"PNF","icon":"router","componentUid":"efe4a8ab-f880-453b-92b3-83a0363f778b"}' \
        --compressed \
        --insecure

       

      Log entry from SDC backend component (after setting logging level to DEBUG) is:

       

      2023-03-30T08:28:19.299Z  [qtp317071334-13]  DEBUG  o.o.s.b.c.impl.BaseBusinessLogic  SupportablityAction=CREATE INSTANCE  RequestID=null  ServerIPAddress=10.42.0.22  ServiceName=/v1/catalog/services/b23adb54-ad4d-4897-957c-961ffdb7aba3/resourceInstance  EntryTimestamp=2023-03-30T08:28:19.154Z  InvocationID=a906deca-8f5f-4f1f-b695-992eed8e3eca  PartnerName=l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=  auditOn=true  SupportablityStatus=STARTED  ServerFQDN=dev-sdc-be-fd78b78b8-8bz7k  mandatory parameters for ECOMP logging, missing fields: RequestID , original message: Current user is not last updater, last updater userId: {}, current user userId: {}
      2023-03-30T08:28:19.299Z  [qtp317071334-13]  DEBUG  o.o.s.b.c.impl.BaseBusinessLogic  SupportablityAction=CREATE INSTANCE  RequestID=null  ServerIPAddress=10.42.0.22  ServiceName=/v1/catalog/services/b23adb54-ad4d-4897-957c-961ffdb7aba3/resourceInstance  EntryTimestamp=2023-03-30T08:28:19.154Z  InvocationID=a906deca-8f5f-4f1f-b695-992eed8e3eca  PartnerName=l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=  auditOn=true  SupportablityStatus=STARTED  ServerFQDN=dev-sdc-be-fd78b78b8-8bz7k  Current user is not last updater, last updater userId: cs0008, current user userId: l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=
      2023-03-30T08:28:19.300Z  [qtp317071334-13]  ERROR  o.o.s.b.s.ComponentInstanceServlet  SupportablityAction=CREATE INSTANCE  RequestID=null  ServerIPAddress=10.42.0.22  ServiceName=/v1/catalog/services/b23adb54-ad4d-4897-957c-961ffdb7aba3/resourceInstance  EntryTimestamp=2023-03-30T08:28:19.154Z  InvocationID=a906deca-8f5f-4f1f-b695-992eed8e3eca  PartnerName=l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=  auditOn=true  SupportablityStatus=STARTED  ServerFQDN=dev-sdc-be-fd78b78b8-8bz7k  #createComponentInstance('{"uniqueId":"61ff2aaf-ba4c-4bbc-a9a5-11d5840a19011680164899060","posX":-533,"posY":305.5,"name":"Port","componentVersion":"1.0","originType":"CP","icon":"port","componentUid":"61ff2aaf-ba4c-4bbc-a9a5-11d5840a1901"}', 'b23adb54-ad4d-4897-957c-961ffdb7aba3', 'services', 'l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=', 'Request(POST https://sdc-be.onap:8443/sdc2/rest/v1/catalog/services/b23adb54-ad4d-4897-957c-961ffdb7aba3/resourceInstance)@10957aa'): thrown org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException out of org.openecomp.sdc.be.components.impl.BaseBusinessLogic#validateCanWorkOnComponent[378] in 112ms

      Important:

      Current user is not last updater, last updater userId: cs0008, current user userId: l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8=

      Exception is thrown here:
      BaseBusinessLogic.java@378

      User ID of component last updater is compared with user ID passed as method argument (and finally taken from HTTP request header). Problem is in the format of IDs:

      • lastUpdaterUserId - the component last updater ID is: cs0008 (format of user name)
      • userId - user ID passed as method argument is: l4i5BAw1rASw0iUmTh625kUdK9sHgWp1qFYTK77hUy8 (format of token)

      so this comparison will always fail !

            MichaelMorris Michael Morris
            bijakov bijakov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: