Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌟 Community Feature Challenge: OpenFGA 🌟 #6

Open
gemanor opened this issue Oct 28, 2024 · 8 comments
Open

🌟 Community Feature Challenge: OpenFGA 🌟 #6

gemanor opened this issue Oct 28, 2024 · 8 comments

Comments

@gemanor
Copy link
Collaborator

gemanor commented Oct 28, 2024

Are you using OpenFGA? Feeling like you can get better from it? This is one of our 10 community feature challenges, and we want your input on how we can enhance the usability of the OpenFGA service. This is a space for you to share your ideas on what would make this part of the CLI even better!

How to Participate

  • Submit Your Proposal: Comment below with your detailed feature idea. Be sure to explain how it would work and why it would be valuable for users.
  • Vote for Your Favorites: Show support for your favorite ideas by upvoting them. Your votes will help us identify the most impactful proposals.
  • Win a Bounty: The idea with the most upvotes will be selected, and we’ll put a bounty on it! This means that you (or another contributor) could bring this feature to life and earn a reward.

Why Join In?

  • Shape the Future: Your input will directly influence Permit CLI’s growth.
  • Community Recognition: Contributing ideas or supporting others’ ideas lets you stand out as a valuable community member.
  • Collaborative Ownership: Together, we’ll build a CLI that truly reflects the community’s needs and creativity.

What’s Next?

We’ll keep this challenge open for proposals and upvotes until November 10th, 2024. Once the top idea is chosen, we’ll update this issue with details on the bounty and the next steps for development.

Thank you for helping us make the Permit CLI even better. We can’t wait to see what you come up with! 🌟

@gemanor
Copy link
Collaborator Author

gemanor commented Oct 28, 2024

/bounty 200

Copy link

algora-pbc bot commented Oct 28, 2024

💎 $200 bounty • Permit.io

Steps to solve:

  1. Start working: Comment /attempt #6 with your implementation plan
  2. Submit work: Create a pull request including /claim #6 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to permitio/permit-cli!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @35C4n0r Oct 28, 2024, 4:00:38 PM WIP
🟢 @lota02 Oct 29, 2024, 6:25:52 PM WIP
🟢 @hoklims Nov 20, 2024, 6:38:21 AM WIP

@35C4n0r
Copy link

35C4n0r commented Oct 28, 2024

/attempt #6

Algora profile Completed bounties Tech Active attempts Options
@35C4n0r 30 bounties from 5 projects
Python, TypeScript,
HTML & more
Cancel attempt

@35C4n0r
Copy link

35C4n0r commented Oct 28, 2024

Cancelling my attempt, I accidentally commented on the wrong issue.

@lota02
Copy link

lota02 commented Oct 29, 2024

/attempt #6
Proposal: Enhanced Policy Visualization and Testing Tool
Description: Introduce a graphical interface within the OpenFGA CLI for visualizing and testing authorization policies.

How It will work

  • Policy Visualization: Users can run a command like openfga visualize to generate a visual representation of the policy, showing relationships between users, roles, and resources. This could be a flowchart or graph format, making it easier to understand complex policies.
  • Policy Testing: Implement a testing feature (openfga test ) that allows users to simulate scenarios by inputting user roles and actions to see if access is granted or denied. Users receive detailed feedback on the evaluation process.

BENEFITS
This enhancement simplifies the policy management process, making it easier for users to understand and validate their policies, leading to improved security and user experience.

@hoklims
Copy link

hoklims commented Nov 20, 2024

/attempt #6

I've been using OpenFGA for a while now, and I've noticed that defining authorisation models through the CLI can be a bit daunting, especially for newbies. So I have an idea that I think could make everyone's life easier:

Interactive Model Wizard for OpenFGA CLI

The Problem: Let's face it - writing permission models from scratch can be tricky. We've all been there, staring at the terminal, trying to remember the exact syntax or wondering if our relationships make sense.

My Solution: What if we had an interactive CLI command that walked you through building your authorisation models? Think of it as having a friendly expert sitting next to you! Here's how it would work:

# Just type this to start the interactive experience
openfga model interactive

What would it do? 🛠️

  1. Interactive Tutorial

    • Ask you simple questions about what you're trying to build
    • Suggests common patterns based on your needs
    • Validates your input as you go (no more syntax errors!)
  2. Real-time Visualisation

    • Shows you a clean ASCII diagram of your model right in the terminal
    User ---(can_edit)---> Document
      |
      +--(member_of)---> Group ---(can_view)---> Document
    
    • Updates live as you make changes (super satisfying to watch!)
  3. Built-in Validation

    • Catch errors before they become problems
    • Suggests fixes when something looks wrong
    • Automatically tests your model

Why You'll Love It ❤️

  • Saves Time: No more googling for syntax or examples
  • Reduces Errors: Validation as you go means fewer headaches later on
  • Perfect for Learning: Great for beginners and experts alike
  • Keeps You in the Flow: Everything happens right in your terminal

Implementation

This would be a focused addition to the CLI - something that could realistically be built as a bounty project. It's not trying to boil the ocean, just make our daily work with OpenFGA smoother and more enjoyable.

If you've ever wished for a more intuitive way to create authorisation models, vote this up! I'd also love to hear your thoughts and suggestions in the comments. Let's make OpenFGA even better together! 🚀


This version:

  • ✅ Focuses strictly on CLI improvements
  • ✅ Keeps it realistic for a bounty project
  • ✅ Addresses a common pain point
  • ✅ Uses a friendly, conversational tone
  • ✅ Makes it easy to understand the value
  • ✅ Encourages community involvement

@gemanor
Copy link
Collaborator Author

gemanor commented Nov 24, 2024

Hey, @lota02 and @hoklims - your proposals look good, but they are too broad, IMO. Please provide a practical implementation guide/design review for your proposed feature here. We will go with the more coherent one/with the better timeline estimations.

@hoklims
Copy link

hoklims commented Dec 10, 2024

Hey, @lota02 and @hoklims - your proposals look good, but they are too broad, IMO. Please provide a practical implementation guide/design review for your proposed feature here. We will go with the more coherent one/with the better timeline estimations.


Proposal: An Interactive Model-Building Assistant for the OpenFGA CLI

Defining authorization models by hand in the CLI can feel like solving a puzzle in the dark. While OpenFGA is powerful, starting from scratch—especially for newcomers—often leads to trial and error. Let’s introduce an interactive assistant that guides you step-by-step, checks for errors, and even provides a visual map, all within the CLI.

Command Example:

openfga model interactive

Key Features

  1. Guided Entity and Relationship Setup:
    The assistant asks about your main entities (e.g., User, Document, Group) and the permissions or relationships you want to establish. It’s a conversation, not a guessing game.

  2. Common Patterns and Validation:
    Unsure about the right permissions? The assistant suggests common patterns and validates them on the spot, preventing logical missteps before they happen.

  3. Real-Time ASCII Diagrams:
    Each time you add or adjust a relationship, an ASCII diagram updates in real-time. It’s a quick, visual sanity check—no more losing track of what connects where.

    For example:

    User ---(can_edit)---> Document
      |
      +--(member_of)---> Group ---(can_view)---> Document
    
  4. Immediate Feedback and Error Checking:
    The assistant flags inconsistencies as you go. Think of it as a built-in proofreader, catching syntax and logic issues early.

  5. Scenario Testing:
    Check if “Alice can edit Document X” right away, without leaving the CLI. Confirm your rules work as intended before rolling them out.

  6. Easy Export:
    Once satisfied, export the finished model as JSON or YAML, ready to use. It’s a clean handoff from prototype to production.

Design & UX Considerations

  • User-Friendly:
    Instead of memorizing syntax, you answer prompts and see immediate results. If something’s off, the assistant guides you back on track.

  • Smart Suggestions:
    With common patterns and best-practice hints, you reduce the risk of granting unintended permissions.

  • Seamless Integration:
    This enhances your existing workflow. It uses OpenFGA’s capabilities under the hood, so you’re not learning an entirely new tool—just a friendlier interface.

Implementation Roadmap

Phase 1 (2-3 weeks):

  • Build a minimal prototype: entity definitions, basic relationships, simple ASCII diagram.
  • Choose a CLI framework (e.g., Cobra for Go) and establish the workflow.

Phase 2 (3-4 weeks):

  • Add advanced validation for semantic checks.
  • Integrate scenario testing (“Can Alice do X?”) for immediate logic checks.
  • Refine the UX: auto-suggestions, instant feedback, clearer error messages.

Phase 3 (2 weeks):

  • Provide thorough documentation, examples, and quick-start guides.
  • Conduct extensive testing—both automated and real-world—and fix any issues.
  • Release a stable version.

Total Time Estimate: Approximately 7-9 weeks from concept to a stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants