New iRODS APIs:
Presenting as HTTP and S3
Justin James
Applications Engineer
iRODS Consortium
March 11-13, 2024
CS3 2024
CERN, Geneva, Switzerland
Our Membership
Consortium
Member
Consortium
Member
Consortium
Member
What is iRODS
Open Source
Distributed
Data Centric & Metadata Driven
iRODS as the Integration Layer
Why use iRODS?
People need a solution for:
The larger the organization, the more they need software like iRODS.
Protocol Plumbing - Presenting iRODS as other Protocols
Over the last few years, the ecosystem around the iRODS server has continued to expand.
Integration with other types of systems is a valuable way to increase accessibility without teaching existing tools about the iRODS protocol or introducing new tools to users.
With some plumbing, existing tools get the benefit of visibility into an iRODS deployment.
What is the iRODS HTTP API?
A redesign of the iRODS C++ REST API.
Goals of the project ...
iRODS HTTP API - Endpoints
Based on concepts and entities defined in iRODS:
Operations are specified via parameters
For example
/authenticate | /resources |
/collections | /rules |
/data-objects | /tickets |
/info | /users-groups |
/query | /zones |
iRODS HTTP API - Configuration - Top Level
{
// Defines HTTP options that affect how the
// client-facing component of the server behaves.
"http_server": {
// ...
},
// Defines iRODS connection information.
"irods_client": {
// ...
}
}
Single file which defines two sections to help administrators understand the options and how they relate to each other.
Modeled after NFSRODS.
iRODS HTTP API - Configuration - http_server
"http_server": {
"host": "0.0.0.0",
"port": 9000,
"log_level": "info",
"authentication": {
"eviction_check_interval_in_seconds": 60,
"basic": {
"timeout_in_seconds": 3600
},
"openid_connect": { /* ... options ... */ }
},
"requests": {
"threads": 3,
"max_size_of_request_body_in_bytes": 8388608,
"timeout_in_seconds": 30
},
"background_io": {
"threads": 6
}
}
iRODS HTTP API - Configuration - irods_client
"irods_client": {
"host": "<string>",
"port": 1247,
"zone": "<string>",
"tls": { /* ... options ... */ },
"enable_4_2_compatibility": false,
"proxy_admin_account": {
"username": "<string>",
"password": "<string>"
},
"connection_pool": {
"size": 6,
"refresh_timeout_in_seconds": 600,
"max_retrievals_before_refresh": 16,
"refresh_when_resource_changes_detected": true
},
"max_number_of_parallel_write_streams": 3,
"max_number_of_bytes_per_read_operation": 8192,
"buffer_size_in_bytes_for_write_operations": 8192,
"max_number_of_rows_per_catalog_query": 15
}
iRODS HTTP API - Example - Stat'ing a collection
base_url="http://localhost:9000/irods-http-api/0.2.0"
bearer_token=$(curl -sX POST --user 'rods:rods' "$base_url/authenticate")
curl -s -G -H "Authorization: Bearer $bearer_token" \
"$base_url/collections" \
--data-urlencode 'op=stat' \
--data-urlencode 'lpath=/tempZone/home/rods' \
| jq
{
"inheritance_enabled": false,
"irods_response": {
"status_code": 0
},
"modified_at": 1699448576,
"permissions": [
{
"name": "rods",
"perm": "own",
"type": "rodsadmin",
"zone": "tempZone"
}
],
"registered": true,
"type": "collection"
}
iRODS HTTP API
Release v0.2.0
iRODS S3 API - Goals
iRODS S3 API - History
iRODS S3 API - History - Options
1. Update and maintain
https://github.com/bioteam/minio-irods-gateway
Go, wrapping iRODS C API. Not going to be maintainable.
2. minio-irods-gateway converts to use
https://github.com/cyverse/go-irodsclient
Pure Go. Limited by lack of multi-user support.
3. Add irods/gateway-irods.go to upstream
https://github.com/minio/minio/tree/master/cmd/gateway
Pure Go, upstream. Limited by above AND MinIO removed support for the gateway.
4. New C++ implementation
https://github.com/irods/irods_client_s3_api
And here we are.
iRODS S3 API - History - Research
iRODS S3 API - History - Research
iRODS S3 API - History - Research - Alternate Universes
iRODS S3 API - Architecture and Status
iRODS S3 API - Status
iRODS S3 API - Configuration
{
// Defines S3 options that affect how the
// client-facing component of the server behaves.
"s3_server": {
// ...
},
// Defines iRODS connection information.
"irods_client": {
// ...
}
}
Single file which defines two sections to help administrators understand the options and how they relate to each other.
Modeled after NFSRODS.
iRODS S3 API - Configuration - s3_server
"s3_server": {
"host": "0.0.0.0",
"port": 9000,
"log_level": "info",
"plugins": {
// Each key corresponds to a local shared object file
"static_bucket_resolver": {
"name": "static_bucket_resolver",
"mappings": {
"<bucket_name>": "/path/to/collection",
"<another_bucket>": "/path/to/another/collection"
}
},
"static_authentication_resolver": {
"name": "static_authentication_resolver",
"users": {
"<s3_username>": {
"username": "<string>",
"secret_key": "<string>"
}
}
}
},
"region": "us-east-1",
"authentication": {
"eviction_check_interval_in_seconds": 60,
"basic": { "timeout_in_seconds": 3600 }
},
"requests": {
"threads": 3,
"max_size_of_request_body_in_bytes": 8388608,
"timeout_in_seconds": 30
},
"background_io": { "threads": 6 }
}
iRODS S3 API - Configuration - irods_client
"irods_client": {
"host": "<string>",
"port": 1247,
"zone": "<string>",
"tls": { /* ... options ... */ },
"enable_4_2_compatibility": false,
"proxy_admin_account": {
"username": "<string>",
"password": "<string>"
},
"connection_pool": {
"size": 6,
"refresh_timeout_in_seconds": 600,
"max_retrievals_before_refresh": 16,
"refresh_when_resource_changes_detected": true
},
"resource": "<string>",
"max_number_of_bytes_per_read_operation": 8192,
"buffer_size_in_bytes_for_write_operations": 8192
}
iRODS S3 API - Next Steps
iRODS S3 API
Release v0.2.0
Questions?
Thank you.
May 28-31, 2024