Skip to content

license_key_entitlements#36452

Merged
alex-hunt-materialize merged 1 commit into
mainfrom
license_key_entitlements
May 12, 2026
Merged

license_key_entitlements#36452
alex-hunt-materialize merged 1 commit into
mainfrom
license_key_entitlements

Conversation

@alex-hunt-materialize
Copy link
Copy Markdown
Contributor

Add a new entitlements field to our license keys, which is a list of strings.

Motivation

Part of https://linear.app/materializeinc/issue/DEP-130/include-entitlements-in-newly-generated-license-keys
The first use case for these entitlements are for downloading the Ory Enterprise images through our registry proxy. Not all license keys will be allowed to get ory images.

Verification

New rust tests checking serialization/deserialization both with and without entitlements.

@alex-hunt-materialize alex-hunt-materialize force-pushed the license_key_entitlements branch from bec463d to cd879d2 Compare May 7, 2026 09:35
@jubrad jubrad self-requested a review May 7, 2026 15:01
/// Repeatable: each `--entitlement <name>` adds one entitlement to the
/// signed key (e.g. `--entitlement ory`).
#[clap(long = "entitlement")]
entitlements: Vec<String>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not positive if Vec is the right shape.
Abrief discussion:

We do have https://github.com/MaterializeInc/materialize/pull/32317/changes#diff-c01e42909e80f54d64977d77b5db88d93959e5e91454a4fcd8f650409848c3d4R144

I think this makes sense if we roughly think of these as "FeatureFlags" which are always bool, and we treat inclusion as true, and omission as take the default. If we wanted to adopt broader systemVar it could be done in a seperate field.

Copy link
Copy Markdown
Contributor Author

@alex-hunt-materialize alex-hunt-materialize May 11, 2026

Choose a reason for hiding this comment

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

That seems very complicated. We also don't want to lock to a specific version of MZ, and we don't have access to this code from the oci-registry-proxy repo.

I see the work entitlement as "something you are allowed to get". To me, this is a simple boolean, and omission is false (or default I guess, but if you aren't "entitled" to it, the default is probably false).

Do you have a more concrete example of what type you want here? I don't really want to be juggling serde_json::Value everywhere.

Copy link
Copy Markdown
Member

@jubrad jubrad left a comment

Choose a reason for hiding this comment

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

Yeah, I think I've convinced myself that this makes sense.

@alex-hunt-materialize alex-hunt-materialize marked this pull request as ready for review May 11, 2026 10:45
@alex-hunt-materialize alex-hunt-materialize merged commit 042c213 into main May 12, 2026
122 checks passed
@alex-hunt-materialize alex-hunt-materialize deleted the license_key_entitlements branch May 12, 2026 08:49
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.

2 participants