Uploaded image for project: 'mod-inventory'
  1. mod-inventory
  2. MODINV-421

Permission error while executing GET /inventory/instances endpoint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 17.0.0
    • Labels:
      None
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      Firebird Sprint 115
    • Story Points:
      1
    • Development Team:
      Firebird

      Description

      Overview:

      The permission error could be observed while executing GET /inventory/instances with 

      inventory.instances.collection.get permission. The logs of inventory service is : 

      08:19:17 [] [] [] [] INFO  ebRequestDiagnostics Handling GET /inventory/instances08:19:17 [] [] [] [] INFO  ebRequestDiagnostics Handling GET /inventory/instances08:19:17 [] [] [] [] WARN  Instances            Exception occurredjava.util.concurrent.CompletionException: org.folio.inventory.exceptions.ExternalResourceFetchException: External resource fetch exception: Access requires permission: inventory-storage.holdings.collection.get at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367) ~[?:?] at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376) ~[?:?] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1074) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?] at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:369) ~[mod-inventory.jar:?] at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:356) ~[mod-inventory.jar:?] at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:334) ~[mod-inventory.jar:?] at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:301) ~[mod-inventory.jar:?] at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:263) ~[mod-inventory.jar:?] at io.vertx.ext.web.client.impl.HttpContext.lambda$null$8(HttpContext.java:533) ~[mod-inventory.jar:?] at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96) ~[mod-inventory.jar:?] at io.vertx.core.impl.WorkerContext.lambda$run$1(WorkerContext.java:102) ~[mod-inventory.jar:?] at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) ~[mod-inventory.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [mod-inventory.jar:?] at java.lang.Thread.run(Thread.java:834) [?:?]Caused by: org.folio.inventory.exceptions.ExternalResourceFetchException: External resource fetch exception: Access requires permission: inventory-storage.holdings.collection.get at org.folio.inventory.storage.external.MultipleRecordsFetchClient.lambda$getAllMatched$2(MultipleRecordsFetchClient.java:57) ~[mod-inventory.jar:?] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072) ~[?:?] ... 18 more
      

      According the logs the  inventory-storage.holdings.collection.get permission is required.
      Steps to Reproduce:

      1. Execute GET /inventory/instances with non admin user

      Expected Results:

      Successful execution without any errors.

      Actual Results:
      Permission errors appear.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Harbuz Aliaksei Harbuz
                Reporter:
                Harbuz Aliaksei Harbuz
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases