Lcb authorized error replaced to generic autent err, while issuing bad permission for user

Description

Issue encountered while doing a set w/ read-only rbac

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Attachments

1

Activity

Show:

CB robot February 10, 2021 at 10:39 AM

Build couchbase-server-7.0.0-4433 contains libcouchbase commit 2022118 with commit message:
: preserve status of KV protocol response for retry queue

Alexis DELTOUR December 2, 2020 at 2:30 PM

thx a lot Sergey, i think we are about to finish the 3.x migration in Amadeus

Sergey Auseyau December 2, 2020 at 1:59 PM

, hi. You are right (as always), the status from the protocol frame is not preserved inside retry queue, and is not available when we purge the command by time out. I added patch to preserve this code, so it will be accessible in next release: http://review.couchbase.org/c/libcouchbase/+/141361

Alexis DELTOUR November 27, 2020 at 1:06 PM
Edited

Hi ,

Apparently, i am not able to retrieve the status code if LCB error is LCB_ERR_AUTHENTICATION_FAILURE.

But it is working only if rc != LCB_ERR_AUTHENTICATION_FAILURE (cf. logs below with

Permission status code detected: 36 / PROTOCOL_BINARY_RESPONSE_EACCESS / 0x24)

logs with rc == LCB_ERR_AUTHENTICATION_FAILURE

=> retries occured and it seems status code /PROTOCOL_BINARY_RESPONSE_EACCESS/0x24 is lost:

same code for both

Alexis DELTOUR November 24, 2020 at 1:47 PM

We would like to differentiate authentication error (considered as fatal on our side) from permission (rbac) issue on operations, the second one is not throwing any exception (as it could be recoverable by tuning Rbac on server side). However we will try to use the error context on our side. Thx for the response.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Fix versions

Story Points

Reporter

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created November 15, 2020 at 4:17 PM
Updated February 10, 2021 at 10:39 AM
Resolved December 2, 2020 at 3:15 PM
Instabug