Skip to aside Skip to content Skip to footer

ISA temporary links

Overview

ISA temporary links allow you to share private Investigations, Studies, and Assays with external collaborators or reviewers by creating time-limited access links. These links enable viewing and downloading without requiring user accounts in FAIRDOM-SEEK.

Hierarchical access

  • Investigation Link: Grants access to the Investigation and ALL Studies, Assays, and associated assets within it
  • Study Link: Grants access to the Study and ALL Assays and associated assets within it
  • Assay Link: Grants access to the Assay and ALL associated assets (DataFiles, Models, SOPs, Documents, etc.)

Key characteristics

  • Downward propagation: Parent codes grant access to all children
  • No upward propagation: Child codes do NOT grant access to parents
  • Time-limited: Each link has an expiration date
  • Secure: Uses cryptographically secure random codes
  • Works with private children: Public items can create temporary links to grant access to their private children

Public items with private children

You can create temporary links for public Investigations or Studies that have private children. This is useful when:

  • Your study design is public but raw data is private;
  • You want to selectively share private data without making it publicly accessible.

Example: Public Study with Private Assays

Public Study ← Create temporary link here
  ├─ Private Assay 1
  │   └─ Private DataFile
  └─ Private Assay 2

Expected Behavior with temporary link:

  1. Create a temporary link for the public Study: /studies/123?code=STU_CODE
  2. Anyone with the link can access:
    • ✅ The Study itself (accessible anyway since it’s public)
    • ✅ Private Assay 1 (accessible via code)
    • ✅ Private Assay 2 (accessible via code)
    • ✅ Private DataFile (accessible via code through Assay)

Step 1: Navigate to the Manage page

  1. Go to your Investigation, Study, or Assay.
  2. Click the ‘Manage’ button (requires manage permissions).

In the ‘Temporary Links’ section:

  1. Click ‘Create temporary link’.
  2. Set an expiration date (when the link should stop working).
  3. Click ‘Update’ to save.

After creating the link:

  1. The temporary link appears on the show page (visible only to managers).
  2. Click the copy icon to copy the full URL.
  3. Share this URL with your collaborators.

Example link:

https://your-seek-instance.org/investigations/123?code=ABC123XYZ789...

For recipients

  1. Click the link or paste it into your browser.
  2. You will see the Investigation/Study/Assay without logging in.
  3. You can navigate to all accessible child items.
  4. You can download associated files.

What you can access

Investigation ← Your link points here
  ├─ Study 1 ✅ Accessible
  │   ├─ Assay 1 ✅ Accessible
  │   │   └─ DataFile ✅ Downloadable
  │   └─ Assay 2 ✅ Accessible
  └─ Study 2 ✅ Accessible
      └─ Assay 3 ✅ Accessible
Investigation ❌ NOT accessible (parent)
  └─ Study ← Your link points here
      ├─ Assay 1 ✅ Accessible
      │   └─ DataFile ✅ Downloadable
      └─ Assay 2 ✅ Accessible
Investigation ❌ NOT accessible (grandparent)
  └─ Study ❌ NOT accessible (parent)
      └─ Assay ← Your link points here
          ├─ DataFile ✅ Downloadable
          ├─ SOP ✅ Accessible
          └─ Model ✅ Accessible

  1. Navigate to your Investigation/Study/Assay.
  2. If you have manage permissions, you’ll see active links on the show page.
  3. The expiration date is displayed.

To immediately revoke access:

  1. Go to the Manage page.
  2. In the ‘Temporary Links’ section, check ‘Remove’ next to the code.
  3. Click ‘Update’.

OR set the expiration date to a past date:

  1. Edit the expiration date to yesterday
  2. Click “Update”

The link will immediately stop working.

To extend an expiring link:

  1. Go to the Manage page.
  2. Update the expiration date to a future date.
  3. Click ‘Update’.

The same URL continues to work with the new expiration.


Use cases

Technical details

https://your-seek.org/{type}/{id}?code={secure_code}

Where:

  • {type}: investigations, studies, or assays
  • {id}: The numeric ID of the item
  • {secure_code}: A 40-character cryptographically secure random string

Code generation

  • Uses SecureRandom.base64(30) for cryptographic security
  • Results in ~40 characters after URL encoding
  • Collision probability: virtually zero

Authorisation logic

  1. Check own codes: Item checks its own special_auth_codes
  2. Check parent codes: Children check if parent has the code
  3. Never check child codes: Parents don’t check children’s codes
  4. Expiration check: Only unexpired codes grant access

Hierarchical rules

# Study checking authorization
def auth_by_code?(code)
  # Check own codes
  return true if special_auth_codes.unexpired.include?(code)
  
  # Check parent Investigation's codes (downward propagation)
  return true if investigation.special_auth_codes.unexpired.include?(code)
  
  # Does NOT check child Assay codes (no upward propagation)
  false
end

API access

Temporary links work with the FAIRDOM-SEEK API:

# GET request with code
curl "https://your-seek.org/investigations/123.json?code=ABC123..."

# Response includes investigation data
{
  "data": {
    "id": "123",
    "type": "investigations",
    "attributes": {
      "title": "My Investigation",
      ...
    }
  }
}