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

introduce marhsaller options and ability to include secrets content #714

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Nov 22, 2024

This allows to export secret content in yaml output, to be consumed by third-party tools which rely on canonical compose model and need all data resolved. Still, default marshalling output does not include content as this would introduce risk to leak sensitive data

@ndeloof ndeloof requested a review from glours November 22, 2024 09:19
Copy link
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

types/types.go Outdated
File string `yaml:"file,omitempty" json:"file,omitempty"`
Environment string `yaml:"environment,omitempty" json:"environment,omitempty"`
Content string `yaml:"content,omitempty" json:"content,omitempty"`
marshallContent bool // configure marshalling to include Content - excluded by default to prevent sensitive data leaks
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be public, no?

Suggested change
marshallContent bool // configure marshalling to include Content - excluded by default to prevent sensitive data leaks
MarshallContent bool // configure marshalling to include Content - excluded by default to prevent sensitive data leaks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope, so that the only way to set this is to use the mashaller option (this is just an implementation detail here, as yaml.Marshall does not allow passing options or custom marshallers)

@ndeloof ndeloof force-pushed the marshall_secret_content branch from 719af73 to fd684e5 Compare November 25, 2024 10:04
@ndeloof ndeloof merged commit df253f2 into compose-spec:main Nov 25, 2024
8 checks passed
@ndeloof ndeloof deleted the marshall_secret_content branch November 25, 2024 10:15
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.

2 participants