Skip to content

KeyVault: filter out disabled secret while listing secret versions#1099

Merged
xseeseesee merged 3 commits into
masterfrom
fix-key-vault
Mar 19, 2020
Merged

KeyVault: filter out disabled secret while listing secret versions#1099
xseeseesee merged 3 commits into
masterfrom
fix-key-vault

Conversation

@xseeseesee

@xseeseesee xseeseesee commented Mar 13, 2020

Copy link
Copy Markdown
Contributor

fix #1069

@weidongxu-microsoft weidongxu-microsoft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it typeConvertAsync fail for disabled secret?

@yungezz

yungezz commented Mar 13, 2020

Copy link
Copy Markdown
Member

thanks @xccc-msft , could you pls link original issue in PR description? thanks. Is the error user saw a by design service behavior? because I saw you add a filter in fluent layer.

@xseeseesee

Copy link
Copy Markdown
Contributor Author

@weidongxu-microsoft @yungezz The server is returning msg with "message=Operation get is not allowed on a disabled secret." so I just add the filter now.

.withAttributes(secretItem.attributes())
.withContentType(secretItem.contentType())
.withTags(secretItem.tags());
return ServiceFuture.fromBody(Observable.just(secretBundle), null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What would be the difference if we create SecretBundle this way?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The property secretBundle.value() will be NULL. For the enabled secrets, value will be returned by server side.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That probably is acceptable. From our API user can know it is disabled, correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I update the comments at Secret interface. Meanwhile, the status of enabled/disabled can be found via secret.attributes().enabled().

@xseeseesee xseeseesee closed this Mar 16, 2020
@xseeseesee xseeseesee reopened this Mar 16, 2020
@xseeseesee xseeseesee closed this Mar 17, 2020
@xseeseesee xseeseesee reopened this Mar 17, 2020
@xseeseesee xseeseesee closed this Mar 18, 2020
@xseeseesee xseeseesee reopened this Mar 18, 2020
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.

[BUG] Key Vault secret versions no longer list if at least one version is disabled

3 participants