Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/admin/project-mapping/edit-mapping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
79 changes: 79 additions & 0 deletions docs/setup_installation/admin/configure-project-mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Configure group to project mapping

## Introduction
A group-to-project mapping lets you automatically add all members of a Hopsworks group to a project, eliminating the need to add each user individually. To create a mapping, you simply select a Hopsworks group, choose the project it should be linked to, and assign the role that its members will have within that project.

Once a mapping is created, project membership is controlled through Hopsworks group membership. Any updates made to the Hopsworks group—such as adding or removing users—will automatically be reflected in the project membership. For example, if a user is removed from the Hopsworks group, they will also be removed from the corresponding project.

## Prerequisites

1. Hopsworks group mapping sync enabled. This can be done by setting the variable ```hw_group_mapping_sync_enabled=true```.
See [Cluster Configuration](../variables.md) on how to change variable values in Hopsworks.
<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-variables.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-variables.png" alt="Enable Hopsworks mapping" />
</a>
<figcaption>Enable Hopsworks mapping</figcaption>
</figure>

If you can not find the variable ```hw_group_mapping_sync_enabled``` create it by clicking on **New variable**.

<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-hw-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-hw-mapping.png" alt="Create Hopsworks mapping enabled variable" />
</a>
<figcaption>Create Hopsworks group mapping enabled variable</figcaption>
</figure>

### Step 1: Create a mapping
To create a mapping go to **Cluster Settings** by clicking on your name in the top right
corner of the navigation bar and choosing *Cluster Settings* from the dropdown menu.
In the _Project mapping_ tab, you can create a new mapping by clicking on _Create new mapping_.

<figure>
<a href="../../../../assets/images/admin/project-mapping/project-mapping-empty.png">
<img src="../../../../assets/images/admin/project-mapping/project-mapping-empty.png" alt="Project mapping tab" />
</a>
<figcaption>Project mapping</figcaption>
</figure>

This will take you to the create mapping page shown below
<figure>
<a href="../../../../assets/images/admin/project-mapping/create-hw-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/create-hw-mapping.png" alt="Create mapping" />
</a>
<figcaption>Create mapping</figcaption>
</figure>

Here you can enter your Hopsworks group and map it to a project from the _Project_ drop down list.
You can also choose the _Project role_ users will be assigned when they are added to the project.

Finally, click on _Create mapping_ and go back to mappings. You should see the newly created mapping(s) as shown below.

<figure>
<a href="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png">
<img src="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png" alt="Project mappings" />
</a>
<figcaption>Project mappings</figcaption>
</figure>

### Step 2: Edit a mapping

From the list of mappings click on the edit button (:material-pencil:). This will open a popup that will allow you to change the _group_, _project name_, and _project role_ of a mapping.

<figure>
<a href="../../../../assets/images/admin/project-mapping/edit-hw-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/edit-hw-mapping.png" alt="Edit mapping" />
</a>
<figcaption>Edit mapping</figcaption>
</figure>

!!!Warning
Updating a mapping's _group_ or _project name_ will remove all members of the previous group from the project.

### Step 3: Delete a mapping

To delete a mapping click on the delete button.

!!!Warning
Deleting a mapping will remove all members of that group from the project.
35 changes: 23 additions & 12 deletions docs/setup_installation/admin/ldap/configure-project-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@

## Introduction

A group to project mapping allows you to add members of your LDAP group to a project without having to
add each user manually. A mapping is created by specifying a group from LDAP that will be mapped to a project in
Hopsworks and what role the members of that group will be assigned in the project.
A group-to-project mapping lets you automatically add all members of an LDAP group to a project, eliminating the need to add each user individually. To create a mapping, you simply select the LDAP group, choose the project it should be linked to, and assign the role that its members will have within that project.

Once a mapping is created, project membership is managed by LDAP group membership. Any change to group membership in LDAP will be reflected
in Hopsworks i.e. removing a user from the LDAP group will also remove them from the project.
Once a mapping is created, project membership is controlled through LDAP group membership. Any updates made to the LDAP group—such as adding or removing users—will automatically be reflected in Hopsworks. For example, if a user is removed from the LDAP group, they will also be removed from the corresponding project.

## Prerequisites
1. A server configured with LDAP or Kerberos. See [Server Configuration for Kerberos](../configure-server/#server-configuration-for-kerberos) and
[Server Configuration for LDAP](../configure-server/#server-configuration-for-ldap) for instructions on how to do this.
2. LDAP group mapping sync enabled. This can be done by setting the variable ```ldap_group_mapping_sync_enabled=true```.
See [Cluster Configuration](../variables.md) on how to change variable values in Hopsworks.
<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-variables.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-variables.png" alt="Enable ldap mapping" />
</a>
<figcaption>Enable ldap mapping</figcaption>
</figure>

If you can not find the variable ```ldap_group_mapping_sync_enabled``` create it by clicking on **New variable**.

<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-ldap-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-ldap-mapping.png" alt="Create ldap mapping enabled variable" />
</a>
<figcaption>Create ldap mapping enabled variable</figcaption>
</figure>

### Step 1: Create a mapping
To create a mapping go to **Cluster Settings** by clicking on your name in the top right
Expand All @@ -29,20 +41,20 @@ In the _Project mapping_ tab, you can create a new mapping by clicking on _Creat

This will take you to the create mapping page shown below
<figure>
<a href="../../../../assets/images/admin/project-mapping/create-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/create-mapping.png" alt="Create mapping" />
<a href="../../../../assets/images/admin/project-mapping/create-ldap-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/create-ldap-mapping.png" alt="Create mapping" />
</a>
<figcaption>Create mapping</figcaption>
</figure>

Here you can choose multiple Remote groups from your LDAP groups and map them to a project from the _Project_ drop down list.
Here you can choose from your LDAP groups and map them to a project from the _Project_ drop down list.
You can also choose the _Project role_ users will be assigned when they are added to the project.

Finally, click on _Create mapping_ and go back to mappings. You should see the newly created mapping(s) as shown below.

<figure>
<a href="../../../../assets/images/admin/project-mapping/project-mappings.png">
<img src="../../../../assets/images/admin/project-mapping/project-mappings.png" alt="Project mappings" />
<a href="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png">
<img src="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png" alt="Project mappings" />
</a>
<figcaption>Project mappings</figcaption>
</figure>
Expand All @@ -59,8 +71,7 @@ Finally, click on _Create mapping_ and go back to mappings. You should see the n

### Step 2: Edit a mapping

From the list of mappings click on the edit button (:material-pencil:). This will make the row editable and allow you to change
the _remote group_, _project name_, and _project role_ of a mapping.
From the list of mappings click on the edit button (:material-pencil:). This will open a popup that will allow you to change the _remote group_, _project name_, and _project role_ of a mapping.

<figure>
<a href="../../../../assets/images/admin/project-mapping/edit-mapping.png">
Expand Down
84 changes: 84 additions & 0 deletions docs/setup_installation/admin/oauth2/configure-project-mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Configure OAuth2 group to project mapping

## Introduction
A group-to-project mapping lets you automatically add all members of an OAuth2 group to a project, eliminating the need to add each user individually. To create a mapping, you simply select an OAuth2 group, choose the project it should be linked to, and assign the role that its members will have within that project.

Once a mapping is created, project membership is controlled through OAuth2 group membership. Any updates made to the OAuth2 group—such as adding or removing users—will automatically be reflected in Hopsworks. For example, if a user is removed from the OAuth2 group, they will also be removed from the corresponding project.

## Prerequisites
1. A server configured with OAuth2. See [Register Identity Provider in Hopsworks](../create-client) for instructions on how to do this.
2. OAuth2 group mapping sync enabled. This can be done by setting the variable ```oauth_group_mapping_sync_enabled=true```.
See [Cluster Configuration](../variables.md) on how to change variable values in Hopsworks.
<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-variables.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-variables.png" alt="Enable OAuth2 mapping" />
</a>
<figcaption>Enable OAuth2 mapping</figcaption>
</figure>

If you can not find the variable ```oauth_group_mapping_sync_enabled``` create it by clicking on **New variable**.

<figure>
<a href="../../../../assets/images/admin/project-mapping/configuration-oauth-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/configuration-oauth-mapping.png" alt="Create OAuth2 mapping enabled variable" />
</a>
<figcaption>Create OAuth2 mapping enabled variable</figcaption>
</figure>

### Step 1: Create a mapping
To create a mapping go to **Cluster Settings** by clicking on your name in the top right
corner of the navigation bar and choosing *Cluster Settings* from the dropdown menu.
In the _Project mapping_ tab, you can create a new mapping by clicking on _Create new mapping_.

<figure>
<a href="../../../../assets/images/admin/project-mapping/project-mapping-empty.png">
<img src="../../../../assets/images/admin/project-mapping/project-mapping-empty.png" alt="Project mapping tab" />
</a>
<figcaption>Project mapping</figcaption>
</figure>

This will take you to the create mapping page shown below
<figure>
<a href="../../../../assets/images/admin/project-mapping/create-oauth-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/create-oauth-mapping.png" alt="Create mapping" />
</a>
<figcaption>Create mapping</figcaption>
</figure>

Here you can enter your OAuth2 group and map it to a project from the _Project_ drop down list.
You can also choose the _Project role_ users will be assigned when they are added to the project.

Finally, click on _Create mapping_ and go back to mappings. You should see the newly created mapping(s) as shown below.

<figure>
<a href="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png">
<img src="../../../../assets/images/admin/project-mapping/group-to-project-mappings.png" alt="Project mappings" />
</a>
<figcaption>Project mappings</figcaption>
</figure>

!!!Note
Make sure the group names from your OAuth2 provider match the one you entered above.

If your identity provider uses a claim name other than ```groups``` or ```roles``` to represent group information, be sure to specify that claim name in the **Group Claim** field when setting up your identity provider.

### Step 2: Edit a mapping

From the list of mappings click on the edit button (:material-pencil:). This will open a popup that will allow you to change the _remote group_, _project name_, and _project role_ of a mapping.

<figure>
<a href="../../../../assets/images/admin/project-mapping/edit-mapping.png">
<img src="../../../../assets/images/admin/project-mapping/edit-mapping.png" alt="Edit mapping" />
</a>
<figcaption>Edit mapping</figcaption>
</figure>

!!!Warning
Updating a mapping's _remote group_ or _project name_ will remove all members of the previous group from the project.

### Step 3: Delete a mapping

To delete a mapping click on the delete button.

!!!Warning
Deleting a mapping will remove all members of that group from the project.
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ nav:
- Project Management: setup_installation/admin/project.md
- Configure Alerts: setup_installation/admin/alert.md
- IAM Role Chaining: setup_installation/admin/roleChaining.md
- Configure Project Mapping: setup_installation/admin/configure-project-mapping.md
- Monitoring:
- Services Dashboards: setup_installation/admin/monitoring/grafana.md
- Export metrics: setup_installation/admin/monitoring/export-metrics.md
Expand All @@ -239,6 +240,7 @@ nav:
- Register an Identity Provider: setup_installation/admin/oauth2/create-client.md
- Create Okta Client: setup_installation/admin/oauth2/create-okta-client.md
- Create Azure Client: setup_installation/admin/oauth2/create-azure-client.md
- Configure Project Mapping: setup_installation/admin/oauth2/configure-project-mapping.md
- Configure LDAP/Kerberos:
- Configure LDAP: setup_installation/admin/ldap/configure-ldap.md
- Configure Kerberos: setup_installation/admin/ldap/configure-krb.md
Expand Down