Skip to content

Conversation

Gijsreyn
Copy link
Contributor

PR Summary

This changeset only adds the extension secret schema.

PR Context

Partially addresses #1082

@michaeltlombardi
Copy link
Collaborator

@SteveL-MSFT - this looks correct to me from a docs perspective, just want the technical details double-checked.

Comment on lines +16 to +19
The secret operation is expected to output a single line to stdout containing
the secret text. If the extension outputs no data to stdout, DSC treats it as
"no secret returned". If the extension outputs multiple lines, DSC treats that
as an error.
Copy link
Member

Choose a reason for hiding this comment

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

We should probably expand on this a bit more:

  • Extensions MUST return the secret as a single line in plaintext with a zero exit code indicating success
  • If the secret does NOT exist, then the extension MUST return no output AND a zero exit code indicating no failure of the extension
  • If the extension cannot query/retrieve the secret (for example, needs the user to authenticate first), then the extension SHOULD return a detailed error message as a JSONLine to STDERR and MUST have a non-zero exit code

Copy link
Member

Choose a reason for hiding this comment

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

@michaeltlombardi can help with the actual proposed text


DSC expands structured entries as follows:

- `{ "nameArg": "<flag>" }` expands to `"<flag>", "<secret-name>"`.
Copy link
Member

Choose a reason for hiding this comment

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

@michaeltlombardi do we specify in other cases that the <flag> or parameter name MUST include any dashes, etc... as it's used verbatim?

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.

3 participants