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

Add EE #671

Merged
merged 45 commits into from
Dec 21, 2022
Merged

Add EE #671

merged 45 commits into from
Dec 21, 2022

Conversation

ezekg
Copy link
Member

@ezekg ezekg commented Oct 14, 2022

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
Copy link
Member Author

ezekg commented Oct 14, 2022

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
Copy link
Member Author

ezekg commented Oct 14, 2022

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

Meh. Maybe later.

@ezekg
Copy link
Member Author

ezekg commented Oct 14, 2022

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.

@ezekg ezekg force-pushed the feature/add-ee branch 2 times, most recently from 5bc9a6c to 49dfe01 Compare October 14, 2022 22:18
@ezekg
Copy link
Member Author

ezekg commented Oct 15, 2022

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
Copy link
Member Author

ezekg commented Oct 16, 2022

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
Copy link
Member Author

ezekg commented Oct 16, 2022

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
Copy link
Member Author

@ezekg ezekg Oct 19, 2022

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
@ezekg ezekg force-pushed the feature/add-ee branch 4 times, most recently from 18129ee to 3655fa4 Compare October 20, 2022 17:31
@ezekg
Copy link
Member Author

ezekg commented Oct 20, 2022

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