This repository has been archived by the owner on Jul 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
secret.go
145 lines (141 loc) · 6.89 KB
/
secret.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package config
import (
"github.com/enaml-ops/pluginlib/pluginutil"
"gopkg.in/urfave/cli.v2"
)
func RequiredSecretFlags() []string {
return []string{
"db-uaa-password",
"push-apps-manager-password",
"system-services-password",
"system-verification-password",
"opentsdb-firehose-nozzle-client-secret",
"identity-client-secret",
"login-client-secret",
"portal-client-secret",
"autoscaling-service-client-secret",
"system-passwords-client-secret",
"cc-service-dashboards-client-secret",
"gorouter-client-secret",
"notifications-client-secret",
"notifications-ui-client-secret",
"cloud-controller-username-lookup-client-secret",
"cc-routing-client-secret",
"apps-metrics-client-secret",
"apps-metrics-processing-client-secret",
"admin-password",
"nats-pass",
"mysql-bootstrap-password",
"consul-encryption-key",
"smoke-tests-password",
"doppler-shared-secret",
"doppler-client-secret",
"cc-bulk-api-password",
"cc-internal-api-password",
"ssh-proxy-uaa-secret",
"cc-db-encryption-key",
"db-ccdb-password",
"diego-db-passphrase",
"uaa-admin-secret",
"router-pass",
"mysql-proxy-api-password",
"mysql-admin-password",
"db-console-password",
"cc-staging-upload-password",
"db-app_usage-password",
"apps-manager-secret-token",
"db-autoscale-password",
"db-notifications-password",
}
}
func NewSecret(c *cli.Context) Secret {
return Secret{
UAADBPassword: c.String("db-uaa-password"),
PushAppsManagerPassword: c.String("push-apps-manager-password"),
SystemServicesPassword: c.String("system-services-password"),
SystemVerificationPassword: c.String("system-verification-password"),
OpentsdbFirehoseNozzleClientSecret: c.String("opentsdb-firehose-nozzle-client-secret"),
IdentityClientSecret: c.String("identity-client-secret"),
LoginClientSecret: c.String("login-client-secret"),
PortalClientSecret: c.String("portal-client-secret"),
AutoScalingServiceClientSecret: c.String("autoscaling-service-client-secret"),
SystemPasswordsClientSecret: c.String("system-passwords-client-secret"),
CCServiceDashboardsClientSecret: c.String("cc-service-dashboards-client-secret"),
GoRouterClientSecret: c.String("gorouter-client-secret"),
NotificationsClientSecret: c.String("notifications-client-secret"),
NotificationsUIClientSecret: c.String("notifications-ui-client-secret"),
CloudControllerUsernameLookupClientSecret: c.String("cloud-controller-username-lookup-client-secret"),
CCRoutingClientSecret: c.String("cc-routing-client-secret"),
AppsMetricsClientSecret: c.String("apps-metrics-client-secret"),
AppsMetricsProcessingClientSecret: c.String("apps-metrics-processing-client-secret"),
AdminPassword: c.String("admin-password"),
NATSPassword: c.String("nats-pass"),
MySQLBootstrapPassword: c.String("mysql-bootstrap-password"),
ConsulEncryptKeys: c.StringSlice("consul-encryption-key"),
SmokeTestsPassword: c.String("smoke-tests-password"),
DopplerSharedSecret: c.String("doppler-shared-secret"),
DopplerSecret: c.String("doppler-client-secret"),
CCBulkAPIPassword: c.String("cc-bulk-api-password"),
CCInternalAPIPassword: c.String("cc-internal-api-password"),
SSHProxyClientSecret: c.String("ssh-proxy-uaa-secret"),
DbEncryptionKey: c.String("cc-db-encryption-key"),
CCDBPassword: c.String("db-ccdb-password"),
DiegoDBPassphrase: c.String("diego-db-passphrase"),
AdminSecret: c.String("uaa-admin-secret"),
LDAPUserPassword: c.String("uaa-ldap-user-password"),
RouterPass: c.String("router-pass"),
MySQLProxyAPIPassword: c.String("mysql-proxy-api-password"),
MySQLAdminPassword: c.String("mysql-admin-password"),
ConsoleDBPassword: c.String("db-console-password"),
StagingUploadPassword: c.String("cc-staging-upload-password"),
AppUsageDBPassword: c.String("db-app_usage-password"),
AppsManagerSecretToken: c.String("apps-manager-secret-token"),
AutoscaleBrokerPassword: pluginutil.NewPassword(16),
AutoscaleDBPassword: c.String("db-autoscale-password"),
}
}
type Secret struct {
AdminPassword string
MySQLBootstrapPassword string
NATSPassword string
SmokeTestsPassword string
DopplerSecret string
DopplerSharedSecret string
CCBulkAPIPassword string
CCInternalAPIPassword string
SSHProxyClientSecret string
DiegoDBPassphrase string
AdminSecret string
UAADBPassword string
PushAppsManagerPassword string
SystemServicesPassword string
SystemVerificationPassword string
OpentsdbFirehoseNozzleClientSecret string
IdentityClientSecret string
LoginClientSecret string
PortalClientSecret string
AutoScalingServiceClientSecret string
SystemPasswordsClientSecret string
CCServiceDashboardsClientSecret string
GoRouterClientSecret string
NotificationsClientSecret string
NotificationsUIClientSecret string
CloudControllerUsernameLookupClientSecret string
CCRoutingClientSecret string
AppsMetricsClientSecret string
AppsMetricsProcessingClientSecret string
LDAPUserPassword string
DbEncryptionKey string
CCDBPassword string
StagingUploadPassword string
MySQLProxyAPIPassword string
RouterPass string
MySQLAdminPassword string
ConsoleDBPassword string
ConsulEncryptKeys []string
AppUsageDBPassword string
AppsManagerSecretToken string
AutoscaleBrokerPassword string
AutoscaleDBPassword string
NotificationsDBPassword string
}