-
Notifications
You must be signed in to change notification settings - Fork 178
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
auth support for tls endpoint #164
Conversation
4b12c06
to
c09cba5
Compare
c09cba5
to
bf2743e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🎉
Not so sure about the env
scheme, especially since we support other arguments using with
- is there a reason we couldn't put node authentication details there, using a nodes
field? It feels a little inconsistent to have to track multiple arguments over different fields.
Potentially we could use that for specifying platforms
per node as well? I think I'm imagining something that's like the refactoring of output in #162, but for the inputs instead.
docs/advanced/auth.md
Outdated
@@ -0,0 +1,101 @@ | |||
# Authentication to a remote node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the page title, since the remote driver works without authentication - we probably don't want to promote using unauthenticated TCP connections, but it's allowed, and for a setup that runs buildkitd and buildctl on the same CI machine, it seems like a reasonable deployment?
Unrelated, but we should also mention the docker-container://
scheme here, happy to do that as a follow-up later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's allowed, and for a setup that runs buildkitd and buildctl on the same CI machine, it seems like a reasonable deployment?
Yes but don't think users want to set up a local buildkit instance on an ephemeral GitHub Runner? I think they prefer to use this action to create a BuildKit container.
Unrelated, but we should also mention the
docker-container://
scheme here, happy to do that as a follow-up later.
Yes sounds good. I guess it would use a context that connects to a remote docker engine instance?
Don't think there is a better alternative. Using
We could change the format but ssh keys and client certs are multi line values and we can't read secrets directly in the action with the current API 😞 |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
bf2743e
to
1a6cf9b
Compare
@tonistiigi As discussed, I removed the SSH authentication handling in the action as it would tamper the local machine when modifying the SSH configuration. Also updated the docs to show how to set up SSH auth using a third-party action instead. |
needs #163Adds authentication support for
tls://
endpoint (and docs to also set up SSH auth).To ease the integration in a workflow, environment variables are used to avoid registered inputs in the action for each node (see #165). You need to add the following environment variables to set up TLS authentication with the BuildKit client certificates:
BUILDER_NODE_<idx>_AUTH_TLS_CACERT
BUILDER_NODE_<idx>_AUTH_TLS_CERT
BUILDER_NODE_<idx>_AUTH_TLS_KEY
Where
<idx>
is the position of the node in the list of nodes. The index should always be0
at the moment as we don't support (yet) appending new nodes with this action.