Remove plaintext tokens for feature flags clients

and change token from it `encrypted: :optional` to `encrypted:
:required`.

Related to #29594.
173 jobs for !18923 with 29594-remove-plaintext-ff-tokens in 91 minutes and 46 seconds (queued for 7 seconds)
detached
Status Job ID Name Coverage
  Prepare
passed #329375712
docker gitlab-org
build-qa-image

00:05:51

passed #329375709
gitlab-org
compile-assets pull-cache

00:06:15

passed #329375710
gitlab-org
compile-assets pull-cache foss

00:07:21

passed #329375714
retrieve-tests-metadata

00:02:01

passed #329375713
gitlab-org
review-cleanup-failed-deployment

00:00:35

passed #329375711
gitlab-org
setup-test-env

00:05:53

 
  Test
passed #329375730
allowed to fail
code_quality

00:11:36

passed #329375881
gitlab-org
danger-review

00:02:27

passed #329375871
gitlab-org
db:check-schema

00:02:54

passed #329375873
gitlab-org
db:migrate-from-v11.11.0

00:09:24

passed #329375869
gitlab-org
db:migrate:reset

00:03:16

passed #329375875
gitlab-org
db:rollback

00:03:27

passed #329375880
gitlab-org
db:rollback geo

00:03:32

passed #329375733
allowed to fail
dependency_scanning

00:11:24

passed #329375867
gitlab-org
downtime_check

00:02:29

passed #329375715
docker gitlab-org
gitlab:assets:compile pull-cache

00:19:18

passed #329375877
gitlab-org
gitlab:setup

00:07:17

passed #329375883
gitlab-org
gitlab_git_test

00:00:27

passed #329375719
gitlab-org
jest

00:20:55

passed #329375720
gitlab-org
jest-foss

00:16:06

passed #329375716
gitlab-org
karma

00:17:28

67.72%
passed #329375717
gitlab-org
karma-foss

00:11:39

passed #329375885
gitlab-org
lint-ci-gitlab

00:00:31

passed #329375726
gitlab-org
memory-on-boot

00:07:21

passed #329375725
gitlab-org
memory-static

00:04:42

passed #329375722
gitlab-org
qa-frontend-node:10

00:16:39

passed #329375721
gitlab-org
qa-frontend-node:8

00:22:45

passed #329375723
gitlab-org allowed to fail
qa-frontend-node:latest

00:28:04

passed #329375727
gitlab-org
qa:internal

00:01:36

passed #329375728
gitlab-org
qa:selectors

00:02:03

passed #329375729
gitlab-org
qa:selectors-foss

00:01:59

passed #329375863
gitlab-org
rspec fast_spec_helper

00:03:50

passed #329375779
gitlab-org
rspec integration pg9 1/6

00:19:56

passed #329375780
gitlab-org
rspec integration pg9 2/6

00:17:40

passed #329375781
gitlab-org
rspec integration pg9 3/6

00:17:35

passed #329375782
gitlab-org
rspec integration pg9 4/6

00:17:41

passed #329375783
gitlab-org
rspec integration pg9 5/6

00:20:04

passed #329375784
gitlab-org
rspec integration pg9 6/6

00:19:52

passed #329375785
gitlab-org
rspec integration pg9-foss 1/6

00:14:15

passed #329375786
gitlab-org
rspec integration pg9-foss 2/6

00:15:00

passed #329375787
gitlab-org
rspec integration pg9-foss 3/6

00:20:19

passed #329375788
gitlab-org
rspec integration pg9-foss 4/6

00:15:38

passed #329375789
gitlab-org
rspec integration pg9-foss 5/6

00:15:57

passed #329375790
gitlab-org
rspec integration pg9-foss 6/6

00:15:14

passed #329375791
gitlab-org
rspec system pg9 1/24

00:14:47

passed #329375800
gitlab-org
rspec system pg9 10/24

00:13:48

passed #329375801
gitlab-org
rspec system pg9 11/24

00:11:29

passed #329375802
gitlab-org
rspec system pg9 12/24

00:12:58

passed #329375803
gitlab-org
rspec system pg9 13/24

00:11:49

passed #329375804
gitlab-org
rspec system pg9 14/24

00:14:42

passed #329375805
gitlab-org
rspec system pg9 15/24

00:18:42

passed #329375806
gitlab-org
rspec system pg9 16/24

00:13:42

passed #329375807
gitlab-org
rspec system pg9 17/24

00:14:19

passed #329375808
gitlab-org
rspec system pg9 18/24

00:17:57

passed #329375809
gitlab-org
rspec system pg9 19/24

00:11:55

passed #329375792
gitlab-org
rspec system pg9 2/24

00:10:54

passed #329375810
gitlab-org
rspec system pg9 20/24

00:11:22

passed #329375811
gitlab-org
rspec system pg9 21/24

00:15:45

passed #329375812
gitlab-org
rspec system pg9 22/24

00:11:54

passed #329375813
gitlab-org
rspec system pg9 23/24

00:16:18

passed #329375814
gitlab-org
rspec system pg9 24/24

00:16:30

passed #329375793
gitlab-org
rspec system pg9 3/24

00:13:31

passed #329375794
gitlab-org
rspec system pg9 4/24

00:13:12

passed #329375795
gitlab-org
rspec system pg9 5/24

00:13:54

passed #329375796
gitlab-org
rspec system pg9 6/24

00:16:15

passed #329375797
gitlab-org
rspec system pg9 7/24

00:13:03

passed #329375798
gitlab-org
rspec system pg9 8/24

00:13:01

passed #329375799
gitlab-org
rspec system pg9 9/24

00:16:36

passed #329375815
gitlab-org
rspec system pg9-foss 1/24

00:13:25

passed #329375824
gitlab-org
rspec system pg9-foss 10/24

00:14:13

passed #329375825
gitlab-org
rspec system pg9-foss 11/24

00:11:17

passed #329375826
gitlab-org
rspec system pg9-foss 12/24

00:11:30

passed #329375827
gitlab-org
rspec system pg9-foss 13/24

00:13:11

passed #329375828
gitlab-org
rspec system pg9-foss 14/24

00:12:27

passed #329375829
gitlab-org
rspec system pg9-foss 15/24

00:13:20

passed #329375830
gitlab-org
rspec system pg9-foss 16/24

00:13:34

passed #329375831
gitlab-org
rspec system pg9-foss 17/24

00:13:37

passed #329375832
gitlab-org
rspec system pg9-foss 18/24

00:13:09

passed #329375833
gitlab-org
rspec system pg9-foss 19/24

00:17:42

passed #329375816
gitlab-org
rspec system pg9-foss 2/24

00:12:20

passed #329375834
gitlab-org
rspec system pg9-foss 20/24

00:12:55

passed #329375835
gitlab-org
rspec system pg9-foss 21/24

00:12:36

passed #329375836
gitlab-org
rspec system pg9-foss 22/24

00:14:21

passed #329375837
gitlab-org
rspec system pg9-foss 23/24

00:14:36

passed #329375838
gitlab-org
rspec system pg9-foss 24/24

00:13:36

passed #329375817
gitlab-org
rspec system pg9-foss 3/24

00:12:24

passed #329375818
gitlab-org
rspec system pg9-foss 4/24

00:12:45

passed #329375819
gitlab-org
rspec system pg9-foss 5/24

00:10:22

passed #329375820
gitlab-org
rspec system pg9-foss 6/24

00:13:08

passed #329375821
gitlab-org
rspec system pg9-foss 7/24

00:16:38

passed #329375822
gitlab-org
rspec system pg9-foss 8/24

00:10:45

passed #329375823
gitlab-org
rspec system pg9-foss 9/24

00:12:19

passed #329375734
gitlab-org
rspec unit pg9 1/20

00:18:10

passed #329375743
gitlab-org
rspec unit pg9 10/20

00:18:55

passed #329375744
gitlab-org
rspec unit pg9 11/20

00:15:17

passed #329375745
gitlab-org
rspec unit pg9 12/20

00:17:15

passed #329375746
gitlab-org
rspec unit pg9 13/20

00:20:20

passed #329375747
gitlab-org
rspec unit pg9 14/20

00:20:11

passed #329375748
gitlab-org
rspec unit pg9 15/20

00:18:53

passed #329375749
gitlab-org
rspec unit pg9 16/20

00:14:06

passed #329375750
gitlab-org
rspec unit pg9 17/20

00:16:15

passed #329375752
gitlab-org
rspec unit pg9 18/20

00:16:31

passed #329375753
gitlab-org
rspec unit pg9 19/20

00:15:49

passed #329375735
gitlab-org
rspec unit pg9 2/20

00:15:30

passed #329375754
gitlab-org
rspec unit pg9 20/20

00:38:52

passed #329375736
gitlab-org
rspec unit pg9 3/20

00:13:50

passed #329375737
gitlab-org
rspec unit pg9 4/20

00:15:51

passed #329375738
gitlab-org
rspec unit pg9 5/20

00:15:32

passed #329375739
gitlab-org
rspec unit pg9 6/20

00:14:53

passed #329375740
gitlab-org
rspec unit pg9 7/20

00:16:10

passed #329375741
gitlab-org
rspec unit pg9 8/20

00:18:20

passed #329375742
gitlab-org
rspec unit pg9 9/20

00:16:09

passed #329375755
gitlab-org
rspec unit pg9-foss 1/20

00:17:33

passed #329375764
gitlab-org
rspec unit pg9-foss 10/20

00:15:32

passed #329375765
gitlab-org
rspec unit pg9-foss 11/20

00:32:19

passed #329375766
gitlab-org
rspec unit pg9-foss 12/20

00:21:08

passed #329375767
gitlab-org
rspec unit pg9-foss 13/20

00:15:13

passed #329375768
gitlab-org
rspec unit pg9-foss 14/20

00:16:57

passed #329375769
gitlab-org
rspec unit pg9-foss 15/20

00:15:29

passed #329375770
gitlab-org
rspec unit pg9-foss 16/20

00:14:08

passed #329375771
gitlab-org
rspec unit pg9-foss 17/20

00:15:38

passed #329375772
gitlab-org
rspec unit pg9-foss 18/20

00:15:00

passed #329375773
gitlab-org
rspec unit pg9-foss 19/20

00:15:00

passed #329375756
gitlab-org
rspec unit pg9-foss 2/20

00:11:15

passed #329375778
gitlab-org
rspec unit pg9-foss 20/20

00:15:20

passed #329375757
gitlab-org
rspec unit pg9-foss 3/20

00:10:23

passed #329375758
gitlab-org
rspec unit pg9-foss 4/20

00:12:48

passed #329375759
gitlab-org
rspec unit pg9-foss 5/20

00:12:01

passed #329375760
gitlab-org
rspec unit pg9-foss 6/20

00:13:11

passed #329375761
gitlab-org
rspec unit pg9-foss 7/20

00:16:14

passed #329375762
gitlab-org
rspec unit pg9-foss 8/20

00:13:38

passed #329375763
gitlab-org
rspec unit pg9-foss 9/20

00:15:30

passed #329375861
gitlab-org
rspec-ee integration pg10 geo

00:08:29

passed #329375846
gitlab-org
rspec-ee integration pg9 1/3

00:15:07

passed #329375847
gitlab-org
rspec-ee integration pg9 2/3

00:13:05

passed #329375848
gitlab-org
rspec-ee integration pg9 3/3

00:16:02

passed #329375857
gitlab-org
rspec-ee integration pg9 geo

00:06:16

passed #329375862
gitlab-org
rspec-ee system pg10 geo

00:22:36

passed #329375849
gitlab-org
rspec-ee system pg9 1/5

00:16:02

passed #329375850
gitlab-org
rspec-ee system pg9 2/5

00:13:31

passed #329375851
gitlab-org
rspec-ee system pg9 3/5

00:19:11

passed #329375852
gitlab-org
rspec-ee system pg9 4/5

00:16:42

passed #329375853
gitlab-org
rspec-ee system pg9 5/5

00:18:00

passed #329375858
gitlab-org
rspec-ee system pg9 geo

00:06:19

passed #329375859
gitlab-org
rspec-ee unit pg10 geo 1/2

00:15:13

passed #329375860
gitlab-org
rspec-ee unit pg10 geo 2/2

00:15:25

passed #329375839
gitlab-org
rspec-ee unit pg9 1/7

00:15:45

passed #329375840
gitlab-org
rspec-ee unit pg9 2/7

00:12:16

passed #329375841
gitlab-org
rspec-ee unit pg9 3/7

00:15:20

passed #329375842
gitlab-org
rspec-ee unit pg9 4/7

00:14:25

passed #329375843
gitlab-org
rspec-ee unit pg9 5/7

00:13:49

passed #329375844
gitlab-org
rspec-ee unit pg9 6/7

00:16:04

passed #329375845
gitlab-org
rspec-ee unit pg9 7/7

00:14:50

passed #329375854
gitlab-org
rspec-ee unit pg9 geo 1/2

00:15:03

passed #329375855
gitlab-org
rspec-ee unit pg9 geo 2/2

00:11:42

passed #329375731
allowed to fail
sast

00:10:02

passed #329375865
gitlab-org
static-analysis

00:18:13

passed #329375724
gitlab-org
webpack-dev-server

00:04:56

 
  Review Prepare
passed #329375887
review-build-cng

00:32:35

 
  Review
failed #329375889
gitlab-org allowed to fail
review-deploy

00:20:04

manual #329375890
gitlab-org allowed to fail manual
review-stop
 
  Qa
passed #329375892
allowed to fail
dast

00:07:04

manual #329375891
allowed to fail manual
package-and-qa-manual
failed #329375899
docker gitlab-org allowed to fail
review-performance

00:06:47

manual #329375894
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #329375895
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #329375896
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #329375897
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #329375898
docker gitlab-org allowed to fail manual
review-qa-all 5/5
failed #329375893
docker gitlab-org allowed to fail
review-qa-smoke

00:07:54

 
  Post Test
passed #329375900
gitlab-org
coverage

00:05:53

97.26%
passed #329375902
gitlab-org allowed to fail
flaky-examples-check

00:03:20

manual #329375901
gitlab-org allowed to fail manual
parallel-spec-reports
 
Name Stage Failure
failed
review-qa-smoke Qa
	 1: from /usr/local/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:217:in `rbuf_fill':
Net::ReadTimeout with #<TCPSocket:(closed)> (Net::ReadTimeout)
Running after script...
$ date
Wed Oct 23 01:10:40 UTC 2019
Uploading artifacts...
./qa/gitlab-qa-run-*: found 2 matching files
Uploading artifacts to coordinator... ok
id=329375893 responseStatus=201 Created token=uFwmwvyy
ERROR: Job failed: exit code 1
failed
review-performance Qa
    at processImmediate [as _immediateCallback] (timers.js:722:5)
[2019-10-23 01:09:34] INFO: HTML stored in /sitespeed.io/sitespeed-results
[2019-10-23 01:09:34] INFO: Finished analysing https://gitlab-review-29594-remo-be83aa.gitlab-review.app
Running after script...
$ mv sitespeed-results/data/performance.json performance.json
Uploading artifacts...
performance.json: found 1 matching files
Uploading artifacts to coordinator... ok
id=329375899 responseStatus=201 Created token=WBdx5j9R
ERROR: Job failed: exit code 1
failed
review-deploy Review
    helm upgrade --install     --wait     --timeout 900     --set ci.branch="29594-remove-plaintext-ff-tokens"     --set ci.commit.sha="5952c3fa"     --set ci.job.url="https://gitlab.com/gitlab-org/gitlab/-/jobs/329375889"     --set ci.pipeline.url="https://gitlab.com/gitlab-org/gitlab/pipelines/90746334"     --set releaseOverride="review-29594-remo-be83aa"     --set global.hosts.hostSuffix="review-29594-remo-be83aa"     --set global.hosts.domain="gitlab-review.app"     --set gitlab.migrations.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-rails-ee"     --set gitlab.migrations.image.tag="29594-remove-plaintext-ff-tokens"     --set gitlab.gitaly.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitaly"     --set gitlab.gitaly.image.tag="v1.70.0"     --set gitlab.gitlab-shell.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-shell"     --set gitlab.gitlab-shell.image.tag="v10.2.0"     --set gitlab.sidekiq.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-sidekiq-ee"     --set gitlab.sidekiq.image.tag="29594-remove-plaintext-ff-tokens"     --set gitlab.unicorn.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-unicorn-ee"     --set gitlab.unicorn.image.tag="29594-remove-plaintext-ff-tokens"     --set gitlab.unicorn.workhorse.image="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-workhorse-ee"     --set gitlab.unicorn.workhorse.tag="29594-remove-plaintext-ff-tokens"     --set gitlab.task-runner.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-task-runner-ee"     --set gitlab.task-runner.image.tag="29594-remove-plaintext-ff-tokens"   --namespace="review-apps-ee"   --version="90746334-329375889"   -f "../scripts/review_apps/base-config.yaml"   "review-29594-remo-be83aa" .
Release "review-29594-remo-be83aa" does not exist. Installing it now.
Running after script...
$ date
Wed Oct 23 01:02:44 UTC 2019
Uploading artifacts...
review_app_url.txt: found 1 matching files
Uploading artifacts to coordinator... ok
id=329375889 responseStatus=201 Created token=aufwEDAf
ERROR: Job failed: exit code 1