import { resolve } from 'path' ; import { FtrConfigProviderContext } from '@kbn/test' ; import { services } from './services' ; export default async function ( { readConfigFile } ) { const xPackAPITestsConfig = await readConfigFile ( require . resolve ( '../api_integration/config.ts' ) ) ; const kerberosKeytabPath = resolve ( __dirname , './fixtures/kerberos/krb5.keytab' ) ; const kerberosConfigPath = resolve ( __dirname , './fixtures/kerberos/krb5.conf' ) ; return { testFiles : [ require . resolve ( './tests/kerberos' ) ] , servers : xPackAPITestsConfig . get ( 'servers' ) , services , junit : { reportName : 'X-Pack Security API Integration Tests (Kerberos)' , } , esTestCluster : { ... xPackAPITestsConfig . get ( 'esTestCluster' ) , serverArgs : [ ... xPackAPITestsConfig . get ( 'esTestCluster.serverArgs' ) , 'xpack.security.authc.token.enabled=true' , 'xpack.security.authc.token.timeout=15s' , 'xpack.security.authc.realms.kerberos.kerb1.order=0' , `xpack.security.authc.realms.kerberos.kerb1.keytab.path=${ kerberosKeytabPath }` , ] , esJavaOpts : `-Djava.security.krb5.conf=${ kerberosConfigPath } -Dsun.security.krb5.rcache=none` , } , kbnTestServer : { ... xPackAPITestsConfig . get ( 'kbnTestServer' ) , serverArgs : [ ... xPackAPITestsConfig . get ( 'kbnTestServer.serverArgs' ) , `--xpack.security.authc.providers=${ JSON . stringify ( [ 'kerberos' , 'basic' ] ) }` , ] , } , } ; }