| vault_client_auth {vaultr} | R Documentation |
Vault Authentication Configuration
Description
Vault Authentication Configuration
Vault Authentication Configuration
Details
Interact with vault's authentication backends.
Super class
vaultr::vault_client_object -> vault_client_auth
Public fields
approleInteract with vault's AppRole authentication. See
vault_client_auth_approlefor more information.githubInteract with vault's GitHub authentication. See
vault_client_auth_githubfor more information.tokenInteract with vault's token authentication. See
vault_client_tokenfor more information.userpassInteract with vault's username/password based authentication. See
vault_client_auth_userpassfor more information.ldapInteract with vault's LDAP based authentication. See
vault_client_auth_ldapfor more information.
Methods
Public methods
Inherited methods
Method new()
Create a vault_client_auth object. Not typically
called by users.
Usage
vault_client_auth$new(api_client)
Arguments
api_clientA vault_api_client object
Method backends()
Return a character vector of supported
authentication backends. If a backend x is present, then
you can access it with $auth$x. Note that vault calls
these authentication methods but we use backends here to
differentiate with R6 methods. Note that these are backends
supported by vaultr and not necessarily supported by the
server - the server may not have enabled some of these
backends, and may support other authentication backends not
directly supported by vaultr. See the $list() method to
query what the server supports.
Usage
vault_client_auth$backends()
Method list()
List authentication backends supported by the vault server, including information about where these backends are mounted.
Usage
vault_client_auth$list(detailed = FALSE)
Arguments
detailedLogical, indicating if detailed information should be returned
Method enable()
Enable an authentication backend in the vault server.
Usage
vault_client_auth$enable(type, description = NULL, local = FALSE, path = NULL)
Arguments
typeThe type of authentication backend (e.g.,
userpass,github,ldap)descriptionHuman-friendly description of the backend; will be returned by
$list()localSpecifies if the auth method is local only. Local auth methods are not replicated nor (if a secondary) removed by replication.
pathSpecifies the path in which to enable the auth method. Defaults to be the same as
type.
Method disable()
Disable an active authentication backend.
Usage
vault_client_auth$disable(path)
Arguments
pathThe path of the authentication backend to disable.
Examples
server <- vaultr::vault_test_server(if_disabled = message)
if (!is.null(server)) {
client <- server$client()
# List configured authentication backends
client$auth$list()
# cleanup
server$kill()
}