-
Notifications
You must be signed in to change notification settings - Fork 99
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
Proposal: Add 'sensitive' designation to a bundle parameter to the spec #164
Comments
Should'nt sensitive information be passed as credentials instead of parameters ? (e.g. credentials are already identified as sensitive, and tools like Duffle do not store them in claims) |
@simonferquel we had that thought too, but that's not what the specification indicates. If we lookat the Credentials section, the following text appears:
Credentials, it seems, are intended to represent the identity of the person executing the bundle, while Parameters are intended for anything configuration related. I think that it's likely to be confusing to end users as is, so at a minimum maybe we need to add more explicit guidance/best practices. I think that if we intend for that conceptual separation, however, we really need a way for bundle authors to indicate that a parameter should be treated as a sensitive value. We're doing that in Porter at the moment, but it's not spec unfortunately.... |
I had the same confusion about credentials being the best place to put sensitive data and I bet pretty much everyone will do the same when they first use a bundle. It's really confusing. I'd like us to either revisit that if we can? Or if that isn't possible anymore and we have to live with that decision, then we really do need a sensitive flag on parameters since they are going to be a mixed bag of boring things like "verbose=10" and values that really need to be treated differently like "mydbpassword=carolynlovesponies". |
Given:
Is the spec not saying that all parameters should be treated by the runtime as if they had Are there platforms where the runtime really wants to treat |
To add to what @ijc is suggesting, take Kubernetes for an example. I always wondered why they added ConfigMaps after having Secrets. Why not just treat ALL params as secret, period? If there is a usecase, then I'd be in favor of adding |
I think This issue popped up because we added this in Porter. We bake in the manifest and then use it at runtime. We just added the capability to mask sensitive values from outputs. We're masking credentials by default and we're figuring out how to handle parameters and and outputs (porter step outputs, no bundle outputs yet). I had made an error in my bundle and included an invalid (whitespace) character in one of parameter values. I was able to pretty quickly figure out the error because I had flagged that parameter as not sensitive:
In this case, it's because I had a space in the I'm fine leaving this out of the spec, we can handle it within the runtime ourselves. |
Oh... actually, that makes sense to me. I could get behind that if what we're talking about is masking output, not necessarily suggesting storage techniques |
I think we should be more explicit about storage maybe.
|
Here is another run of the output with masking, just as an FYI for anyone:
Note host and password are marked as secure things, so we wiped them from the logs. |
My reasoning for avoiding MUST is that for a local-only system, it may make sense to not do encryption on at-rest... plus, some systems like Kubernetes can't do encryption at-rest by default, and Secrets really aren't all that secure. |
FWIW having Perhaps that |
Perhaps I am misreading the JSONSchema spec or the requirements of the proposed FWIW, we are also planning to implement this type of secret masking functionality in our own runtime. In a manner like what @ijc described, we are storing all of our parameter configuration in a secure store, sensitive or not. So, the only place we see an issue with plaintext parameters is if we want to display them to a user. We plan to enable some users with limited privileges to see some set of non-sensitive parameters, while allowing super-users access to the full set. I had thought that we would be able to do this with cc @youreddy |
@ryanmoran I think that makes sense! |
Although, it doesn't look like we added |
Yes. This looks like it was something we missed when we first landed the JSONSchema support. I opened #174 which adds the |
Closing this per #174 |
Sensitive means that we should *** out the value when printing to the console. WriteOnly means that the value shouldn't be printed out either, as established in cnabio/cnab-spec#164 (comment)
As bundle parameters consist of values intended for the deployed application, some of which may be sensitive in nature (secrets, passwords, etc.), I'm wondering if it would be prudent to add an additional
sensitive
attribute that can optionally be added to a given parameter definition, of typeboolean
? (Default would besensitive: false
)The text was updated successfully, but these errors were encountered: