pallet.core.user documentation

User for authentication.

*admin-user*

var

The admin user is used for running remote admin commands that require root permissions. The default admin user is taken from the pallet.admin.username property. If not specified then the user.name property is used. The admin user can also be specified in config.clj when running tasks from the command line.

->User

fn

[username public-key-path private-key-path public-key private-key passphrase password sudo-password no-sudo sudo-user state-root state-group]

Positional factory function for class pallet.core.user.User.

default-private-key-path

fn

[]

Return the default private key path.

default-public-key-path

fn

[]

Return the default public key path

effective-username

fn

[{:keys [no-sudo sudo-user username]}]

Return the effective username for a user. This is the :sudo-user, unless :no-sudo is set, in which case it is just the :username.

make-user

fn

[username {:keys [public-key-path private-key-path public-key private-key passphrase password sudo-password no-sudo sudo-user state-root state-group], :as options}]

Creates a User record with the given username and options. Generally used in conjunction with admin-user and pallet.api/with-admin-user, or passed to lift or converge as the named :user argument.

Options:

:public-key-path : path string to public key file

:private-key-path : path string to private key file

:public-key : public key as a string or byte array

:private-key : private key as a string or byte array

:passphrase : passphrase for private key

:password : ssh user password

:sudo-password : password for sudo (defaults to :password)

:sudo-user : the user to sudo to

:no-sudo : flag to not use sudo (e.g. when the user has root privileges).

:state-root : directory on target to use for pallet state files. Defaults to /var/lib/pallet.

:state-group : group shared between admin user and sudo-user. Used when uploading files. Needed only if the sudo user is unprivileged, and the admin user can't chown/chgrp files.

map->User

fn

[m__5665__auto__]

Factory function for class pallet.core.user.User, taking a map of keywords to field values.

obfuscated-passwords

fn

[user]

Return a user with obfuscated passwords