Bug 1868653

Summary: Users with "@" character in their names can't start pipelines from web UI
Product: OpenShift Container Platform Reporter: Christian Passarelli <cpassare>
Component: Dev ConsoleAssignee: Andrew Ballantyne <aballant>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.5CC: aballant, aos-bugs, dsundqvi, jjanz, karsharm, nmukherj, sgarciam, spathak
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of:
: 1883342 (view as bug list) Environment:
Last Closed: 2020-10-27 16:28:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1883342    
Attachments:
Description Flags
Users with "@" character in their names can't start pipelines from web UI none

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": 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": 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 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.