Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • fts-rest-flask fts-rest-flask
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Jira
    • Jira
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • File Transfer Service
  • fts-rest-flaskfts-rest-flask
  • Merge requests
  • !85

Add Swift support to FTS-REST

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Shiting Long requested to merge swift into develop May 06, 2022
  • Overview 0
  • Commits 13
  • Pipelines 1
  • Changes 14

Changes including:

  1. added authentication to Openstack Keystone for Swift. There are two ways for setting credentials (OS tokens) for Swift:
  • Manually set OS tokens through CLI
  • FTS fetch OS tokens from the Keystone server using OIDC access tokens
  1. added command-line options --os-token(OPTIONAL), --os-project-id(MANDATORY) for submitting Swift transfers.
  2. added fts_swift_token_refresh_daemon for refreshing OS tokens.
  3. added CSSwift.py for handling possible requests from WebFTS, e.g., list contents and set OS tokens for Swift.

DB change:

  1. added column os_project_id in t_job.
  2. added column keystone_url and keystone_idp in t_cloudStorage.
  3. new table t_cloudCredentialCache.

Some comments:

  1. Since t_cloudCredentialCache has no DB relation with t_cloudStorageUser, extra checks on the user are performed before setting cloud credentials. Although logically there should be a one-to-many relationship between t_cloudStorageUser and t_cloudCredentialCache, it doesn't make sense to me to add vo to t_cloudCredentialCache to form a composite foreign key with cloudStorage_name and user_dn because vo has no use for the table.
  2. Any cloud storage user would be able to indirectly alter t_cloudCredentialCache because this is linked to transfers. However, this exposes risks that users might add an arbitrary number of rows in the table, so I added an extra check before adding/setting the row to see if the added credentials are valid.
  3. Please add the required python packages (keystoneauth1 and python-keystoneclient) to the docker image so that the pipeline can work.
  4. At the time being, you can submit Swift transfer with:

fts-rest-transfer-submit -s https://<fts> --access-token $tok swifts://<source> swifts://<dest> --os-project-id "<source_project_id>:<dest_project_id>" --os-token "<project_id>:<corresponding_os_token>"

After we have FENIX AAI properly set up, you can submit the transfer without specifying --os-token.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: swift