Ivy-Interactive / Ivy-Interactive/Rusty-Framework

[Subsystem] Implement Authentication, Session Context & View Security Guards (Port of Ivy/Auth)

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Problem Statement

Ivy-Framework (C#) in src/Ivy/Auth provides JWT/Cookie session management, authentication middleware, identity provider context, and view security guards.

Rusty-Framework currently has no built-in authentication layer, auth context hooks, or view security guard primitives.

Missing Functionality

  • JWT and cookie session management middleware in rusty-server.
  • Authentication context hooks (use_auth, use_user) for accessing active session identity state in Rust views.
  • Security guard component wrapper / attribute (Guard) to restrict rendering based on roles, claims, or permissions.
  • Security headers and silent token renewal helpers.

Proposed Architecture & Design

  1. Implement auth middleware for rusty-server using Axum/Tower layer abstractions.
  2. Create AuthContext and hooks use_auth() and use_user() in rusty::hooks.
  3. Implement Guard wrapper widget in rusty::widgets that evaluates AuthContext before rendering children.
  4. Support standard authentication workflows (Login, Logout, Token Refresh, Role verification).

Acceptance Criteria

  • Auth middleware validates JWT tokens and session cookies in rusty-server.
  • use_auth hook provides reactive user identity and session status.
  • Guard widget selectively renders child components based on user roles and permissions.
  • Integration tests verifying authenticated vs unauthenticated rendering states.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the reference implementation in src/Ivy/Auth, then inspect the rusty-server, rusty::hooks, and rusty::widgets entry points named in the proposal. Define the auth middleware, AuthContext hooks, Guard behavior, and integration-test scope from the acceptance criteria; done requires JWT and cookie validation, reactive identity state, role or permission-based rendering, and authenticated versus unauthenticated tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.