Skip to content

Instantly share code, notes, and snippets.

@jaymode
Last active April 28, 2016 13:55
Show Gist options
  • Save jaymode/ffe38d836bd1acdcdb1d8f4064edcf2a to your computer and use it in GitHub Desktop.
Save jaymode/ffe38d836bd1acdcdb1d8f4064edcf2a to your computer and use it in GitHub Desktop.
X-Pack Security Webinar
PUT /customers
PUT /customers/customer/1
{
"name": "Jay Modi",
"address": {
"city": "New York",
"state": "New York",
"country": "US"
},
"phone": "555-555-5555",
"cc_no": "1234567890124"
}
PUT /customers/customer/2
{
"name": "John Doe",
"address": {
"city": "Amsterdom",
"country": "NL"
},
"phone": "+31 20 555 5555",
"cc_no": "23456789097654"
}
GET /customers/_search
PUT /_shield/role/kibana_user
{
"cluster": [ "monitor" ]
"indices": [
{
"names": ".kibana*",
"privileges": ["manage", "read", "index"],
}
]
}
PUT /_shield/role/us_marketing
{
"indices": [
{
"names": "customers",
"privileges": ["read"],
"query": "{\"term\": {\"address.country\": \"us\"}}"
}
]
}
PUT /_shield/role/nl_marketing
{
"indices": [
{
"names": "customers",
"privileges": ["read"],
"query": "{\"term\": {\"address.country\": \"nl\"}}"
}
]
}
PUT /_shield/user/us_marketer
{
"roles": [ "kibana_user", "us_marketing" ],
"password": "changeme"
}
PUT /_shield/user/nl_marketer
{
"roles": [ "kibana_user", "nl_marketing" ],
"password": "changeme"
}
PUT /_shield/user/marketing_admin
{
"roles": [ "kibana_user", "us_marketing", "nl_marketing" ],
"password": "changeme"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment