Skip to content

[🐛 Bug]: Base64 adds new line for username and password #2435

@bartse

Description

@bartse

What happened?

The default max column for base64 is 76 characters. When using longer passwords in combination with a longer username I noticed this causes issues in the graphql health check.

The fix would be to add -w 0 option to base64 to override the max column. I dont think there would be any other impact of adding this option?

Below is the output of distributorProbe.sh script in debug mode

Command used to start Selenium Grid with Docker (or Kubernetes)

global:
  seleniumGrid:
    stdoutProbeLog: true
basicAuth:
  create: false
  enabled: true
  nameOverride: some-external-secret

Relevant log output

+ max_time=3
+ retry_time=3
+ probe_name=Probe.Liveness
+ ts_format=+%T.%3N
+ ROUTER_CONFIG_DIRECTORY=/opt/bin
++ bash /opt/bin/routerGraphQLUrl.sh
+ GRID_GRAPHQL_URL=http://x.x.x.x:4444/graphql
++ echo -n someusername:uH9AowM32F3tfudXefv3p3X4CkB23sTi22DyF4dQJ39S5uku7q
++ base64
+ BASIC_AUTH='c29tZXVzZXJuYW1lOnVIOUFvd00zMkYzdGZ1ZFhlZnYzcDNYNENrQjIzc1RpMjJEeUY0ZFFKMzlT
NXVrdTdx'
+ '[' -z http://x.x.x.x:4444/graphql ']'
++ curl --noproxy '*' -m 3 -k -X POST -H 'Authorization: Basic c29tZXVzZXJuYW1lOnVIOUFvd00zMkYzdGZ1ZFhlZnYzcDNYNENrQjIzc1RpMjJEeUY0ZFFKMzlT
NXVrdTdx' -H 'Content-Type: application/json' --data '{"query":"{ grid { sessionCount } }"}' -s -o /dev/null -w '%{http_code}' http://x.x.x.x:4444/graphql
+ GRAPHQL_PRE_CHECK=400
+ '[' 400 -ne 200 ']'
++ date +%T.%3N
+ echo '10:33:35.211 DEBUG [Probe.Liveness] - GraphQL endpoint http://x.x.x.x:4444/graphql is not reachable. Status code: 400.'
10:33:35.211 DEBUG [Probe.Liveness] - GraphQL endpoint http://x.x.x.x:4444/graphql is not reachable. Status code: 400.
+ exit 1

Operating System

Kubernetes(EKS)

Docker Selenium version (image tag)

4.25.0-20241010

Selenium Grid chart version (chart version)

0.36.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions