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

Add applyTo to Credentials #407

Merged
merged 1 commit into from
Feb 19, 2021
Merged

Conversation

carolynvs
Copy link
Contributor

Allow restricting a credential to a list of actions, just like Parameters can do today. This allows a credential to not have to be
passed in for actions that do not use it.

Closes #366

Allow restricting a credential to a list of actions, just like
Parameters can do today. This allows a credential to not have to be
passed in for actions that do not use it.

Signed-off-by: Carolyn Van Slyck <[email protected]>
carolynvs added a commit to carolynvs/cnab-go that referenced this pull request Feb 17, 2021
Bundles may set the applyTo field on credentials. When it is set, only
require the credential when it applies to the specified action.

Implements cnabio/cnab-spec#407

Signed-off-by: Carolyn Van Slyck <[email protected]>
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

LGTM. As this is additive (and optional), we should be good with a minor bump in the bundle spec when this is merged, right?

Copy link
Member

@radu-matei radu-matei left a comment

Choose a reason for hiding this comment

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

LGTM

@carolynvs
Copy link
Contributor Author

Correct, this doesn't change existing behavior when applyTo is not set. We talked about it in the CNAB meeting with Matt and Chris and agreed this is a minor spec change.

@carolynvs carolynvs merged commit 762e461 into cnabio:main Feb 19, 2021
@carolynvs carolynvs deleted the applyto-creds branch February 19, 2021 21:49
simongdavies pushed a commit to simongdavies/cnab-go that referenced this pull request Mar 31, 2021
Bundles may set the applyTo field on credentials. When it is set, only
require the credential when it applies to the specified action.

Implements cnabio/cnab-spec#407

Signed-off-by: Carolyn Van Slyck <[email protected]>
Copy link

@Atom14011985 Atom14011985 left a comment

Choose a reason for hiding this comment

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

😍😍

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.

Can we add applyTo to credentials too?
4 participants