Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb
This commit is contained in:
pgayvallet 2021-01-29 18:06:22 +01:00
parent fdf73feb0a
commit c13d07daf3
2 changed files with 0 additions and 10 deletions

View file

@ -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),

View file

@ -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({