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

deck should not assume authentication for logs #3407

Closed
0xmichalis opened this issue Jul 10, 2017 · 7 comments
Closed

deck should not assume authentication for logs #3407

0xmichalis opened this issue Jul 10, 2017 · 7 comments
Assignees
Labels
area/prow Issues or PRs related to prow

Comments

@0xmichalis
Copy link
Contributor

0xmichalis commented Jul 10, 2017

deck today uses basic auth for getting the logs from Jenkins (this assumes that Jenkins is setup with restricted access) whereas since it runs inside a pod, it can reuse its service account token to authenticate for accessing pod logs. Instead of requiring credentials for Jenkins (or any other external system), it should use a location accessible to it w/o auth where the logs are accessible for jobs of agent != "kubernetes", eg. GCS, S3, or maybe the Jenkins server is publicly available. Given that, we could get rid of all Jenkins-specific options and simply use a URL template in the prow config similar to what plank uses today for setting up github context (see #3223)

@spxtr @fejta thoughts

@0xmichalis
Copy link
Contributor Author

/area prow

@k8s-ci-robot k8s-ci-robot added the area/prow Issues or PRs related to prow label Jul 10, 2017
@0xmichalis
Copy link
Contributor Author

where the logs are accessible for jobs of agent != "kubernetes"

This may also be useful for pods, since the GC interval is tight enough (24h today) but artifacts are likely longer-living and pods need to push artifacts out to somewhere anyway.

@0xmichalis
Copy link
Contributor Author

Fixing this issue will also help in reusing ProwJobs for integrating any kind of external system by simply adding a new controller that will pick up plank's work for such external system, w/o having any external logic inside the core prow components.

@0xmichalis 0xmichalis changed the title deck should assume a public location for logs deck should not assume authentication for logs Jul 10, 2017
@spxtr
Copy link
Contributor

spxtr commented Aug 29, 2017

@spxtr @fejta thoughts

I agree, and using a URL template + a k8s service sounds like a reasonable idea.

@0xmichalis
Copy link
Contributor Author

Another option to not assuming auth that generically covers at least basic auth and token auth is to have an --external-config-path option where we mount a secret that contains http headers which are applied in deck on every request to the url template.

@0xmichalis
Copy link
Contributor Author

Yeah, now I think that the best option is to expose the log endpoint from the jenkins operator where we already have auth, and use a k8s service. Deck then gets a map of {agent -> url} from the config where we have {"jenkins": "jenkins-operator"} and proxies the request.

@0xmichalis
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prow Issues or PRs related to prow
Projects
None yet
Development

No branches or pull requests

3 participants