Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bartse opened this issue Oct 21, 2024 · 3 comments
Open

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

bartse opened this issue Oct 21, 2024 · 3 comments

Comments

@bartse
Copy link

bartse commented Oct 21, 2024

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

Copy link

@bartse, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

This is an interesting case that I have yet to think about. Let me do a check and update all scripts could be impacted!

@bartse
Copy link
Author

bartse commented Oct 21, 2024

It definitely is a corner case 😬 . Thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants