mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Revert "(will be reverted) explicitly await for license to be ready in the auth hook"
This reverts commit fdf73feb
This commit is contained in:
parent
fdf73feb0a
commit
c13d07daf3
2 changed files with 0 additions and 10 deletions
|
@ -14,7 +14,6 @@ export interface SecurityLicense {
|
|||
isEnabled(): boolean;
|
||||
getType(): LicenseType | undefined;
|
||||
getFeatures(): SecurityLicenseFeatures;
|
||||
license$: Observable<ILicense>;
|
||||
features$: Observable<SecurityLicenseFeatures>;
|
||||
}
|
||||
|
||||
|
@ -29,15 +28,11 @@ export class SecurityLicenseService {
|
|||
let rawLicense: Readonly<ILicense> | undefined;
|
||||
|
||||
this.licenseSubscription = license$.subscribe((nextRawLicense) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('***** NEXT RAW LICENSE');
|
||||
rawLicense = nextRawLicense;
|
||||
});
|
||||
|
||||
return {
|
||||
license: Object.freeze({
|
||||
license$,
|
||||
|
||||
isLicenseAvailable: () => rawLicense?.isAvailable ?? false,
|
||||
|
||||
isEnabled: () => this.isSecurityEnabledFromRawLicense(rawLicense),
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { take } from 'rxjs/operators';
|
||||
import type { PublicMethodsOf } from '@kbn/utility-types';
|
||||
import type {
|
||||
LoggerFactory,
|
||||
|
@ -67,10 +66,6 @@ export class AuthenticationService {
|
|||
this.license = license;
|
||||
|
||||
http.registerAuth(async (request, response, t) => {
|
||||
await license.license$.pipe(take(1)).toPromise();
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('***** AWAIT REGISTER AUTH COMPLETE');
|
||||
|
||||
if (!license.isLicenseAvailable()) {
|
||||
this.logger.error('License is not available, authentication is not possible.');
|
||||
return response.customError({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue