Skip to content

[template-graph] Add User-Side Data Encryption From Workflow Template Graph#45

Merged
csegarragonz merged 8 commits intomainfrom
feature-wtg-encryption
Nov 3, 2025
Merged

[template-graph] Add User-Side Data Encryption From Workflow Template Graph#45
csegarragonz merged 8 commits intomainfrom
feature-wtg-encryption

Conversation

@csegarragonz
Copy link
Contributor

Closes #40

@csegarragonz csegarragonz self-assigned this Nov 3, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @csegarragonz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new template-graph Rust crate that enables user-side data encryption for workflow template graphs. It integrates a Ciphertext-Policy Attribute-Based Encryption (CP-ABE) scheme to secure data bundles associated with workflow nodes. The changes include defining the structure of workflow graphs, implementing policy compilation logic that considers workflow, node, and ancestral dependencies, and enhancing the underlying ABE library with necessary FFI wrappers and public modules. This allows for fine-grained access control over workflow data based on user attributes and workflow structure.

Highlights

  • New template-graph Crate: A new Rust crate named template-graph has been introduced to define, parse, and manage workflow template graphs, which are YAML files specifying serverless workflow structures, security policies, and data dependencies.
  • User-Side Data Encryption: The pull request implements user-side data encryption for workflow template graphs, leveraging the Ciphertext-Policy Attribute-Based Encryption (CP-ABE) scheme from the accless-abe4 library to secure data bundles associated with workflow nodes.
  • Policy Compilation Logic: New logic has been added to compile comprehensive access control policies for each workflow node. These policies dynamically incorporate workflow identifiers, node-specific identifiers, and ancestral dependencies within the graph, ensuring robust access control.
  • accless-abe4 Library Enhancements: The accless-abe4 library has been updated to expose its policy and scheme modules publicly, and FFI (Foreign Function Interface) wrappers for encrypt_abe4 and decrypt_abe4 now include detailed documentation for external use.
  • Dependency Updates: The project's dependencies have been updated in Cargo.toml and Cargo.lock to include blake3 for hashing, and arrayref, arrayvec, and constant_time_eq to support the new cryptographic and data structure functionalities.
  • Policy Validation: The TemplateGraph parsing now includes validation checks to ensure that policy attributes do not contain dashes and that all referenced authorities in policies are correctly defined within the workflow configuration, preventing malformed policies.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new template-graph crate for parsing and processing workflow templates, enabling user-side data encryption. The implementation is well-structured, with clear data models for the workflow graph and a policy compiler to generate ABE policies. I've identified a couple of high-severity issues related to potential panics and a bug in graph traversal that should be addressed. I've also suggested an improvement to the validation logic to make it more robust.

@csegarragonz csegarragonz merged commit 661b4a4 into main Nov 3, 2025
3 checks passed
@csegarragonz csegarragonz deleted the feature-wtg-encryption branch November 12, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement User-Side Encryption Flow

1 participant