Permissions
Permissions determine the level of access that a user has to various components of the Feature Store. For example, depending on the level of permission granted, a user may be authorized to edit feature sets, while another user with limited view-only permission can only observe the feature set.
Levels of permission
Feature Store has six levels of permission:
These roles apply both at the workspace level (governing the workspace and, as a prerequisite, access to the feature sets it contains) and at the feature set level (governing a single feature set). See Workspaces API for how workspaces replace the legacy Projects concept.
Additionally, Feature Store also has the concept of an admin account. An admin is any user with the admin role specified in their identity provider. Admin users can perform additional management tasks.
The name of the claim storing the roles and name of admin role is configurable during Feature Store deployment.
Owner
- Owner role on a workspace
- Owner permission for feature sets
You become the owner by creating a workspace. As the owner, you can delete the workspace, manage its access level, and assign roles to other users (currently only through the UI — see the note below). As a workspace owner, you can manage every feature set within the workspace.
You become the owner by creating a feature set. As the owner, you can remove the feature set and assign the owner, editor, consumer, sensitive consumer or viewer permission levels to other users.
As the owner, you have all the other permissions.
- Editor
- Sensitive consumer
- Consumer
- Viewer
- Metadata viewer
Editor
- Editor role on a workspace
- Editor permission for feature sets
If you have the editor role on a workspace, you are authorized to update the workspace's metadata and register new feature sets within it. As a workspace editor, you can also manage the feature sets within the workspace.
If you have editor permission for a feature set, you are authorized to update the feature set's metadata and call ingest on the feature set.
As an editor, you also have the following permissions,
- Sensitive consumer
- Consumer
- Viewer
- Metadata viewer
Sensitive consumer
- Sensitive consumer role on a workspace
- Sensitive consumer permission for feature sets
If you have the sensitive consumer role on a workspace, you are authorized to list and obtain feature sets from the workspace, with sensitive consumer access to those feature sets.
If you have sensitive consumer permission for a feature set, you are authorized to call retrieve on
the feature set. The retrieved data contains data in its original,
unmasked variant (raw data).
As a sensitive consumer, you also have the following permissions:
- Consumer
- Viewer
- Metadata viewer
Consumer
- Consumer role on a workspace
- Consumer permission for feature sets
If you have the consumer role on a workspace, you are authorized to list and obtain feature sets from the workspace. In other words, as a consumer of a workspace, you can retrieve data from its feature sets.
If you have consumer permission for a feature set, you are authorized to call retrieve on
the feature set. Among retrieved features, only masked features will be displayed as
hashed values.
As a consumer, you also have the following permissions:
- Viewer
- Metadata viewer
Viewer
- Viewer role on a workspace
- Viewer permission for feature sets
If you have the viewer role on a workspace, you are authorized to see which feature sets are within the workspace. This behaviour is also influenced by the Workspace access levels.
This permission allows you to get a feature set and various information about it, including preview access. Viewer is the lowest permission level that can call preview on a feature set.
As a viewer, you also have the following permission:
- Metadata viewer
Metadata viewer
- Metadata viewer role on a workspace
- Metadata viewer permission for feature sets
If you have the metadata viewer role on a workspace, you are authorized to see which feature sets are within the workspace. This is metadata-only access — you cannot retrieve or preview data. Metadata viewer is the default level of access for public workspaces, granting the minimum access needed to discover and inspect feature sets without accessing underlying data.
If you have metadata viewer permission for a feature set, you can view the feature set's metadata, features, feature metrics, model references, ingest history, and pin or unpin the feature set. You can also request higher permissions.
Metadata viewer cannot call preview or retrieve on a feature set — it is metadata-only access. To preview data, you need at least Viewer permission.
Workspace access levels
Access levels on a workspace control what users can additionally do and are reflected internally by permissions. See Workspace access levels for more information.
Feature set permissions API
Permission grant, revoke, request, and listing operations are performed on a feature set. First obtain the feature set through its workspace:
- Python
workspace = client.workspaces.list(name="default")[0]
fs = workspace.feature_sets.get_by_name("training_fs")
Working with users
The add_* and remove_* methods operate on users, not raw email
strings. A user is either a User object (returned by the users API and
by the list_* methods below) or a "users/<UUID>" resource name.
When you only know someone's email address, resolve it first with
client.users.find_by_email(...). Email is not guaranteed to be unique in
the identity provider, so this returns a list of every matching user.
Make sure you pick the right one before granting:
- Python
matches = client.users.find_by_email("bob@h2o.ai")
if len(matches) != 1:
raise ValueError(f"ambiguous email: {matches}")
bob = matches[0]
alice = client.users.find_by_email("alice@h2o.ai")[0]
Before you can grant a feature set role to a user, that user must already hold a workspace-level role on the parent workspace. Otherwise the server rejects the grant.
Granting a workspace-level role to another user is not currently exposed
through the Python client — the workspace creator is granted the owner
role automatically, but there is no add_* equivalent for workspaces.
This is achieved through the workspace UI instead.
Add permissions to a feature set
Each add_* method accepts a single user or an iterable of users:
- Python
fs.add_owners(bob)
fs.add_editors(bob)
fs.add_consumers([bob, alice])
fs.add_sensitive_consumers(alice)
fs.add_viewers(alice)
fs.add_metadata_viewers(alice)
Remove permissions from a feature set
Each remove_* method accepts the same inputs as its add_* counterpart:
- Python
fs.remove_owners(bob)
fs.remove_editors(bob)
fs.remove_consumers([bob, alice])
fs.remove_sensitive_consumers(alice)
fs.remove_viewers(alice)
fs.remove_metadata_viewers(alice)
List feature set permissions
Each list_* method returns the users that currently hold the
corresponding role. The returned items are User objects, additionally
carrying the access_type and resource_type the role was granted
through, so they can be passed straight back into the matching
remove_* method:
- Python
fs.list_owners()
fs.list_editors()
fs.list_consumers()
fs.list_sensitive_consumers()
fs.list_viewers()
fs.list_metadata_viewers()
# Example: revoke Bob's owner role, matching on email
for user in fs.list_owners():
if user.email == "bob@h2o.ai":
fs.remove_owners(user)
Request access to a feature set
When cooperating with several users, you may not have the specific permission you need on a feature set. You can request one from the feature set owners.
To begin, check your current access:
- Python
from h2o_featurestore.core.access_type import AccessType
my_access = fs.current_permission
# returns an AccessType, or None if you have no active permission
If your level of permission is not sufficient, request access:
- Python
request_id = fs.request_access(AccessType.CONSUMER, "Preparing the best model")
You can track your pending permission requests through the client API:
- Python
my_requests = client.acl.requests.feature_sets.list()
If you change your mind before a request is processed, you can cancel it by withdrawing it:
- Python
requests = list(client.acl.requests.feature_sets.list())
request = requests[0] # pick the request you want to withdraw
request.withdraw()
When a request no longer appears in the pending list, it has been
processed. To see the outcome, list your active permissions. The
filters argument is an optional list of permission-state strings —
"GRANTED", "REJECTED", or "PENDING". It defaults to ["GRANTED"]
(the most common case). If you do not find your original request granted,
it was most likely either rejected, or granted and then revoked.
- Python
# Granted permissions (default)
my_permissions = client.acl.permissions.feature_sets.list()
# Verify a rejected request by specifying the corresponding filter
rejected = client.acl.permissions.feature_sets.list(["REJECTED"])
Manage requests and permissions
As a feature set owner, other users can request access to your feature set.
To list the requests pending for you to handle, and either approve or reject them, call:
- Python
manageable = list(client.acl.requests.feature_sets.list_manageable())
request = manageable[0] # pick the request you want to handle
request.approve("it will be fun")
# or: request.reject("it's not ready yet")
To revoke access you have previously granted, list the manageable
permissions (not requests) and call revoke() on the one you want to
remove:
- Python
manageable = list(client.acl.permissions.feature_sets.list_manageable())
permission = manageable[0] # pick the permission you want to revoke
permission.revoke("user left the workspace")
Inspecting permissions and requests
The objects returned by the list() and list_manageable() methods expose
their state through properties (not method calls). The following is not
exhaustive:
- Python
for request in client.acl.requests.feature_sets.list_manageable():
request.user # the user associated with the request
request.access_type # requested AccessType
request.status # permission state
request.reason # reason provided with the request
request.resource_id # id of the target feature set
request.resource_type # resource type
request.created_on
request.last_update_on
fs = request.get_feature_set() # load the target feature set
- Submit and view feedback for this page
- Send feedback about H2O Feature Store to cloud-feedback@h2o.ai