Where is the unique identifier for the tenant index name created in source code

  • Search Guard and Elasticsearch version 6.2.4

Hi,

Where is the unique identifier for the tenant index name created in source code? The unique identifier I’m referring to is the nine-digit number in the index name between “.kibana_-” and the tenant name. For example, where is “152937574” created for tenant index name “.kibana_-152937574_tenantname?”

Currently, Searchguard does not create the tenant index until an index-pattern is created/indexed through Kibana GUI. I want to automate indexing documents to the tenant index before this happens, so I need to know the tenant index name, e.g. .kibana_-152937574_tenantname."

So, how can I find out this unique identifier, through source code or by other means

Thanks

It is calculated in PrivilegesInterceptorImpl#toUserIndexName like:

originalKibanaIndex+""+tenant.hashCode()+""+tenant.toLowerCase().replaceAll("[^a-z0-9]+"

``

···

On Friday, June 29, 2018 at 10:43:09 PM UTC+2, robert@elementdata.com wrote:

  • Search Guard and Elasticsearch version 6.2.4

Hi,

Where is the unique identifier for the tenant index name created in source code? The unique identifier I’m referring to is the nine-digit number in the index name between “.kibana_-” and the tenant name. For example, where is “152937574” created for tenant index name “.kibana_-152937574_tenantname?”

Currently, Searchguard does not create the tenant index until an index-pattern is created/indexed through Kibana GUI. I want to automate indexing documents to the tenant index before this happens, so I need to know the tenant index name, e.g. .kibana_-152937574_tenantname."

So, how can I find out this unique identifier, through source code or by other means

Thanks