Skip to content

Add EE - #671

Merged
ezekg merged 45 commits into
masterfrom
feature/add-ee
Dec 21, 2022
Merged

Add EE#671
ezekg merged 45 commits into
masterfrom
feature/add-ee

Conversation

@ezekg

@ezekg ezekg commented Oct 14, 2022 •

Copy link
Copy Markdown
Member

Part of #644. Adds an Enterprise Edition, with licensing for the following Keygen EE features:

  • Custom permissions
  • Request logs
  • Event logs

Making these EE features not only pushes the right market segment towards EE, but it improves performance for CE, since requests logs and event logs are high-throughput and require quite a bit of extra storage.

Before deploy

  • Issue a NON-EXPIRING license and NON-EXPIRING license file for Keygen Cloud and add the encrypted license file and license key to the Heroku env. We'll be running Keygen EE in Keygen Cloud to license Keygen EE, while eventually using Keygen Cloud to distribute Keygen EE. 🤯

After deploy

  • Rename to EventNotificationWorker2 to EventNotificationWorker.
  • 🍻

@ezekg ezekg mentioned this pull request Oct 14, 2022
@ezekg

ezekg commented Oct 14, 2022 •

Copy link
Copy Markdown
Member Author

I'd like to only enforce licensing in non-test environments. That will make tests easier to run (i.e. we won't have to add a test license to CI). Alternatively, we could set up @skip/ce flags to skip certain tests for CE.

@ezekg

ezekg commented Oct 14, 2022 •

Copy link
Copy Markdown
Member Author

Should we add limits to number of licenses? E.g. a LICENSES entitlement with limit metadata.

Meh. Maybe later.

@ezekg

ezekg commented Oct 14, 2022

Copy link
Copy Markdown
Member Author

A consequence of making event logs an EE feature: the triggers for the expiration basis, so all but FROM_CREATION are non-functional. We'll need to update policies to only allow the FROM_CREATION expiration basis for CE.

Comment thread app/controllers/api/v1/licenses_controller.rb Outdated
@ezekg
ezekg force-pushed the feature/add-ee branch 2 times, most recently from 5bc9a6c to 49dfe01 Compare October 14, 2022 22:18
@ezekg

ezekg commented Oct 15, 2022 •

Copy link
Copy Markdown
Member Author

I still feel weird adding event and request logs to EE. What if we introduced 2 editions — Pro and EE. That way Pro could have event logs, request logs, entitlements, and maybe processes. And CE can have the rest. Pro could be priced lower, so that it is affordable for SMBs, while EE can have a higher price tag.

Meh. I don't like having Pro vs EE. Let's just stick to CE and EE.

@ezekg

ezekg commented Oct 16, 2022 •

Copy link
Copy Markdown
Member Author

The real reason I feel weird about the event logs being EE is that it removes the expiration basis behavior from CE, which is utilized by a sizeable percentage of Keygen users. We should decouple event notification from event logging.

We’ll need to rework our event notification system to emit events, but not rely on event logs.

@ezekg
ezekg force-pushed the feature/add-ee branch 6 times, most recently from ed84cc8 to 7c7a83a Compare October 16, 2022 08:41
@ezekg

ezekg commented Oct 16, 2022

Copy link
Copy Markdown
Member Author

Accessing event and request logs, and setting permissions via the console should fail in CE. Maybe look at 1984 and see if there are hooks we can use for detecting if we’re in a console session.

@@ -0,0 +1,38 @@
# frozen_string_literal: true

# FIXME(ezekg) Rename to EventNotificationWorker once old jobs are processed

@ezekg ezekg Oct 19, 2022 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note to rename to EventNotificationWorker after deploy

@ezekg
ezekg force-pushed the feature/add-ee branch 3 times, most recently from 35d9675 to 0b05a74 Compare October 19, 2022 17:43
Comment thread lib/keygen/ee/license_file.rb
@ezekg
ezekg force-pushed the feature/add-ee branch 4 times, most recently from 18129ee to 3655fa4 Compare October 20, 2022 17:31
@ezekg

ezekg commented Oct 20, 2022

Copy link
Copy Markdown
Member Author

Need to write tests for EE licensing classes.

@ezekg
ezekg force-pushed the feature/add-ee branch 3 times, most recently from effe707 to 3619917 Compare October 20, 2022 21:53
Comment thread app/controllers/api/v1/licenses_controller.rb
@ezekg ezekg mentioned this pull request Dec 20, 2022
@ezekg
ezekg merged commit ac79644 into master Dec 21, 2022
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.

1 participant