Skip to content

Issue #351 - forward dex error message to login page#425

Merged
alexmt merged 2 commits intoargoproj:masterfrom
alexmt:351-dex-error-message
Jul 17, 2018
Merged

Issue #351 - forward dex error message to login page#425
alexmt merged 2 commits intoargoproj:masterfrom
alexmt:351-dex-error-message

Conversation

@alexmt
Copy link
Copy Markdown
Collaborator

@alexmt alexmt commented Jul 17, 2018

No description provided.

util/dex/dex.go Outdated
// also be /api/dex (e.g. issuer: https://argocd.example.com/api/dex)
func NewDexHTTPReverseProxy() func(writer http.ResponseWriter, request *http.Request) {
messageRe, err := regexp.Compile(`<p>(.*)([\s\S]*?)<\/p>`)
errors.CheckError(err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move the regexp.Compile into a package level var

var messgeRe = regexp.MustCompile(`<p>(.*)([\s\S]*?)<\/p>`)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

target, err := url.Parse(DexReverseProxyAddr)
errors.CheckError(err)
proxy := httputil.NewSingleHostReverseProxy(target)
proxy.ModifyResponse = func(resp *http.Response) error {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! didn't know they had a ModifyResponse function.

util/dex/dex.go Outdated

"regexp"

"html"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please put standard lib imports at top

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@alexmt alexmt merged commit 6124ab1 into argoproj:master Jul 17, 2018
@alexmt alexmt deleted the 351-dex-error-message branch July 17, 2018 21:48
dudinea added a commit to dudinea/argo-cd that referenced this pull request Sep 21, 2025
* chore: sync all codefresh code changes into v3.0.2 (argoproj#397)

* chore: sync all codefresh code changes into v3.0.2 without event-reporter related changes

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* removed cf script

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* upgraded git-lfs to 3.6.1 in Dockerfile (argoproj#386)

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* fixed webstorm go.mod issue

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* e2e: improved error logs

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* fixed changes on generated files

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* chore: replace heptio-images with argocd-e2e-container (argoproj#23040)

Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Nitish Kumar <justnitish06@gmail.com>

(cherry picked from commit 309acd1)
Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* feat: upgraded github.com/expr-lang/expr from 0.16.9 to 0.17.0

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* e2e [TestTrackAppStateAndSyncApp / TestNewStyleResourceActionMixedOk / TestNewStyleResourceActionPermitted / TestNamespacedPermissions]: added wait for sync operation

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

---------

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
# Conflicts:
#	.github/workflows/ci-build.yaml
#	cmd/argocd/commands/app_test.go
#	go.mod
#	go.sum
#	manifests/base/kustomization.yaml
#	manifests/core-install-with-hydrator.yaml
#	manifests/core-install.yaml
#	manifests/core-install/kustomization.yaml
#	manifests/ha/base/kustomization.yaml
#	manifests/ha/install-with-hydrator.yaml
#	manifests/ha/install.yaml
#	manifests/ha/namespace-install-with-hydrator.yaml
#	manifests/ha/namespace-install.yaml
#	manifests/install-with-hydrator.yaml
#	manifests/install.yaml
#	manifests/namespace-install-with-hydrator.yaml
#	manifests/namespace-install.yaml
#	pkg/apiclient/application/application.pb.go
#	pkg/apiclient/application/application.pb.gw.go
#	pkg/apis/application/v1alpha1/generated.pb.go
#	reposerver/apiclient/mocks/RepoServerServiceClient.go
#	reposerver/apiclient/repository.pb.go
#	server/application/application.proto
#	util/git/mocks/Client.go

* fix(validateDestination query): as we moved to argo.GetDestinationCluster, we can simply rely on error returned from this request (argoproj#405)

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>

* removed curl from image (argoproj#406)

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* feat: Add GitHub API metrics (argoproj#404)

* added github api metrics

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* fix(docs): fix applicationsetcontroller.enable.github.api.metrics to false in docs cm (argoproj#23516)

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* fix: Account for batch event processing in e2e tests (argoproj#22356)

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

---------

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Co-authored-by: Andrii Korotkov <137232734+andrii-korotkov-verkada@users.noreply.github.com>

* cherry-pick 1b48f36 Upgrade ubuntu base image to latest 25.04 digest (argoproj#407)

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: dudinea <eugene.doudine@octopus.com>

* feat: CR-29912 manual cherry pick app set pr generator return 0 results if the repo does not exist (argoproj#409)

* manually added the changes

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* pull request functionality

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* pull request functionality

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

---------

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* feat: move pkg/exec in-tree and add fatal timeout upgrade with SIGKILL to ARGO_EXEC_TIMEOUT (argoproj#419)

* chore: move pkg/exec in-tree (argoproj#22175) (argoproj#22460)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix: add fatal timeout upgrade with SIGKILL to ARGO_EXEC_TIMEOUT (closes argoproj#20785, argoproj#18478) (argoproj#22713)

Signed-off-by: Hazel Sudzilouski <dsudzilouski@olin.edu>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Hazel Sudzilouski <dsudzilouski@olin.edu>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Hazel Sudzilouski <t-danielsu@microsoft.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>

* feat: CR-30512 stop using bitnami images (argoproj#420)

* removed references from all the images except for astra healthcheck

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* removed reposerver/repository/testdata/helm-with-local-dependency/.argocd-helm-dep-up

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* reverted health check references since they are treated as text

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* reverted health check references since they are treated as text

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

---------

Signed-off-by: reggie-k <regina.voloshin@codefresh.io>

* chore: bumps redis to 8.x (argoproj#422)

* bumps Docker test container to redis 8

* bumps redis version to 8.2.1

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* use a previous version of go-redis

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

---------

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* upgrade sqlite in docker image to address CVE-2025-6965 (argoproj#425)

* final changes after rebase

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* final changes after rebase

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* address new linter issues

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

---------

Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Hazel Sudzilouski <dsudzilouski@olin.edu>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Co-authored-by: Oleksandr Saulyak <oleksandr.saulyak@octopus.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: Andrii Korotkov <137232734+andrii-korotkov-verkada@users.noreply.github.com>
Co-authored-by: dudinea <eugene.doudine@octopus.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Hazel Sudzilouski <t-danielsu@microsoft.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
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.

2 participants