Nik Everett 33f4a8317c JDBC metadata integration with security (elastic/x-pack-elasticsearch#2806)
I realized that we weren't running our DatabaseMetaData tests. One thing led to another and I made these changes:
1. Got the DatabaseMetaData tests running in all three of our QA projects.
2. Fixed the SecurityCatalogFilter to work with `SqlGetIndicesAction`. It worked before, but only for requests that were a `SqlAction` as well as `SqlGetIndicesAction`.
3. Added security test for the JDBC DatabaseMetaData requests. These mirror exactly the security tests that we use for `SHOW TABLES` and `DESCRIBE` but cover the JDBC actions.

Original commit: elastic/x-pack-elasticsearch@7026d83c06
2017-10-30 23:22:12 +00:00

61 lines
1.1 KiB
YAML

read_all:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: test
privileges: [read]
- names: bort
privileges: [read]
read_something_else:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: something_that_isnt_test
privileges: [read]
read_test_a:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: test
privileges: [read]
field_security:
grant: [a]
read_test_a_and_b:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: test
privileges: [read]
field_security:
grant: ["*"]
except: [c]
read_test_without_c_3:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: test
privileges: [read]
query: |
{
"bool": {
"must_not": [
{
"match": {
"c": 3
}
}
]
}
}
read_bort:
cluster:
- monitor # Used by JDBC's MetaData
indices:
- names: bort
privileges: [read]