Skip to content

SecuritySettingsSource license.self_generated: trial (#38233) #38397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

albertzaharovits
Copy link
Contributor

Authn is enabled only if license_type is non basic, but basic is
what the LicenseService generates implicitly. This commit explicitly sets
license type to trial, which allows for authn, in the SecuritySettingsSource
which is the settings configuration parameter for InternalTestClusters.

The real problem, that had created tests failures like #31028 and #32685, is
that the check licenseState.isAuthAllowed() can change sporadically. If it were
to return true or false during the whole test there would be no problem.
The problem manifests when it turns from true to false right before Realms.asList().
There are other license checks before this one (request filter, token service, etc)
that would not cause a problem if they would suddenly see the check as false.
But switching to false before Realms.asList() makes it appear that no installed
realms could have handled the authn token which is an authentication error, as can
be seen in the failing tests.

Closes #31028 #32685

Authn is enabled only if `license_type` is non `basic`, but `basic` is
what the `LicenseService` generates implicitly. This commit explicitly sets
license type to `trial`, which allows for authn, in the `SecuritySettingsSource`
which is the settings configuration parameter for `InternalTestCluster`s.

The real problem, that had created tests failures like elastic#31028 and elastic#32685, is
that the check `licenseState.isAuthAllowed()` can change sporadically. If it were
to return `true` or `false` during the whole test there would be no problem.
The problem manifests when it turns from `true` to `false` right before `Realms.asList()`.
There are other license checks before this one (request filter, token service, etc)
that would not cause a problem if they would suddenly see the check as `false`.
But switching to `false` before `Realms.asList()` makes it appear that no installed
realms could have handled the authn token which is an authentication error, as can
be seen in the failing tests.

Closes elastic#31028 elastic#32685
@albertzaharovits albertzaharovits added :Security/Security Security issues without another label backport labels Feb 5, 2019
@albertzaharovits albertzaharovits self-assigned this Feb 5, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Security/Security Security issues without another label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants