summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Ssh.hs
AgeCommit message (Collapse)Author
2015-12-05UncheckedProperty for cmdProperty et alJoey Hess
* Properties that run an arbitrary command, such as cmdProperty and scriptProperty are converted to use UncheckedProperty, since they cannot tell on their own if the command truely made a change or not. (API Change) Transition guide: - When GHC complains about an UncheckedProperty, add: `assume` MadeChange - Since these properties used to always return MadeChange, that change is always safe to make. - Or, if you know that the command should modifiy a file, use: `changesFile` filename * A few properties have had their Result improved, for example Apt.buldDep and Apt.autoRemove now check if a change was made or not.
2015-10-27Explicit Info/NoInfo for RevertableProperty (API change)Joey Hess
RevertableProperty used to be assumed to contain info, but this is now made explicit, with RevertableProperty HasInfo or RevertableProperty NoInfo. Transition guide: - If you define a RevertableProperty, expect some type check failures like: "Expecting one more argument to ‘RevertableProperty’". - Change it to "RevertableProperty NoInfo" - The compiler will then tell you if it needs "HasInfo" instead. - If you have code that uses the RevertableProperty constructor that fails to type check, use the more powerful <!> operator
2015-10-22re-export SshKeyTypeJoey Hess
2015-10-21Added Ssh properties to remove authorized_keys and known_hosts lines.Joey Hess
And use when reverting conductor property. Note that I didn't convert existing ssh properties to RevertablePropery because the API change was too annoying to work through.
2015-10-19improve Info type using GADT, at nomeata's suggestionJoey Hess
This makes Show Info work, and simplifies the implementation.
2015-10-18fix typo: propigate → propagateFelix Gruber
2015-10-16propellor spinJoey Hess
2015-10-16fix commentJoey Hess
2015-10-16propellor spinJoey Hess
2015-10-16improve ssh user key propertiesJoey Hess
* Ssh.keyImported is replaced with Ssh.userKeys. (API change) The new property only gets the private key from the privdata; the public key is provided as a parameter, and so is available as Info that other properties can use. * Ssh.keyImported' is renamed to Ssh.userKeyAt, and also changed to only import the private key from the privdata. (API change) * While Ssh.keyImported and Ssh.keyImported' avoided updating existing keys, the new Ssh.userKeys and Ssh.userKeyAt properties will always update out of date key files. * Ssh.pubKey renamed to Ssh.hostPubKey. (API change) This makes eg, setting up ssh for spin controllers work better.
2015-10-10propellor spinJoey Hess
2015-09-14clean up privdata excess/lacking newline issueJoey Hess
* PrivData converted to newtype (API change). * Stopped stripping trailing newlines when setting PrivData; this was previously done to avoid mistakes when pasting eg passwords with an unwanted newline. Instead, PrivData consumers should use either privDataLines or privDataVal, to extract respectively lines or a value (without internal newlines) from PrivData.
2015-09-10Simplify Propellor.Property.Ssh.pubKey.Mario Lang
2015-09-10Fix two typos.Mario Lang
2015-09-06Added Propellor.Property.Rsync. WIP; untestedJoey Hess
Convert Info to use Data.Dynamic, so properties can export and consume info of any type that is Typeable and a Monoid, including data types private to a module. (API change) Thanks to Joachim Breitner for the idea.
2015-07-20Ssh.permitRootLogin type changed to allow configuring WithoutPassword and ↵Joey Hess
ForcedCommandsOnly (API change) * Ssh.permitRootLogin type changed to allow configuring WithoutPassword and ForcedCommandsOnly (API change) * setSshdConfig type changed, and setSshdConfigBool added with old type.
2015-05-27Export CommandParam, boolSystem, safeSystem and shellEscape from ↵Joey Hess
Propellor.Property.Cmd, so they are available for use in constricting your own Properties when using propellor as a library. Several imports of Utility.SafeCommand now redundant.
2015-04-23propellor spinJoey Hess
2015-04-22API change: Added User and Group newtypes, and Properties that used to use ↵Joey Hess
the type UserName = String were changed to use them. Note that UserName is kept and PrivData still uses it in its sum type. This is to avoid breaking PrivData serialization.
2015-04-09remove ssh key from desc, too longJoey Hess
2015-03-11propellor spinJoey Hess
2015-02-12ssh user perm fixesJoey Hess
* Ssh.authorizedKey: Make the authorized_keys file and .ssh directory be owned by the user, not root. * Ssh.knownHost: Make the .ssh directory be owned by the user, not root.
2015-02-10propellor spinJoey Hess
2015-02-10propellor spinJoey Hess
2015-02-01propellor spinJoey Hess
2015-01-24GADT properties seem to work (untested)Joey Hess
* Property has been converted to a GADT, and will be Property NoInfo or Property HasInfo. This was done to make sure that ensureProperty is only used on properties that do not have Info. Transition guide: - Change all "Property" to "Property NoInfo" or "Property WithInfo" (The compiler can tell you if you got it wrong!) - To construct a RevertableProperty, it is useful to use the new (<!>) operator - Constructing a list of properties can be problimatic, since Property NoInto and Property WithInfo are different types and cannot appear in the same list. To deal with this, "props" has been added, and can built up a list of properties of different types, using the same (&) and (!) operators that are used to build up a host's properties.
2015-01-19avoid haddock warningsJoey Hess
2015-01-04DNS records for hosts with known ssh public keys now automatically include ↵Joey Hess
SSHFP records.
2015-01-04Fix bug that prevented deploying ssh host keys when the file for the key ↵Joey Hess
didn't already exist. This is not a new bug.
2015-01-04avoid ever removing all host keysJoey Hess
2015-01-04propellor spinJoey Hess
2015-01-04propellor spinJoey Hess
2015-01-04propellor spinJoey Hess
2015-01-04Ssh.hostKey and Ssh.hostKeys no longer install public keys from the privdata.Joey Hess
Instead, the public keys of a host should be set using Ssh.pubKey.
2015-01-04Ssh.hostKeys now also installs any available SshEd25519 keys.Joey Hess
2015-01-04sshPubKey is renamed to Ssh.pubKey, and has an added SshKeyType parameter.Joey Hess
2015-01-04sshPubKey is renamed to Ssh.pubKeyJoey Hess
2014-12-14broke up big function to describe PrivDataFieldJoey Hess
2014-12-07more uses for hostContextJoey Hess
2014-12-07Fixed privdata introspection for User.hasPassword and User.hasSomePasswordJoey Hess
This is not a complete fix for the problem that Info doen't propigate from the called property when code does something like: do hostname <- asks hostName ensureProperty $ foo hostname Instead, I just eliminated the need to implement hasPassword that way, by making the PrivData Info use a HostContext which automatically gets the right hostname passed to it. All other uses of withPrivData don't have the problem. It's still possible for the user to run into the problem if they write something like the above, where foo is a property that uses privdata. However, all properties that take a Context now also accept a HostContext, so it's at least less likely the user needs to write that.
2014-11-24move property to ssh moduleJoey Hess
2014-10-08fix some accidental uses of spaces, rather than tabs, for indentationJoey Hess
2014-09-23use Daemon.restarted consistently, and implement using Service.restartedJoey Hess
2014-08-21propellor spinJoey Hess
2014-07-23propellor spinJoey Hess
2014-07-23propellor spinJoey Hess
2014-07-07propellor spinJoey Hess
2014-07-06propellor spinJoey Hess
2014-07-05propellor spinJoey Hess
2014-07-05propellor spinJoey Hess