Skip to content

Commit 692de4c

Browse files
authored
Try: use dummy service tokens (#650)
* Use kibana_system user * Use dummy service tokens * Set password for kibana_system * Revert "Set password for kibana_system" This reverts commit ac917bb. * Try
1 parent 61411f4 commit 692de4c

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
elastic/fleet-server/elastic-package-fleet-server-token:{PBKDF2_STRETCH}10000$PNiVyY96dHwRfoDszBvYPAz+mSLbC+NhtPh63dblDZU=$dAY1tXX1U5rXB+2Lt7m0L2LUNSb1q5nRaIqPNZTBxb8=
2+
elastic/kibana/elastic-package-kibana-token:{PBKDF2_STRETCH}10000$wIEFHIIIZ2ap0D0iQsyw0MfB7YuFA1bHnXAmlCoL4Gg=$YxvIJnasjLZyDQZpmFBiJHdR/CGXd5BnVm013Jty6p0=

internal/install/install.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ func writeStackResources(elasticPackagePath *locations.LocationManager) error {
188188
return errors.Wrapf(err, "copying GeoIP country database failed (%s)", geoIpCountryMmdbPath)
189189
}
190190

191+
serviceTokensPath := filepath.Join(elasticPackagePath.StackDir(), "service_tokens")
192+
err = writeStaticResource(err, serviceTokensPath, serviceTokens)
193+
if err != nil {
194+
return errors.Wrapf(err, "copying service_tokens failed (%s)", serviceTokensPath)
195+
}
196+
191197
options := profile.Options{
192198
PackagePath: elasticPackagePath.ProfileDir(),
193199
Name: profile.DefaultProfile,

internal/install/static.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ var geoIpCityMmdb string
2626

2727
//go:embed _static/GeoLite2-Country.mmdb
2828
var geoIpCountryMmdb string
29+
30+
//go:embed _static/service_tokens
31+
var serviceTokens string

internal/profile/_static/docker-compose-stack.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
volumes:
1313
- "./elasticsearch.config.${STACK_VERSION_VARIANT}.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
1414
- "../../../stack/ingest-geoip:/usr/share/elasticsearch/config/ingest-geoip"
15+
- "../../../stack/service_tokens:/usr/share/elasticsearch/config/service_tokens"
1516
ports:
1617
- "127.0.0.1:9200:9200"
1718

@@ -81,6 +82,8 @@ services:
8182
- "KIBANA_FLEET_SETUP=1"
8283
- "KIBANA_FLEET_HOST=http://kibana:5601"
8384
- "FLEET_SERVER_HOST=0.0.0.0"
85+
- "FLEET_SERVER_SERVICE_TOKEN=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL2VsYXN0aWMtcGFja2FnZS1mbGVldC1zZXJ2ZXItdG9rZW46bmgtcFhoQzRRQ2FXbms2U0JySGlWQQ"
86+
- "KIBANA_FLEET_SERVICE_TOKEN=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL2VsYXN0aWMtcGFja2FnZS1mbGVldC1zZXJ2ZXItdG9rZW46bmgtcFhoQzRRQ2FXbms2U0JySGlWQQ"
8487
ports:
8588
- "127.0.0.1:8220:8220"
8689

internal/profile/_static/kibana_config_8x.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ server.name: kibana
22
server.host: "0.0.0.0"
33

44
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
5-
elasticsearch.username: elastic
6-
elasticsearch.password: changeme
5+
elasticsearch.serviceAccountToken: "AAEAAWVsYXN0aWMva2liYW5hL2VsYXN0aWMtcGFja2FnZS1raWJhbmEtdG9rZW46b2x4b051SWNRa0tYMHdXazdLWmFBdw"
76

87
monitoring.ui.container.elasticsearch.enabled: true
98

0 commit comments

Comments
 (0)