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

Add support for proxying services via GHA job services #41781

Open
fheinecke opened this issue May 20, 2024 · 0 comments
Open

Add support for proxying services via GHA job services #41781

fheinecke opened this issue May 20, 2024 · 0 comments
Labels
application-access feature-request Used for new features in Teleport, improvements to current should be #enhancements machine-id

Comments

@fheinecke
Copy link
Contributor

What would you like Teleport to do?

GitHub Actions supports running container images in the background to provide services to a workflow job. I would like to be able to proxy services behind Teleport using this GHA feature. Here's an example of what a workflow would look like:

jobs:
  publish:
    services:
      release-service:
        image: public.ecr.aws/gravitational/tbot-distroless:15.3.4
        env:
          TELEPORT_AUTH_SERVER: <auth server address>
          TELEPORT_BOT_TOKEN: <token>
        ports:
          - 443:8000
    steps:
      - name: Access the service
        curl https://localhost:8000/some/service-path

What problem does this solve?
It makes it easier to access services behind Teleport within GHA workflows. Additionally, this avoids writing the cert/key to the disk, which reduces the chance that they get leaked.

There are two technical reasons why this doesn't work today:

  • GHA does not support specifying a command/arg for a service, so the proxy subcommand can't be specified
  • tbot needs to authenticate with the Teleport control plane and/or service prior to starting the proxy. This would require an additional step which GHA does not support.

If a workaround exists, please include it.

Install tbot, authenticate with Teleport, write the certs to disk, and point the local tool at the certs (if supported).

@fheinecke fheinecke added the feature-request Used for new features in Teleport, improvements to current should be #enhancements label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-access feature-request Used for new features in Teleport, improvements to current should be #enhancements machine-id
Projects
None yet
Development

No branches or pull requests

2 participants