This commit is contained in:
Hong Ooi 2019-05-10 10:14:36 +10:00
Родитель e5ddbb490b
Коммит 57a40cf6da
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand # Generated by roxygen2: do not edit by hand
S3method(print,cert_policy) S3method(print,cert_policy)
S3method(print,secret_value)
S3method(print,vault_access_policy) S3method(print,vault_access_policy)
export(AzureKeyVault) export(AzureKeyVault)
export(az_key_vault) export(az_key_vault)

Просмотреть файл

@ -71,6 +71,14 @@ public=list(
value=NULL, value=NULL,
contentType=NULL, contentType=NULL,
initialize=function(...)
{
super$initialize(...)
# basic obfuscation of value to help mitigate shoulder-surfing
class(self$value) <- "secret_value"
},
list_versions=function() list_versions=function()
{ {
lst <- lapply(get_vault_paged_list(self$do_operation("versions", version=NULL), self$token), function(props) lst <- lapply(get_vault_paged_list(self$do_operation("versions", version=NULL), self$token), function(props)
@ -99,3 +107,11 @@ public=list(
invisible(self) invisible(self)
} }
)) ))
#' @export
print.secret_value <- function(x, ...)
{
cat("<hidden>\n")
invisible(x)
}