Skip to content
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

[ML] Improve trial license expired state #150539

Closed
jgowdyelastic opened this issue Feb 8, 2023 · 1 comment · Fixed by #156703
Closed

[ML] Improve trial license expired state #150539

jgowdyelastic opened this issue Feb 8, 2023 · 1 comment · Fixed by #156703
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :ml v8.8.0

Comments

@jgowdyelastic
Copy link
Member

jgowdyelastic commented Feb 8, 2023

When a trial license has expired, the ML UI use to behave as if it were running on a basic license and we would show an expired license warning

Now we display an access denied warning and all pages, including the basic licensed data visualizer pages are inaccessible.

image

It appears this is happening because all ML endpoints are returning a 403.

@jgowdyelastic jgowdyelastic added bug Fixes for quality problems that affect the customer experience :ml v8.8.0 labels Feb 8, 2023
@jgowdyelastic jgowdyelastic self-assigned this Feb 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

jgowdyelastic added a commit that referenced this issue May 5, 2023
Fixes #150539

When handling route resolver errors, we now check to see if the error
was triggered by an expired license, if so we redirect to the license
management page rather than the access denied page.

This is hard to test as you need an expired license. One way to spoof
this is by editing code in the licensing plugin to inject expired
license details.

```
response.license.expiry_date_in_millis = 1683205426704;
response.license.status = 'expired';
```
Adding this below [this
line](https://github.com/elastic/kibana/blob/411ff0d0aefe795afe4b642dcf19e68ca42d75f2/x-pack/plugins/licensing/server/plugin.ts#L184).
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue May 5, 2023
Fixes elastic#150539

When handling route resolver errors, we now check to see if the error
was triggered by an expired license, if so we redirect to the license
management page rather than the access denied page.

This is hard to test as you need an expired license. One way to spoof
this is by editing code in the licensing plugin to inject expired
license details.

```
response.license.expiry_date_in_millis = 1683205426704;
response.license.status = 'expired';
```
Adding this below [this
line](https://github.com/elastic/kibana/blob/411ff0d0aefe795afe4b642dcf19e68ca42d75f2/x-pack/plugins/licensing/server/plugin.ts#L184).

(cherry picked from commit 14f5b9e)
kibanamachine added a commit that referenced this issue May 5, 2023
# Backport

This will backport the following commits from `main` to `8.8`:
- [[ML] Fixing expired license redirection
(#156703)](#156703)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2023-05-05T09:56:30Z","message":"[ML]
Fixing expired license redirection (#156703)\n\nFixes
#150539 handling
route resolver errors, we now check to see if the error\r\nwas triggered
by an expired license, if so we redirect to the license\r\nmanagement
page rather than the access denied page.\r\n\r\nThis is hard to test as
you need an expired license. One way to spoof\r\nthis is by editing code
in the licensing plugin to inject expired\r\nlicense
details.\r\n\r\n```\r\nresponse.license.expiry_date_in_millis =
1683205426704;\r\nresponse.license.status = 'expired';\r\n```\r\nAdding
this below
[this\r\nline](#156703
Fixing expired license redirection (#156703)\n\nFixes
#150539 handling
route resolver errors, we now check to see if the error\r\nwas triggered
by an expired license, if so we redirect to the license\r\nmanagement
page rather than the access denied page.\r\n\r\nThis is hard to test as
you need an expired license. One way to spoof\r\nthis is by editing code
in the licensing plugin to inject expired\r\nlicense
details.\r\n\r\n```\r\nresponse.license.expiry_date_in_millis =
1683205426704;\r\nresponse.license.status = 'expired';\r\n```\r\nAdding
this below
[this\r\nline](#156703
Fixing expired license redirection (#156703)\n\nFixes
#150539 handling
route resolver errors, we now check to see if the error\r\nwas triggered
by an expired license, if so we redirect to the license\r\nmanagement
page rather than the access denied page.\r\n\r\nThis is hard to test as
you need an expired license. One way to spoof\r\nthis is by editing code
in the licensing plugin to inject expired\r\nlicense
details.\r\n\r\n```\r\nresponse.license.expiry_date_in_millis =
1683205426704;\r\nresponse.license.status = 'expired';\r\n```\r\nAdding
this below
[this\r\nline](https://github.com/elastic/kibana/blob/411ff0d0aefe795afe4b642dcf19e68ca42d75f2/x-pack/plugins/licensing/server/plugin.ts#L184).","sha":"14f5b9e883a4dd9e8ec85ad62b316caba7bf42ac"}}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
smith pushed a commit to smith/kibana that referenced this issue May 5, 2023
Fixes elastic#150539

When handling route resolver errors, we now check to see if the error
was triggered by an expired license, if so we redirect to the license
management page rather than the access denied page.

This is hard to test as you need an expired license. One way to spoof
this is by editing code in the licensing plugin to inject expired
license details.

```
response.license.expiry_date_in_millis = 1683205426704;
response.license.status = 'expired';
```
Adding this below [this
line](https://github.com/elastic/kibana/blob/411ff0d0aefe795afe4b642dcf19e68ca42d75f2/x-pack/plugins/licensing/server/plugin.ts#L184).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :ml v8.8.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants