Skip to content

Product license verification in Console #518

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

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

Alevsk
Copy link
Contributor

@Alevsk Alevsk commented Dec 15, 2020

Description

Operator UI - Provide and store License key

  • New License section in Operator UI will allow user to provide the
    license key via input form
  • New License section in Operator UI will allow the user to fetch the
    license key using subnet credentials
  • Console backend has to verify provided license is valid -
    https://godoc.org/github.com/minio/minio/pkg/licverifier#example-package
  • Console backend has to store the license key in k8s secrets

Operator UI - Set license to tenant during provisioning

  • Check if license key exists in k8s secret during tenant creation
  • If License is present attach the license-key jwt to the new console
    tenant via an environment variable

Operator UI - Set license for an existing tenant

  • Tenant view will display information about the current status of the
    Tenant License
  • If Tenant doesn't have a License then Operator-UI will allow to attach
    new license by clicking the Add License button
  • Console backend will extract the license from the k8s secret and save
    the license-key jwt in the tenant console environment variable and
    redeploy

How it looks

Display license information in Operator-ui

Screen Shot 2020-12-16 at 4 59 27 PM

Activate Product button

Screen Shot 2020-12-16 at 4 59 42 PM

Activate Product Modal in Operator-ui

Screen Shot 2020-12-16 at 4 59 47 PM

Tenant Information - Product Activated

Screen Shot 2020-12-18 at 3 36 55 PM

Tenant Information - License exists in k8s but tenant is not activated

Screen Shot 2020-12-18 at 4 40 42 PM

Tenant Information - Tenant is not activated and License is not present in k8s

Screen Shot 2020-12-18 at 6 12 47 PM

@Alevsk Alevsk self-assigned this Dec 15, 2020
@Alevsk Alevsk added the WIP This PR is WIP and cannot be merged yet label Dec 15, 2020
This was linked to issues Dec 15, 2020
Copy link
Collaborator

@cesnietor cesnietor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments added.
Other question: How do we allow the trial version?

@cesnietor
Copy link
Collaborator

If the errors are informative we should return them as well :
for instance original error: license is not present shows:
Screen Shot 2020-12-18 at 4 04 04 PM

@Alevsk Alevsk force-pushed the subnet-integration branch 2 times, most recently from f0a9ac7 to d65783e Compare December 20, 2020 05:02
@Alevsk Alevsk force-pushed the subnet-integration branch 3 times, most recently from c916b57 to 42fc6ff Compare December 22, 2020 06:04
@Alevsk
Copy link
Contributor Author

Alevsk commented Dec 22, 2020

If the errors are informative we should return them as well :
for instance original error: license is not present shows:
Screen Shot 2020-12-18 at 4 04 04 PM

Screen Shot 2020-12-22 at 00 16 54

Screen Shot 2020-12-22 at 00 16 42

Screen Shot 2020-12-22 at 10 18 10

Added validation so the buttons are disabled if the input fields are empty

@Alevsk Alevsk force-pushed the subnet-integration branch 2 times, most recently from df6666d to d6aebd6 Compare December 22, 2020 16:21
@Alevsk Alevsk changed the title [WIP] Subnet integration Product license verification in Console Dec 22, 2020
@Alevsk Alevsk requested a review from cesnietor December 22, 2020 16:21
@Alevsk Alevsk removed the WIP This PR is WIP and cannot be merged yet label Dec 22, 2020
@Alevsk Alevsk force-pushed the subnet-integration branch from 919ebef to eab6292 Compare December 30, 2020 20:29
@Alevsk Alevsk requested a review from bexsoft December 30, 2020 20:29
bexsoft
bexsoft previously approved these changes Jan 4, 2021
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1,5 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2019 MinIO, Inc.
// Copyright (c) 2020 MinIO, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are mass replacing files with this, perhaps let's go to 2021 xD

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change must be done after we merge log search & prometheus functionality to avoid multiple merge conflicts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2021 all the things!

dvaldivia
dvaldivia previously approved these changes Jan 11, 2021
Operator UI - Provide and store License key
- New License section in Operator UI will allow user to provide the
  license key via input form
- New License section in Operator UI will allow the user to fetch the
  license key using subnet credentials
-  Console backend has to verify provided license is valid -
   https://godoc.org/github.com/minio/minio/pkg/licverifier#example-package
-  Console backend has to store the license key in k8s secrets

Operator UI - Set license to tenant during provisioning
- Check if license key exists in k8s secret during tenant creation
- If License is present attach the license-key jwt to the new console
tenant via an environment variable

Operator UI - Set license for an existing tenant
- Tenant view will display information about the current status of the
  Tenant License
- If Tenant doesn't have a License then Operator-UI will allow to attach
new license by clicking the Add License button
- Console backend will extract the license from the k8s secret and save
the license-key jwt in the tenant console environment variable and
redeploy
@Alevsk Alevsk force-pushed the subnet-integration branch from 409dbeb to ab91f24 Compare January 11, 2021 19:08
@Alevsk Alevsk requested review from bexsoft and dvaldivia January 11, 2021 19:08
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dvaldivia dvaldivia merged commit f3bcfc3 into minio:master Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License Verification Product license verification in Console
4 participants