Bug 1868653 - Users with "@" character in their names can't start pipelines from web UI
Summary: Users with "@" character in their names can't start pipelines from web UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 4.6.0
Assignee: Andrew Ballantyne
QA Contact: spathak@redhat.com
URL:
Whiteboard:
: 1876547 (view as bug list)
Depends On:
Blocks: 1883342
TreeView+ depends on / blocked
 
Reported: 2020-08-13 12:12 UTC by Christian Passarelli
Modified: 2020-10-29 07:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: "Started By" is a metadata point added in 4.5 to help track between Trigger starts and manual starts through the UI. This was stored in the K8s "label" field on the PipelineRun. K8s Labels were used to hold onto the username; however K8s Labels have a very small subset of characters allowed. Consequence: Email-based usernames contain "@" which is not a valid K8s Label field value Fix: Move the "Started By" over to the K8s Annotation field, which is more freeform and allows for usernames that contain non-label valid characters Result: Resolves the issue that prevented the Pipeline from being started if the username was an email address.
Clone Of:
: 1883342 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:28:09 UTC
Target Upstream Version:


Attachments (Terms of Use)
Users with "@" character in their names can't start pipelines from web UI (101.19 KB, image/png)
2020-09-28 04:37 UTC, spathak@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6639 0 None closed Bug 1868653: Convert Pipeline StartedBy Label to Annotation 2020-11-10 10:47:06 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:28:26 UTC

Description Christian Passarelli 2020-08-13 12:12:43 UTC
Description of problem:
Starting pipelines from web ui and using users with "@" character in the name will fail with this error:

>Error "Invalid value: "username@domain.com": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')" for field "metadata.labels".

Version-Release number of selected component (if applicable):
Openshift Container Platform 4.5
OpenShift Pipelines Operator 1.0.1

Actions

How reproducible:
100% reproducible

Steps to Reproduce:
1. Create a pipeline
2. Try to start the pipeline from web UI by user that has "@" character in the name


Actual results:
Error "Invalid value: "username@domain.com": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')" for field "metadata.labels".

Expected results:
It should start

Additional info:
It prevents users in clusters that use google identity provider, or in general any user with "@" character in the name, to start pipelines.

Comment 3 David Sundqvist 2020-09-07 14:44:43 UTC
*** Bug 1876547 has been marked as a duplicate of this bug. ***

Comment 5 spathak@redhat.com 2020-09-28 04:37:29 UTC
Created attachment 1717186 [details]
Users with "@" character in their names can't start pipelines from web UI

Comment 6 spathak@redhat.com 2020-09-28 04:38:57 UTC
Verify on build version: 4.6.0-0.ci-2020-09-26-121704
Browser version: Chrome 84

Comment 8 Sergio G. 2020-10-07 08:26:45 UTC
Is this being backported to 4.5?

Comment 9 Andrew Ballantyne 2020-10-22 13:51:41 UTC
@sgarciam@redhat.com Yup, we have already had it merged in 4.5.z-stream. It's the linked "Blocks" ticket here: https://bugzilla.redhat.com/show_bug.cgi?id=1883342

Comment 11 errata-xmlrpc 2020-10-27 16:28:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196

Comment 12 Sergio G. 2020-10-29 07:03:30 UTC
Thanks for pointing me to the 4.5 link.


Note You need to log in before you can comment on or make changes to this bug.