openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

Observing 401 unauthorised error - cache/live fc and fc-port #869

Closed Ziabatcha closed 6 months ago

Ziabatcha commented 6 months ago

TAG: v1.1.3

Observing 401 unauthorised error for CACHE API

/core-model-1-4:network-control-domain=cache/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}

/core-model-1-4:network-control-domain=cache/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}/fc-port={localId}

The API differs between LOAD.JSON and YAML file.

In swagger its reflected as FC and in YAML its reflected as forwarding-construct.

/core-model-1-4:network-control-domain=cache/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}
{
  "code": 401,
  "message": "unauthorized",
  "errors": [
    {
      "path": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}",
      "message": "unauthorized"
    }
  ]
}

curl -X GET "http://xx:xx/core-model-1-4:network-control-domain=cache/control-construct=513250004/forwarding-domain=FD-VLAN-1234-1/fc=FC-1234-1-3392/fc-port=FCPort-1234-1-3392" -H "accept: application/json" -H "user: User Name" -H "originator: Resolver" -H "x-correlator: 550e8400-e29b-11d4-a716-446655440000" -H "trace-indicator: 1.3.1" -H "customer-journey: Unknown value" -H "operation-key: Operation key not yet provided."

http://xx:xx/core-model-1-4:network-control-domain=cache/control-construct=513250004/forwarding-domain=FD-VLAN-1234-1/fc=FC-1234-1-3392/fc-port=FCPort-1234-1-3392

{
  "code": 401,
  "message": "unauthorized",
  "errors": [
    {
      "path": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}/fc-port={localId}",
      "message": "unauthorized"
    }
  ]
}
Ziabatcha commented 6 months ago

Issue observed with fc and fc-port LIVE API in build v1.1.3

http://xx:xx/core-model-1-4:network-control-domain=live/control-construct=513250004/forwarding-domain=FD-VLAN-1234-1/fc=FC-1234-1-3392

http://xx:xx/core-model-1-4:network-control-domain=live/control-construct=513250004/forwarding-domain=FD-VLAN-1234-1/fc=FC-1234-1-3392/fc-port=FCPort-1234-1-3392

{ "code": 401, "message": "unauthorized", "errors": [ { "path": "/core-model-1-4:network-control-domain=live/control-construct={mountName}/forwarding-domain={uuid}/fc={uuid1}/fc-port={localId}", "message": "unauthorized" } ] }

nardecchia-siae commented 6 months ago

I think that the issue is not an issue. Unauthorized means that the operation key is not correct. Infact in my environment in load.json file the operation key is "n.a." and both live and cache api's are working only using that operation key. Any other key is rejected with the message reported in the bug.

Ziabatcha commented 6 months ago

Tested okay with test_v1.1.4 Able to get response for both fc and fc-port API from CACHE/LIVE.