datahub icon indicating copy to clipboard operation
datahub copied to clipboard

demo(data-access-management): data model design

Open lix-mms opened this issue 1 year ago • 10 comments

This is a demo request for data models regarding general data access management. Our organization has built a highly effective solution based on this model. We are willing to contribute this model design, but would like to first discuss the design with the community regarding various requirements and concerns. It would be very exciting if we can align upon the model design and eventually bring this whole valuable feature to the community.

A quick recap on the model design:

  • DataAccess is the new entity we introduce.
  • DataAccess key is the combination of the dataset URN and the principal URN (The principal is the subject who gains the access to the dataset). So it very clearly represents "Who has access to what".
  • DataAccessStatus, the crucial aspect of DataAccess, covers the whole life cycle of the access.
    • The status can change from PENDING, to APPROVED, to PROVISIONED, and finally to REVOKED.
    • All changes are automatically tracked by the model versioning in DataHub model framework - very sweet!
    • This is essential to auditing needs in data governance.
  • Various other aspects to denote necessary information:
    • DataAccessProperties: information about the access like retention period
    • DataAccessParties: involved actors like who made the request, who should approve the access, etc.
    • etc.

And in addition:

  • DataAccessConfiguration is a new aspect to a dataset. It defines how data access should be managed on particular datasets. This allows managing fine-grained access. (E.g. column/row-level security in BigQuery).
  • We use datahub-actions to handle event changes on DataAccess - very flexible and powerful. This means the core model can stay very simple and general, but platform-specific behavior can be implemented by the action process. This opens huge opportunities for advanced adoptions in the future.

Note the PR is not complete. We will need to clean up all the commits after we agree on the design so they can be merged with the cleanest state.

Since our solution is pretty advanced (but without loss of generality), we are open to offer more details, and to discuss which parts of the solution are the most useful to the community, and eventually prepare the contribution respectively.

lix-mms avatar Mar 15 '24 14:03 lix-mms

Some additional reference to preexisting work. This #10061 data model has a few advantages, it includes tracking the state and would maintain detailed lifecycle information. I am wondering if the concepts in this PR can include or extend the existing data model (first PR below).

From https://github.com/datahub-project/datahub/pull/9728

@pedro93 - pointed out an earlier set of PRs which actually somewhat duplicates this PR. It seems like there is an access aspect which was only added to dataset entity and some UI work as well. This earlier work doesn't track the status but does allow for a link to an external url to be able to request access which is then handled outside of DataHub.

https://github.com/datahub-project/datahub/pull/8267 https://github.com/datahub-project/datahub/pull/8541

david-leifker avatar Mar 25 '24 22:03 david-leifker

@david-leifker Thanks for the response! Yes we think tracking the status is useful and important, and fits well into the capabilities of datahub. The status can be updated either manually or via automated processes.

Perhaps this model could complement the existing role-based workflow to some degree, or be integrated as a model supporting an independent alternative workflow, and the user can choose which one to use to better fit their own access management practice.

lix-mms avatar Mar 26 '24 11:03 lix-mms

@lix-mms - I am interesting in moving this PR forward, how can I help?

david-leifker avatar Jul 31 '24 16:07 david-leifker

@lix-mms - I am interesting in moving this PR forward, how can I help?

Hey @david-leifker. Glad to hear that! Actually we are working on a extended design based on this model, basically to treat this DataAccess model as a representation of individual access records in the data platform system, but introduce a higher-level wrapper model, namely AccessRequest, which can contain one or more instances of DataAccess. This fits the customer requirements like bundling multiple data access (e.g. access to the same dataset by multiple principals) under the same request, which appear quite often in our organisation. The life-cycle management can also be done on that level.

Also at the same time, we are generalising the DataAccess model so it represents access not only to datasets, but also to Containers, Charts, Dashboards etc. We are changing the type of the first DatasetUrn to the generic Urn to fit this purpose, and already started adopting it in our own solution.

I'll discuss with my team in the next few days, to see if we want to update this PR or open a new clean PR to present the new design. Of course, feel free to drop your comments here or in the Slack channel on this topic, and we are also open if you would like to arrange some sessions for discussion.

FYI @gamboad @A-m-z

lix-mms avatar Aug 02 '24 10:08 lix-mms

Hey, I am also very interested in this feature, there is any news about this? how can I help? @lix-mms

dfdf avatar Aug 15 '24 13:08 dfdf

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Sep 06 '24 14:09 coderabbitai[bot]

Hi @lix-mms, Thanks for your contribution! I am also interested in this feature, could you help me with some problems encountered when reproduce the demo, I use this branch: https://github.com/lix-mms/datahub/tree/demo/v0.13.0/data-access-management

Installation env:

Java 17 JDK Python 3.10 Docker Docker Compose >=2.20

I try to build by the following command

./gradlew clean
./gradlew generateDataTemplate
./gradlew build
./gradlew quickstartDebug

and show the error message "Task :li-utils:compileMainGeneratedDataTemplateJava FAILED"

image

Please tell me how to reproduce the demo, Thank you!!

PonyYeh avatar Sep 11 '24 05:09 PonyYeh

Hello @PonyYeh, I'm one of the contributors to this feature. @lix-mms may take some time to reply over the next few days as he's on vacation, but in the meantime, I'd be happy to assist. These files were not actually part of the PR. I'll check if we can share them. Also, I'd like to confirm which demo you're looking to test. Just to clarify, this PR only contains the model definition and does not include GraphQL query resolvers or frontend components.

gamboad avatar Sep 12 '24 09:09 gamboad

Hello @PonyYeh, I'm one of the contributors to this feature. @lix-mms may take some time to reply over the next few days as he's on vacation, but in the meantime, I'd be happy to assist. These files were not actually part of the PR. I'll check if we can share them. Also, I'd like to confirm which demo you're looking to test. Just to clarify, this PR only contains the model definition and does not include GraphQL query resolvers or frontend components.

Hi @gamboad, Thank you for your response! I try to reproduce the demo of this video ( starts at 48:00 in video) Is it convenient to share all the features in Data Access Management? Thank you for all your assistance!!

PonyYeh avatar Sep 13 '24 05:09 PonyYeh

Thanks for your clarification, @PonyYeh. Unfortunately, I regret to inform you that this PR only contains the model, not the functional part. We have yet to align with the Datahub team on how, and to what extent, our feature will be incorporated into the community.

This PR was created in advance because another team had a similar initiative, and the goal was to strengthen their proposal with our model.

gamboad avatar Sep 13 '24 12:09 gamboad