mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Enables preventing access to internal APIs (#156935)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ed3941d45e
commit
7bbe92f085
35 changed files with 438 additions and 18 deletions
|
@ -38,6 +38,7 @@ export const httpConfigSchema = schema.object(
|
|||
}),
|
||||
}),
|
||||
ssl: sslSchema,
|
||||
restrictInternalApis: schema.boolean({ defaultValue: false }),
|
||||
},
|
||||
{ unknowns: 'ignore' }
|
||||
);
|
||||
|
@ -54,6 +55,7 @@ export class HttpConfig implements IHttpConfig {
|
|||
socketTimeout: number;
|
||||
cors: ICorsConfig;
|
||||
ssl: ISslConfig;
|
||||
restrictInternalApis: boolean;
|
||||
|
||||
constructor(rawConfig: HttpConfigType) {
|
||||
this.basePath = rawConfig.basePath;
|
||||
|
@ -65,5 +67,6 @@ export class HttpConfig implements IHttpConfig {
|
|||
this.socketTimeout = rawConfig.socketTimeout;
|
||||
this.cors = rawConfig.cors;
|
||||
this.ssl = new SslConfig(rawConfig.ssl);
|
||||
this.restrictInternalApis = rawConfig.restrictInternalApis;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ describe('BasePathProxyServer', () => {
|
|||
},
|
||||
ssl: { enabled: false },
|
||||
maxPayload: new ByteSizeValue(1024),
|
||||
restrictInternalApis: false,
|
||||
};
|
||||
|
||||
const serverOptions = getServerOptions(config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue