Skip to content

Feature Request: Public Job Output Sharing in TapisJobService #105

Description

@mosoriob

Summary

Implement public job output sharing functionality in TapisJobService to leverage Tapis backend's sharePublic and share with a user capabilities specifically for job outputs and generated files.

Background

While TapisJobService will have job sharing capabilities, there's a need for granular sharing of job outputs and generated files. Users should be able to:

  • Share specific output files publicly without sharing the entire job
  • Share output datasets with specific users
  • Provide direct access to generated results and artifacts

Proposed Implementation

New TapisJobService Methods

class TapisJobService {
  // Make job outputs publicly accessible
  async shareJobOutputsPublic(jobId: string, outputPaths?: string[]): Promise<void>
  
  // Share job outputs with specific user
  async shareJobOutputsWithUser(jobId: string, username: string, outputPaths?: string[]): Promise<void>
  
  // Get output sharing status
  async getJobOutputSharingStatus(jobId: string): Promise<JobOutputSharingStatus>
  
  // Revoke output sharing
  async revokeJobOutputSharing(jobId: string, outputPaths?: string[]): Promise<void>
  
  // List shareable outputs
  async getShareableOutputs(jobId: string): Promise<ShareableOutput[]>
}

API Endpoints

POST /v1/tapis/jobs/{executionId}/outputs/share/public
POST /v1/tapis/jobs/{executionId}/outputs/share/user
GET /v1/tapis/jobs/{executionId}/outputs/share/status
DELETE /v1/tapis/jobs/{executionId}/outputs/share
GET /v1/tapis/jobs/{executionId}/outputs/shareable

Data Types

interface ShareableOutput {
  path: string;
  filename: string;
  size: number;
  type: string;
  isShared: boolean;
  sharedWith: string[];
  isPublic: boolean;
}

interface JobOutputSharingStatus {
  jobId: string;
  publicOutputs: string[];
  userSharedOutputs: {
    username: string;
    outputs: string[];
  }[];
  totalOutputs: number;
  sharedOutputs: number;
}

Implementation Tasks

Phase 1: Core Output Sharing

  • Add shareJobOutputsPublic() method to TapisJobService
  • Add shareJobOutputsWithUser() method to TapisJobService
  • Implement output discovery and listing functionality
  • Add selective sharing for specific output files

Phase 2: API Integration

  • Create API endpoints for public output sharing
  • Create API endpoints for user output sharing
  • Add output sharing status endpoint
  • Implement output sharing revocation
  • Add shareable outputs listing endpoint

Phase 3: UI Integration

  • Add output sharing buttons to job results UI
  • Create output file selection interface
  • Add sharing status indicators for individual outputs
  • Implement bulk output sharing functionality
  • Add shared output access management

Phase 4: Enhanced Features

  • Implement time-limited sharing for outputs
  • Add download tracking for shared outputs
  • Create shared output gallery/browser
  • Add sharing notifications and access logs

Acceptance Criteria

  • Job outputs can be shared publicly via Tapis sharePublic
  • Job outputs can be shared with specific users via Tapis share with a user
  • Individual output files can be selectively shared
  • Bulk output sharing is supported
  • API endpoints work correctly for output sharing
  • UI provides intuitive output sharing controls
  • Sharing status is clearly visible for each output
  • Shared outputs are accessible without authentication (public) or with user authentication

Security Considerations

  • Validate user permissions before sharing outputs
  • Implement rate limiting for sharing operations
  • Add audit logging for sharing activities
  • Ensure proper access control for shared outputs
  • Validate output file types before sharing

Files to Modify

  • src/classes/tapis/adapters/TapisJobService.ts
  • src/api/api-v1/paths/tapis/jobs/outputs/
  • src/classes/graphql/queries/
  • src/components/job-results/ (UI components)
  • src/types/ (TypeScript interfaces)

Related Issues

Notes

  • This feature should complement the job sharing functionality from Feature: Public Job Sharing in TapisJobService #101
  • Consider implementing progressive sharing (job → outputs → specific files)
  • Ensure consistency with existing Tapis sharing patterns
  • Plan for future integration with data catalogs and repositories

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions