[BP 7.0.4-49706]: Eventing functions lose auth on save

Description

Eventing credentials for url bindings are lost in a few different ways.
The first way i observed them being lost is when upgrading a cluster from 6.6.2 to 7.0.2. Upon upgrading, all the credentials are changed to '*****'. The upgrade was done while the eventing function was undeployed because of so it hasn't been observed with an upgrade whilst eventing is running.
With eventing functions on 7.0.2, changing any of the credentials with the function paused will only change that credential (one issue with this is if you don't delete the existing text such as when adding text to the end, the credential will have 5 *'s in it). It could be beneficial to clear the box when it is clicked the first time so a new credential can be input.
The main issue comes with when the function is undeployed. Editing any credentials whilst it is undeployed will cause all other credentials to change to '*****'. This means you need to input all credentials again when changing one of them.

An easy way to test this is to create an eventing function on a bucket with 1 document, create 2 url bindings both on `https://httpbin.org/anything/test`. One will be called 'bearer_hello` and the other `bearer_world`. Enable bearer authentication on both and put `hello` and `world` as the bearer token respectively. Then add the following code and test the above issues.

Components

Affects versions

Fix versions

Labels

Environment

Couchbase 7.0.2 in Docker and Kubernetes using CAO

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

is a backport of

Activity

Sujay Gad April 12, 2022 at 10:48 AM
Edited

Reproduced this issue using the steps mentioned in the bug description on 7.0.4 - 7237.
Verified the fix on Enterprise Edition 7.0.4 build 7253.

CB robot April 6, 2022 at 7:42 AM

Build couchbase-server-7.0.4-7239 contains eventing commit a433c9f with commit message:
backport : Use correct rest api for lifecycle operations

Perry Krug March 18, 2022 at 4:44 PM

This is a big issue for us to move C360 to 7.x as we have many URL endpoints with different credentials and this makes it impossible to add another or update one without re-entering the credentials for all.

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

Details

Assignee

Reporter

Is this a Regression?

Unknown

Triage

Untriaged

Operating System

MacOSX 64-bit

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created March 17, 2022 at 9:37 AM
Updated April 12, 2022 at 10:50 AM
Resolved April 6, 2022 at 6:39 AM
Instabug