json-schema-vocabularies icon indicating copy to clipboard operation
json-schema-vocabularies copied to clipboard

"secret" keyword

Open handrews opened this issue 8 years ago • 2 comments

Originally suggested by @chrisdostert in json-schema-org/json-schema-spec#249

Currently, it is more likely that a writeOnly keyword will go in the main spec, but a presentation-oriented secret keyword would also be of use on top of that. It would cover obscuring the data in form input, logs, etc.

handrews avatar Oct 18 '17 21:10 handrews

Reopening as the old spec repository issue had several things in it including both writeOnly and secret and was closed when the writeOnly keyword was added. secret is still a useful proposal, corresponding roughly to OpenAPI's "format": "password", except without the problem of having anything to do with format.

handrews avatar Jan 16 '20 00:01 handrews

OpenKAT has chosen to implement a secret keyword, similar to the required keyword for the following usecase: Some fields are secrets and should be handles as such based on the user interacting with that data. for us, Users do not have rights to see secret fields. Other users with more rights (installation admins, redteamers) do have a right to see the secrets, and if needed change them. A WriteOnly property does not quit cover the usecase, as that would imply no-one could re-use an already present secret easily when making partial changes to the data covered by the schema.

underdarknl avatar Oct 24 '23 12:10 underdarknl