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

*: remove dependency on capnslog #95

Merged
merged 1 commit into from
Aug 16, 2016
Merged

Conversation

ericchiang
Copy link
Collaborator

capnslog hijacks the standard loggers as an import side effect. For
some reason in dex this is causing the standard logger to not log
anything. For example net/http just swallows panics in handlers
without printing stack traces.

I'm having trouble tracking this down in dex, but removing the
capnslog's logging hijacker init() fixed this, so we're just going
to remove the dependency altogether. Importing go-oidc shouldn't
alter the standard logger anyway.

capnslog hijacks the standard loggers as an import side effect. For
some reason in dex this is causing the standard logger to not log
anything. For example net/http just swallows panics in handlers
without printing stack traces.

I'm having trouble tracking this down in dex, but removing the
capnslog's logging hijacker init() fixed this, so we're just going
to remove the dependency altogether. Importing go-oidc shouldn't
alter the standard logger anyway.
func (l *LoggingMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.Infof("HTTP %s %v", r.Method, r.URL)
l.Next.ServeHTTP(w, r)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more than just a log implementation change. Why remove the middleware?
I'm ok with this if it wasn't being used (likely).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. We're not using it in dex.
  2. This implementation is tied to the capnslog package so it seemed reasonable to remove as part of this diff. It's basically a "log to capnslog middleware"

@sym3tri
Copy link
Contributor

sym3tri commented Aug 16, 2016

otherwise LGTM

@ericchiang
Copy link
Collaborator Author

cool, merging

@ericchiang ericchiang merged commit 1efe0e1 into coreos:master Aug 16, 2016
ericchiang added a commit to ericchiang/kubernetes that referenced this pull request Aug 26, 2016
This change updates the github.com/coreos/go-oidc package.

Notable changes:

- Throw out JWTs with invalid claims early (coreos/go-oidc#97, brougt up in kubernetes#30457)
- Remove the capnslog dependency (coreos/go-oidc#95)
- Support for Azure AD oddities (coreos/go-oidc#87)
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Sep 12, 2016
Automatic merge from submit-queue

vendor: update github.com/coreos/go-oidc client package

This change updates the github.com/coreos/go-oidc package to it's latest commit
(since we don't version that package).

Notable changes:

- Throw out JWTs with invalid claims early (coreos/go-oidc#97, brougt up in #30457)
- Remove the capnslog dependency (coreos/go-oidc#95)
- Support for Azure AD oddities (coreos/go-oidc#87)

cc @kubernetes/sig-auth
lukaszraczylo pushed a commit to lukaszraczylo/go-oidc that referenced this pull request Apr 13, 2024
capnslog hijacks the standard loggers as an import side effect. For
some reason in dex this is causing the standard logger to not log
anything. For example net/http just swallows panics in handlers
without printing stack traces.

I'm having trouble tracking this down in dex, but removing the
capnslog's logging hijacker init() fixed this, so we're just going
to remove the dependency altogether. Importing go-oidc shouldn't
alter the standard logger anyway.
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