Uploaded image for project: 'Service Orchestrator'
  1. Service Orchestrator
  2. SO-1354

Auth error in SO to AAI requests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Low Low
    • Dublin Release
    • Casablanca Release

      There are some authentication errors in the log file. These are for requests made from SO to AAI.

      We suspect that some AAI calls in the source may be missing authentication headers.

      Example: Below source in DoUpdateVnfAndModules.groovy

      try {
      def vnfId = execution.getVariable('vnfId')

      AaiUtil aaiUriUtil = new AaiUtil(this)
      AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
      String endPoint = aaiUriUtil.createAaiUri(uri)
      msoLogger.debug("AAI endPoint: " + endPoint)

      try {
      HttpClient client = new HttpClient(new URL(endPoint), MediaType.APPLICATION_XML, TargetEntity.AAI)
      client.addAdditionalHeader('X-TransactionId', UUID.randomUUID().toString())
      client.addAdditionalHeader('X-FromAppId', 'MSO')
      client.addAdditionalHeader('Content-Type', 'application/xml')
      client.addAdditionalHeader('Accept','application/xml')

       

      We probably need additional line like below to add the auth header?

      client.addBasicAuthHeader(UrnPropertiesReader.getVariable("aai.auth", execution), UrnPropertiesReader.getVariable("mso.msoKey", execution))

       

       

      ###Logs###

       

      2019-01-04T08:21:09.004Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.BPMNLogger - Sending response for DeleteVfModuleInfra ResponseCode=200 Status=Success Response=
      {"requestReferences":{"instanceId":"1bfa1973-2a55-427c-aff5-e69cbd21863f","requestId":"7d595e60-93ce-4dee-9c07-a6ac3b314abd"}}
      2019-01-04T08:21:09.005Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.b.c.workflow.context.WorkflowContextHolder - [WORKFLOW-CONTEXT-HOLDER] Adding context to the queue: 7d595e60-93ce-4dee-9c07-a6ac3b314abd
      2019-01-04T08:21:09.146Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=cf6e6ccd89494d09b4dc6d588a6e653e
      2019-01-04T08:21:09.147Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=RegionOne
      2019-01-04T08:21:09.149Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=InfosysArvr..base_vms..module-0
      2019-01-04T08:21:09.151Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - PrepareUpdateAAIVfModuleRequest :<PrepareUpdateAAIVfModuleRequest>
      <vnf-id>a68b568b-1be5-4676-b84f-cf62864aa95c</vnf-id>
      <vf-module-id>1bfa1973-2a55-427c-aff5-e69cbd21863f</vf-module-id>
      <orchestration-status>pending-delete</orchestration-status>
      </PrepareUpdateAAIVfModuleRequest>
      2019-01-04T08:21:09.152Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - UpdateAAIVfModule Request: <PrepareUpdateAAIVfModuleRequest>
      <vnf-id>a68b568b-1be5-4676-b84f-cf62864aa95c</vnf-id>
      <vf-module-id>1bfa1973-2a55-427c-aff5-e69cbd21863f</vf-module-id>
      <orchestration-status>pending-delete</orchestration-status>
      </PrepareUpdateAAIVfModuleRequest>
      2019-01-04T08:21:09.156Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=cf6e6ccd89494d09b4dc6d588a6e653e
      2019-01-04T08:21:09.157Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=RegionOne
      2019-01-04T08:21:09.158Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=InfosysArvr..base_vms..module-0
      2019-01-04T08:21:09.159Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - PrepareUpdateAAIVfModuleRequest :<PrepareUpdateAAIVfModuleRequest>
      <vnf-id>a68b568b-1be5-4676-b84f-cf62864aa95c</vnf-id>
      <vf-module-id>1bfa1973-2a55-427c-aff5-e69cbd21863f</vf-module-id>
      <orchestration-status>pending-delete</orchestration-status>
      </PrepareUpdateAAIVfModuleRequest>
      2019-01-04T08:21:09.160Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - UpdateAAIVfModule Request: <PrepareUpdateAAIVfModuleRequest>
      <vnf-id>a68b568b-1be5-4676-b84f-cf62864aa95c</vnf-id>
      <vf-module-id>1bfa1973-2a55-427c-aff5-e69cbd21863f</vf-module-id>
      <orchestration-status>pending-delete</orchestration-status>
      </PrepareUpdateAAIVfModuleRequest>
      2019-01-04T08:21:09.238Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - AAI endPoint: https://aai.api.simpledemo.onap.org:8443/aai/v14/network/generic-vnfs/generic-vnf/a68b568b-1be5-4676-b84f-cf62864aa95c/vf-modules/vf-module/1bfa1973-2a55-427c-aff5-e69cbd21863f
      2019-01-04T08:21:09.263Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - sending GET to AAI endpoint 'https://aai.api.simpledemo.onap.org:8443/aai/v14/network/generic-vnfs/generic-vnf/a68b568b-1be5-4676-b84f-cf62864aa95c/vf-modules/vf-module/1bfa1973-2a55-427c-aff5-e69cbd21863f'
      2019-01-04T08:21:09.269Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| org.onap.so.rest.RESTClient - Executing GET to url: https://aai.api.simpledemo.onap.org:8443/aai/v14/network/generic-vnfs/generic-vnf/a68b568b-1be5-4676-b84f-cf62864aa95c/vf-modules/vf-module/1bfa1973-2a55-427c-aff5-e69cbd21863f
      2019-01-04T08:21:09.528Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - createVfModule - invoking httpGet() to AAI
      2019-01-04T08:21:09.535Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - Received generic VNF data: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <Fault>
      <requestError>
      <policyException>
      <messageId>POL3300</messageId>
      <text>Unauthorized (msg=%1) (ec=%2)</text>
      <variables>
      <variable>Unauthorized</variable>
      <variable>ERR.5.1.3300</variable>
      </variables>
      </policyException>
      </requestError>
      </Fault>

      2019-01-04T08:21:09.536Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - deleteVfModule - queryAAIVfModule Response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <Fault>
      <requestError>
      <policyException>
      <messageId>POL3300</messageId>
      <text>Unauthorized (msg=%1) (ec=%2)</text>
      <variables>
      <variable>Unauthorized</variable>
      <variable>ERR.5.1.3300</variable>
      </variables>
      </policyException>
      </requestError>
      </Fault>

      2019-01-04T08:21:09.537Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - deleteVfModule - queryAAIVfModule ResponseCode: 403
      2019-01-04T08:21:09.538Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - Response code:403
      2019-01-04T08:21:09.539Z|7d595e60-93ce-4dee-9c07-a6ac3b314abd| o.o.s.bpmn.infrastructure.scripts.DoDeleteVfModule - Response:
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <Fault>
      <requestError>
      <policyException>
      <messageId>POL3300</messageId>
      <text>Unauthorized (msg=%1) (ec=%2)</text>
      <variables>
      <variable>Unauthorized</variable>
      <variable>ERR.5.1.3300</variable>
      </variables>
      </policyException>
      </requestError>
      </Fault>

            infy_28900 infy_28900
            infy_28900 infy_28900
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: