esvm: Added user configurations to make esvm usable again

Also added a logstash configuration for simple performance
testing (useful for comparing different hash functions)

Original commit: elastic/x-pack-elasticsearch@c9f08fbb12
This commit is contained in:
Alexander Reelsen 2014-10-23 10:30:58 -07:00
parent a287863ab0
commit a52993db78
6 changed files with 113 additions and 1 deletions

View File

@ -0,0 +1,13 @@
admin:
cluster: all
indices:
'.*': all
power_user:
cluster: monitor
indices:
'.*': all
user:
indices:
'.*': read

View File

@ -0,0 +1 @@
*43QåÆ]Ûùð/÷ô<14>>eû.²¾g^lçH¶ûgu«•±Ê O/Gaoƒ˜ Ⱥâ•rr³ø´èk_ËÐ2û*¹©m•?д,”]‡<>Ƥå¦p¶I婳ò¼£¸sOYwu†¹äŸK•¨°+_¹0

View File

@ -0,0 +1,5 @@
admin-bcrypt:$2a$10$5uCJHPn3p0ZPQp6rIIgcDO0VZ3urZZmA.egHiy/WknxIkAyZXPGpy
admin-plain:{plain}changeme
admin-sha:{SHA}+pvrmeQCmtWmYVOZ57uuITVghrM=
admin-apr:$apr1$fCQ4kkwA$ETvNx37ooOcdau5a61S/s.
admin-sha2:$5$mw0LEbLr$s57Rbo0wfH8Z690Dc0..VgC1qn/a5h73bbpt8kql8B4

View File

@ -0,0 +1 @@
admin:admin-bcrypt,admin-sha,admin-plain,admin-apr,admin-sha2

12
.esvmrc
View File

@ -3,12 +3,15 @@
"plugins": [ "lmenezes/elasticsearch-kopf", { "name": "shield", "path" : "file:./target/releases/elasticsearch-shield-1.0.0-SNAPSHOT.zip" } ],
"config" : {
"cluster": { "name": "shield" },
"indices.store.throttle.max_bytes_per_sec": "100mb",
"discovery" : {
"type" : "zen",
"zen.ping.multicast.enabled": false,
"zen.ping.unicast.hosts" : [ "localhost:9300", "localhost:9301" ]
},
"shield" : {
"enabled" : true,
"system_key.file": ".esvm-shield-config/system_key",
"audit.enabled" : false,
"transport.ssl": true,
"http.ssl": true,
@ -17,7 +20,14 @@
"keystore_password" : "testnode",
"truststore" : "src/test/resources/org/elasticsearch/shield/transport/ssl/certs/simple/testnode.jks",
"truststore_password" : "testnode"
}
},
"authc": {
"esusers.files" : {
"users" : ".esvm-shield-config/users",
"users_roles" : ".esvm-shield-config/users_roles"
}
},
"authz.store.files.roles" : ".esvm-shield-config/roles.yml"
}
}
},

View File

@ -0,0 +1,82 @@
##############
## Logstash configuration for shield load testing
##
## This configuration makes performance testing against SHIELD a lot easier
## The generator input creates 1000000 very small documents
## The elasticsearch outputs (you should choose only one!) then can be configured to use
## one of the configured setups (shield enabled/disabled, ssl enabled/disabled, HTTP or transport)
## to find out, what kind of overhead the plugin has
##
## Note: Please make sure you are using a logstash instance, that supports shield (as of 10-2014, this resided in its own branch)
##
#############
## Running the tests
## 1. Start an elasticsearch cluster using esvm (this one only starts one node): esvm shield -n 1
## 2. Start logstash against it: ../logstash-output-es-shield/build/tarball/logstash-1.4.2/bin/logstash -p ~/.esvm/1.4.0.Beta1/plugins/ agent -f src/test/resources/logstash-shield.conf
#############
input {
generator {
count => 1000000
}
}
output {
##########
## HTTP
##########
# Use this when shield is disabled
# elasticsearch {
# protocol => 'http'
# }
# Shield enabled, SSL disabled
elasticsearch {
protocol => 'http'
# can be one of admin-plain, admin-bcrypt, admin-sha, admin-apr, admin-sha2
user => 'admin-plain'
password => 'changeme'
}
# Shield enabled, SSL enabled
# elasticsearch {
# protocol => 'http'
# user => 'admin'
# password => 'changeme'
# ssl => 'true'
# ssl_verify => false
# }
##########
## Transport Client
##########
# Use this when shield is disabled
# elasticsearch {
# protocol => 'transport'
# }
# Shield enabled, SSL disabled
# elasticsearch {
# protocol => 'transport'
# user => 'admin'
# password => 'changeme'
# }
# Shield enabled, SSL enabled
# elasticsearch {
# protocol => 'transport'
# user => 'admin'
# password => 'changeme'
# ssl => 'true'
# keystore => 'src/test/resources/org/elasticsearch/shield/transport/ssl/certs/simple/testclient.jks'
# keystore_password => 'testclient'
# truststore => 'src/test/resources/org/elasticsearch/shield/transport/ssl/certs/simple/testclient.jks'
# truststore_password => 'testclient'
# }
}