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

chore: allow overriding the default SSO callback listener for docker integration #21346

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Shaked
Copy link

@Shaked Shaked commented Jan 2, 2025

By default argocd creates an SSO callback listener address to localhost (127.0.0.1), which means that within a docker container, the only way to map this address from the host into the port, and allow the callback to work, requires the installation of socat and running socat TCP4-LISTEN:8086,fork TCP4:127.0.0.1:8085 & within the container.

This PR allows using argocd login sso via a docker container by changing the callback listener address. For example:

./dist/argocd login argocd.example.com --sso-listener-address "0.0.0.0" --sso --loglevel debug
WARN[0002] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web.
DEBU[0003] OIDC Configuration:
DEBU[0003]   supported_scopes: [openid email groups profile offline_access]
DEBU[0003]   response_types_supported: [code]
Performing authorization_code flow login: REDACTED
Opening system default browser for authentication
DEBU[0004] Listen: 0.0.0.0:8085

Might be related to #4424

Checklist:

  • [c] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • [y] Does this PR require documentation updates?
  • [y] I've updated documentation as required by this PR.
  • [y] I have signed off all my commits as required by DCO
  • [y] My new feature complies with the feature status guidelines.
  • [y] I have added a brief description of why this PR is necessary and/or what this PR solves.

@Shaked Shaked requested review from a team as code owners January 2, 2025 10:36
Copy link

bunnyshell bot commented Jan 2, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Shaked added 2 commits January 2, 2025 12:43
this allows using argocd login sso via a docker container

Signed-off-by: Shaked Klein Orbach <[email protected]>
this allows using argocd login sso via a docker container

Signed-off-by: Shaked Klein Orbach <[email protected]>
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 27.77778% with 13 lines in your changes missing coverage. Please review.

Project coverage is 55.21%. Comparing base (8126508) to head (1d90787).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/login.go 0.00% 12 Missing ⚠️
cmd/argocd/commands/relogin.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21346      +/-   ##
==========================================
+ Coverage   55.19%   55.21%   +0.01%     
==========================================
  Files         337      337              
  Lines       57058    57063       +5     
==========================================
+ Hits        31496    31510      +14     
+ Misses      22863    22856       -7     
+ Partials     2699     2697       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

1 participant