Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit 5be99bf

Browse files
authored
Merge pull request #418 from jipperinbham/etcd-basic-auth
config: add etcd authentication
2 parents 5ba7046 + 518b456 commit 5be99bf

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

Documentation/cloud-config.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ List of fleet configuration parameters:
152152
- **etcd_key_prefix**: etcd prefix path to be used for fleet keys
153153
- **etcd_request_timeout**: Amount of time in seconds to allow a single etcd request before considering it failed
154154
- **etcd_servers**: Comma separated list of etcd endpoints
155+
- **etcd_username**: Username for Basic Authentication to etcd endpoints
156+
- **etcd_password**: Password for Basic Authentication to etcd endpoints
155157
- **metadata**: Comma separated key/value pairs that are published with the local to the fleet registry
156158
- **public_ip**: IP accessible by other nodes for inter-host communication
157159
- **verbosity**: Enable debug logging by setting this to an integer value greater than zero
@@ -188,6 +190,8 @@ List of flannel configuration parameters:
188190
- **etcd_certfile**: Path to certificate file used for TLS communication with etcd
189191
- **etcd_keyfile**: Path to private key file used for TLS communication with etcd
190192
- **etcd_prefix**: etcd prefix path to be used for flannel keys
193+
- **etcd_username**: Username for Basic Authentication to etcd endpoints
194+
- **etcd_password**: Password for Basic Authentication to etcd endpoints
191195
- **ip_masq**: Install IP masquerade rules for traffic outside of flannel subnet
192196
- **subnet_file**: Path to flannel subnet file to write out
193197
- **interface**: Interface (name or IP) that should be used for inter-host communication
@@ -226,6 +230,8 @@ List of locksmith configuration parameters:
226230
- **group**: Name of the reboot group in which this instance belongs
227231
- **window_start**: Start time of the reboot window
228232
- **window_length**: Duration of the reboot window
233+
- **etcd_username**: Username for Basic Authentication to etcd endpoints
234+
- **etcd_password**: Password for Basic Authentication to etcd endpoints
229235

230236
For the complete list of locksmith configuration parameters, see the [locksmith documentation][locksmith-readme].
231237

@@ -235,8 +241,8 @@ For the complete list of locksmith configuration parameters, see the [locksmith
235241

236242
The `coreos.update.*` parameters manipulate settings related to how CoreOS instances are updated.
237243

238-
These fields will be written out to and replace `/etc/coreos/update.conf`. If only one of the parameters is given it will only overwrite the given field.
239-
The `reboot-strategy` parameter also affects the behaviour of [locksmith](https://github.com/coreos/locksmith).
244+
These fields will be written out to and replace `/etc/coreos/update.conf`. If only one of the parameters is given it will only overwrite the given field.
245+
The `reboot-strategy` parameter also affects the behaviour of [locksmith](https://github.com/coreos/locksmith).
240246

241247
- **reboot-strategy**: One of "reboot", "etcd-lock", "best-effort" or "off" for controlling when reboots are issued after an update is performed.
242248
- _reboot_: Reboot immediately after an update is applied.
@@ -415,7 +421,7 @@ python -c "import crypt, getpass, pwd; print crypt.crypt('password', '\$6\$SALT\
415421
perl -e 'print crypt("password","\$6\$SALT\$") . "\n"'
416422
```
417423

418-
Using a higher number of rounds will help create more secure passwords, but given enough time, password hashes can be reversed. On most RPM based distributions there is a tool called mkpasswd available in the `expect` package, but this does not handle "rounds" nor advanced hashing algorithms.
424+
Using a higher number of rounds will help create more secure passwords, but given enough time, password hashes can be reversed. On most RPM based distributions there is a tool called mkpasswd available in the `expect` package, but this does not handle "rounds" nor advanced hashing algorithms.
419425

420426
### write_files
421427

config/flannel.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type Flannel struct {
2020
EtcdCertFile string `yaml:"etcd_certfile" env:"FLANNELD_ETCD_CERTFILE"`
2121
EtcdKeyFile string `yaml:"etcd_keyfile" env:"FLANNELD_ETCD_KEYFILE"`
2222
EtcdPrefix string `yaml:"etcd_prefix" env:"FLANNELD_ETCD_PREFIX"`
23+
EtcdUsername string `yaml:"etcd_username" env:"FLANNELD_ETCD_USERNAME"`
24+
EtcdPassword string `yaml:"etcd_password" env:"FLANNELD_ETCD_PASSWORD"`
2325
IPMasq string `yaml:"ip_masq" env:"FLANNELD_IP_MASQ"`
2426
SubnetFile string `yaml:"subnet_file" env:"FLANNELD_SUBNET_FILE"`
2527
Iface string `yaml:"interface" env:"FLANNELD_IFACE"`

config/fleet.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type Fleet struct {
2525
EtcdKeyPrefix string `yaml:"etcd_key_prefix" env:"FLEET_ETCD_KEY_PREFIX"`
2626
EtcdRequestTimeout float64 `yaml:"etcd_request_timeout" env:"FLEET_ETCD_REQUEST_TIMEOUT"`
2727
EtcdServers string `yaml:"etcd_servers" env:"FLEET_ETCD_SERVERS"`
28+
EtcdUsername string `yaml:"etcd_username" env:"FLEET_ETCD_USERNAME"`
29+
EtcdPassword string `yaml:"etcd_password" env:"FLEET_ETCD_PASSWORD"`
2830
Metadata string `yaml:"metadata" env:"FLEET_METADATA"`
2931
PublicIP string `yaml:"public_ip" env:"FLEET_PUBLIC_IP"`
3032
TokenLimit int `yaml:"token_limit" env:"FLEET_TOKEN_LIMIT"`

config/locksmith.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ type Locksmith struct {
1919
EtcdCAFile string `yaml:"etcd_cafile" env:"LOCKSMITHD_ETCD_CAFILE"`
2020
EtcdCertFile string `yaml:"etcd_certfile" env:"LOCKSMITHD_ETCD_CERTFILE"`
2121
EtcdKeyFile string `yaml:"etcd_keyfile" env:"LOCKSMITHD_ETCD_KEYFILE"`
22+
EtcdUsername string `yaml:"etcd_username" env:"LOCKSMITHD_ETCD_USERNAME"`
23+
EtcdPassword string `yaml:"etcd_password" env:"LOCKSMITHD_ETCD_PASSWORD"`
2224
Group string `yaml:"group" env:"LOCKSMITHD_GROUP"`
2325
RebootWindowStart string `yaml:"window_start" env:"REBOOT_WINDOW_START" valid:"^((?i:sun|mon|tue|wed|thu|fri|sat|sun) )?0*([0-9]|1[0-9]|2[0-3]):0*([0-9]|[1-5][0-9])$"`
2426
RebootWindowLength string `yaml:"window_length" env:"REBOOT_WINDOW_LENGTH" valid:"^[-+]?([0-9]*(\\.[0-9]*)?[a-z]+)+$"`

0 commit comments

Comments
 (0)