open-consul/vendor/github.com/hashicorp/serf/serf
Hans Hasselberg 02de4c8b76
add primary keys to list keyring (#8522)
During gossip encryption key rotation it would be nice to be able to see if all nodes are using the same key. This PR adds another field to the json response from `GET v1/operator/keyring` which lists the primary keys in use per dc. That way an operator can tell when a key was successfully setup as primary key.

Based on https://github.com/hashicorp/serf/pull/611 to add primary key to list keyring output:

```json
[
  {
    "WAN": true,
    "Datacenter": "dc2",
    "Segment": "",
    "Keys": {
      "0OuM4oC3Os18OblWiBbZUaHA7Hk+tNs/6nhNYtaNduM=": 6,
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 6
    },
    "PrimaryKeys": {
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 6
    },
    "NumNodes": 6
  },
  {
    "WAN": false,
    "Datacenter": "dc2",
    "Segment": "",
    "Keys": {
      "0OuM4oC3Os18OblWiBbZUaHA7Hk+tNs/6nhNYtaNduM=": 8,
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 8
    },
    "PrimaryKeys": {
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 8
    },
    "NumNodes": 8
  },
  {
    "WAN": false,
    "Datacenter": "dc1",
    "Segment": "",
    "Keys": {
      "0OuM4oC3Os18OblWiBbZUaHA7Hk+tNs/6nhNYtaNduM=": 3,
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 8
    },
    "PrimaryKeys": {
      "SINm887hKTzmMWeBNKTJReaTLX3mBEJKriDyt88Ad+g=": 8
    },
    "NumNodes": 8
  }
]
```

I intentionally did not change the CLI output because I didn't find a good way of displaying this information. There are a couple of options that we could implement later:
* add a flag to show the primary keys
* add a flag to show json output

Fixes #3393.
2020-08-18 09:50:24 +02:00
..
broadcast.go update github.com/hashicorp/{serf,memberlist,go-sockaddr} (#5189) 2019-01-07 15:00:47 -06:00
coalesce.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
coalesce_member.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
coalesce_user.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
config.go gossip: Avoid issue where two unique leave events for the same node could lead to infinite rebroadcast storms (#8343) 2020-07-21 15:48:10 -05:00
conflict_delegate.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
delegate.go gossip: Avoid issue where two unique leave events for the same node could lead to infinite rebroadcast storms (#8343) 2020-07-21 15:48:10 -05:00
event.go wan federation via mesh gateways (#6884) 2020-03-09 15:59:02 -05:00
event_delegate.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
internal_query.go add primary keys to list keyring (#8522) 2020-08-18 09:50:24 +02:00
keymanager.go add primary keys to list keyring (#8522) 2020-08-18 09:50:24 +02:00
lamport.go Manage dependencies via Godep 2016-02-12 16:50:37 -08:00
merge_delegate.go agent: don't let left nodes hold onto their node-id (#7747) 2020-05-04 18:39:08 +02:00
messages.go wan federation via mesh gateways (#6884) 2020-03-09 15:59:02 -05:00
ping_delegate.go Updates Serf to pickup fix for spammy zero RTT log messages. 2018-01-19 14:47:12 -08:00
query.go wan federation via mesh gateways (#6884) 2020-03-09 15:59:02 -05:00
serf.go add primary keys to list keyring (#8522) 2020-08-18 09:50:24 +02:00
snapshot.go Update Serf and memberlist (#4511) 2018-08-09 13:16:13 -04:00