KeyVault: filter out disabled secret while listing secret versions#1099
Conversation
weidongxu-microsoft
left a comment
There was a problem hiding this comment.
Is it typeConvertAsync fail for disabled secret?
|
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. |
|
@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); |
There was a problem hiding this comment.
What would be the difference if we create SecretBundle this way?
There was a problem hiding this comment.
The property secretBundle.value() will be NULL. For the enabled secrets, value will be returned by server side.
There was a problem hiding this comment.
That probably is acceptable. From our API user can know it is disabled, correct?
There was a problem hiding this comment.
I update the comments at Secret interface. Meanwhile, the status of enabled/disabled can be found via secret.attributes().enabled().
fix #1069