Skip to content

Allow any sensitive type so that Sensitive(Deferred(...)) values can be passed to concat::fragment #824

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nrhall
Copy link

@nrhall nrhall commented May 2, 2025

Summary

Providing Sensitive(Deferred(...)) inputs to concat::fragment (where the deferred function returns a String) does not work in concat::fragment.

Additional Context

Given that Deferred types do work, it seems reasonable to allow these to also be Sensitive so you can handle things like secrets from Vault, or Sensitive deferred templates - however currently, concat::fragment only allows Sensitive[String], which can't be determined at compile time when there's a Deferred function to resolve.

This PR generalises it to allow just Sensitive; I appreciate this weakens the type-checking slightly, but allowing Deferred already seems to have similar issues (because you can't tell that it's a Deferred[String]), so hopefully this is acceptable.

Checklist

  • 🟢 Spec tests.
  • [ x ] 🟢 Acceptance tests.
  • [ x ] Manually verified. (For example puppet apply)

@nrhall nrhall requested review from b4ldr, bastelfreak, ekohl, smortex and a team as code owners May 2, 2025 16:48
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@amitkarsale amitkarsale force-pushed the halln-fix-sensitive branch from f99b041 to 1b322c4 Compare May 14, 2025 06:55
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