import { FtrConfigProviderContext } from '@kbn/test' ; export default async function ( { readConfigFile } ) { const anonymousAPITestsConfig = await readConfigFile ( require . resolve ( './anonymous.config.ts' ) ) ; return { ... anonymousAPITestsConfig . getAll ( ) , junit : { reportName : 'X-Pack Security API Integration Tests (Anonymous with ES anonymous access)' , } , esTestCluster : { ... anonymousAPITestsConfig . get ( 'esTestCluster' ) , serverArgs : [ ... anonymousAPITestsConfig . get ( 'esTestCluster.serverArgs' ) , 'xpack.security.authc.anonymous.username=anonymous_user' , 'xpack.security.authc.anonymous.roles=anonymous_role' , ] , } , kbnTestServer : { ... anonymousAPITestsConfig . get ( 'kbnTestServer' ) , serverArgs : [ ... anonymousAPITestsConfig . get ( 'kbnTestServer.serverArgs' ) . filter ( ( arg ) => ! arg . startsWith ( '--xpack.security.authc.providers' ) ) , `--xpack.security.authc.providers=${ JSON . stringify ( { anonymous : { anonymous1 : { order : 0 , credentials : 'elasticsearch_anonymous_user' } } , basic : { basic1 : { order : 1 } } , } ) }` , ] , } , } ; }