зеркало из https://github.com/Azure/AzureKeyVault.git
implement basic secret obfusc
This commit is contained in:
Родитель
e5ddbb490b
Коммит
57a40cf6da
|
@ -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)
|
||||||
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче