Skip to content

feat: implement host.setSecretFile() to securely set binary files as secrets - #5500

Merged
helderco merged 3 commits into
dagger:mainfrom
grouville:binary-secret
Jul 28, 2023
Merged

helderco merged 3 commits into
dagger:mainfrom
grouville:binary-secret

Conversation

@grouville

@grouville grouville commented Jul 20, 2023 •

Copy link
Copy Markdown
Member

Fixes #5069

Problem

Some users need to set binary files or non UTF-8 files (GPG keys for example) as secrets.

Solution

This PR implements a new API endpoints enabling a safe mount of those secrets without leaking information in any layer. (context starting from this comment: #5069 (comment))

Open question

Do we scope the host access to the project workdir, as other host APIs: https://github.com/dagger/dagger/blob/main/core/integration/host_test.go#L165-L172 ?

@grouville grouville changed the title feat: implement host.setSecretFile() method to securely mount binary … feat: implement host.setSecretFile() method to securely set binary files as secrets Jul 20, 2023
@grouville grouville changed the title feat: implement host.setSecretFile() method to securely set binary files as secrets feat: implement host.setSecretFile() to securely set binary files as secrets Jul 20, 2023
@grouville
grouville marked this pull request as ready for review July 20, 2023 15:02
@grouville
grouville force-pushed the binary-secret branch 2 times, most recently from 76d82c8 to 449626d Compare July 24, 2023 15:25
@grouville

Copy link
Copy Markdown
Member Author

cc @helderco, as #5502 works (manually tested + context on PR), and given the fact that the current PR has only a 512000 bytes limitation, you can review this one 👍

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Noticed a resource leak (leaving an *os.File open), otherwise LGTM!

Comment thread core/schema/host.go Resolved
@grouville
grouville requested a review from vito July 27, 2023 10:22
grouville and others added 3 commits July 27, 2023 23:39
…files

Solves binary data issue (dagger#5069):
Some users need to mount binary files or non UTF-8 files (GPG keys for example) as secrets.
This PR implements a new API endpoints enabling a safe mount of those secrets without leaking information in any layer.

Signed-off-by: grouville <[email protected]>
Add Changie's changelogs

Signed-off-by: grouville <[email protected]>
@helderco
helderco merged commit 09677c0 into dagger:main Jul 28, 2023
@gerhard gerhard added this to the 0.8.0 BREAKING CHANGES RELEASE milestone Aug 2, 2023
@gerhard

This comment was marked as resolved.

@grouville

This comment was marked as resolved.

@gerhard

This comment was marked as resolved.

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.

Handling Binary Data

4 participants