Skip to content

auth support for engine.#Pull - #1235

Merged
samalba merged 4 commits into
dagger:mainfrom
samalba:engine-pull-auth
Dec 17, 2021
Merged

samalba merged 4 commits into
dagger:mainfrom
samalba:engine-pull-auth

Conversation

@samalba

@samalba samalba commented Dec 16, 2021

Copy link
Copy Markdown
Contributor

This is just a start, still WIP.

I did not find a way yet to scope the auth to the engine call (everytime an auth field is process anywhere, it adds creds for a given target for the whole buildkit solver).

@aluzzardi I've setup a private alpine image for integration tests, but not sure how to pass the secret? Can I rely on the current dagger.#Secret implementation?

@samalba
samalba requested a review from aluzzardi December 16, 2021 04:02
@netlify

netlify Bot commented Dec 16, 2021 •

Copy link
Copy Markdown

@aluzzardi

Copy link
Copy Markdown
Contributor

@samalba We currently support secret env and secret files, but that's clearly not good enough (perhaps @talentedmrjones can chime in regarding SOPS support through exec).

However, it's bad because you'd have to commit those secrets in plaintext. Workarounds:

  • Use secret env and add the secret as a GH secret, export it to env through the GH workflow
  • Use secret file and gitcrypt

@shykes

shykes commented Dec 16, 2021

Copy link
Copy Markdown
Contributor

I did not find a way yet to scope the auth to the engine call (everytime an auth field is process anywhere, it adds creds for a given target for the whole buildkit solver).

I can confirm that there is currently no way to do this. So initially our API will not perfectly match buildkit’s behavior. But the good news is that the buildkit devs are OK to add the capability in the future :) See moby/buildkit#2472

Comment thread plan/task/pull.go Resolved
Comment thread plan/task/pull.go Resolved
@samalba

samalba commented Dec 17, 2021 •

Copy link
Copy Markdown
Contributor Author

Updated the PR with integration tests + secrets support. Ready for review.

@samalba samalba changed the title WIP: auth support for engine.#Pull auth support for engine.#Pull Dec 17, 2021
Comment thread tests/tasks/pull/pull_auth.cue Resolved
@samalba

samalba commented Dec 17, 2021

Copy link
Copy Markdown
Contributor Author

flaky CI on website tests. Merging.

@samalba
samalba merged commit 580c2b6 into dagger:main Dec 17, 2021
@samalba
samalba deleted the engine-pull-auth branch December 17, 2021 19:19
@samalba samalba mentioned this pull request Dec 21, 2021
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.

3 participants