Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Apr 17, 2024
2 parents cf99b38 + 0c802a4 commit 15c0885
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function SchemaTable({

const schemaFields = schemaMetadata ? schemaMetadata.fields : inputFields;

const descriptionRender = useDescriptionRenderer();
const descriptionRender = useDescriptionRenderer(editableSchemaMetadata);
const usageStatsRenderer = useUsageStatsRenderer(usageStats);
const tagRenderer = useTagsAndTermsRenderer(
editableSchemaMetadata,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { useState } from 'react';
import DOMPurify from 'dompurify';
import { SchemaField, SubResourceType } from '../../../../../../../types.generated';
import { EditableSchemaMetadata, SchemaField, SubResourceType } from '../../../../../../../types.generated';
import DescriptionField from '../../../../../dataset/profile/schema/components/SchemaDescriptionField';
import { useUpdateDescriptionMutation } from '../../../../../../../graphql/mutations.generated';
import { useMutationUrn, useRefetch } from '../../../../EntityContext';
import { useSchemaRefetch } from '../SchemaContext';
import { pathMatchesNewPath } from '../../../../../dataset/profile/schema/utils/utils';

export default function useDescriptionRenderer() {
export default function useDescriptionRenderer(editableSchemaMetadata: EditableSchemaMetadata | null | undefined) {
const urn = useMutationUrn();
const refetch = useRefetch();
const schemaRefetch = useSchemaRefetch();
Expand All @@ -20,7 +21,10 @@ export default function useDescriptionRenderer() {
};

return (description: string, record: SchemaField, index: number): JSX.Element => {
const displayedDescription = record?.description || description;
const relevantEditableFieldInfo = editableSchemaMetadata?.editableSchemaFieldInfo.find(
(candidateEditableFieldInfo) => pathMatchesNewPath(candidateEditableFieldInfo.fieldPath, record.fieldPath),
);
const displayedDescription = relevantEditableFieldInfo?.description || description;
const sanitizedDescription = DOMPurify.sanitize(displayedDescription);
const original = record.description ? DOMPurify.sanitize(record.description) : undefined;
const businessAttributeDescription =
Expand All @@ -39,7 +43,7 @@ export default function useDescriptionRenderer() {
baExpanded={!!expandedBARows[index]}
description={sanitizedDescription}
original={original}
isEdited={!!record.description}
isEdited={!!relevantEditableFieldInfo?.description}
onUpdate={(updatedDescription) =>
updateDescription({
variables: {
Expand Down
2 changes: 1 addition & 1 deletion docker/kafka-setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG KAFKA_DOCKER_VERSION=7.4.1
ARG KAFKA_DOCKER_VERSION=7.4.4

# Defining custom repo urls for use in enterprise environments. Re-used between stages below.
ARG ALPINE_REPO_URL=http://dl-cdn.alpinelinux.org/alpine
Expand Down
1 change: 1 addition & 0 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ module.exports = {
"Advanced Guides": [
"docs/how/delete-metadata",
"docs/how/configuring-authorization-with-apache-ranger",
"docs/managed-datahub/configuring-identity-provisioning-with-ms-entra",
"docs/how/backup-datahub",
"docs/how/restore-indices",
"docs/advanced/db-retention",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: "Configuring MS Entra with DataHub"
hide_title: true
---
import FeatureAvailability from '@site/src/components/FeatureAvailability';

# Entity Events API
<FeatureAvailability saasOnly />

# Configuring User/Group/Roles provisioning from MS Entra to DataHub

1. **Generate Personal Access Token**:
Generate a personal access token from [DataHub](https://datahubproject.io/docs/next/authentication/personal-access-tokens/#creating-personal-access-tokens).

2. **Integrate DataHub With MS Entra**: Follow steps [Integrate your SCIM endpoint with the Microsoft Entra provisioning service](https://learn.microsoft.com/en-gb/entra/identity/app-provisioning/use-scim-to-provision-users-and-groups#integrate-your-scim-endpoint-with-the-microsoft-entra-provisioning-service) to integrate DataHub SCIM endpoint into MS Entra.

a. Set the `Tenant URL` to `https://<hostname>/gms/openapi/scim/v2`. Replace `<hostname>` with your DataHub instance hostname.

b. Set the `Secret Token` to Personal Access Token created in Step 1.

3. **Update Attribute Mapping For Role**:

a. Go to `Provisioning` section inside the App and click on `Provision Microsoft Entra ID Users` as shown in below image

<p>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/scim/provisioning.png"/>
</p>

b. Click on `Add Mapping`

<p>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/scim/add-new-mapping.png"/>
</p>

c. Fill detail as shown in below image

<p>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/scim/edit-mapping-form.png"/>
</p>

d. **Create Role**: Go to `Provisioning` section and click on `application registration.` to create the role

<p>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/scim/application-registration.png"/>
</p>

Create three roles having `Display Name` and `Value` as mentioned below

- Admin
- Editor
- Reader

e. While creating the App Role set `Allowed member types` to `Users/Groups`

4. **Add Users/Groups/Roles in the App**: Go to application created in step #1 and click on `Add user/group` as shown in below image

<p>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/scim/add-user-group.png"/>
</p>

On the screen choose
- Group/User
- And role for the Group/User. The role should be one of the role created in Step 3

0 comments on commit 15c0885

Please sign in to comment.