Commit 43c7c976 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Small DB changes for supporting secure transfer of datasets between

clusters using credentials to provide permission to access the datasets.

* Add authority_urn to the images table, which is the urn of the origin
  dataset (similar to the slice urn, the Portal mints a credential in
  its namespace, so that the Portal always has permission to do anything
  it wants to the dataset at the remote cluster).

* Add slot to the apt_datasets table to store a credential from the
  cluster where the dataset lives. This credential gives the owner
  permission to download the dataset, which the portal will delegate to
  any cluster that might need to get that dataset.
parent 24345ba7
......@@ -108,6 +108,7 @@ CREATE TABLE `apt_datasets` (
`shared` tinyint(1) NOT NULL default '0',
`locked` datetime default NULL,
`locker_pid` int(11) default '0',
`credential_string` text,
PRIMARY KEY (`idx`),
UNIQUE KEY `plid` (`pid_idx`,`dataset_id`),
UNIQUE KEY `uuid` (`uuid`),
......@@ -2327,6 +2328,7 @@ CREATE TABLE `image_versions` (
`origin_uuid` varchar(64) default NULL,
`origin_neednotify` tinyint(1) NOT NULL default '0',
`origin_needupdate` tinyint(1) NOT NULL default '0',
`authority_urn` varchar(128) default NULL,
`logfileid` varchar(40) default NULL,
`noexport` tinyint(1) NOT NULL default '0',
`noclone` tinyint(1) NOT NULL default '0',
use strict;
use libdb;
sub DoUpdate($$$)
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("image_versions", "authority_urn")) {
DBQueryFatal("alter table image_versions ".
" add `authority_urn` varchar(128) default NULL ".
" after origin_needupdate");
if (!DBSlotExists("apt_datasets", "credential_string")) {
DBQueryFatal("alter table apt_datasets ".
" add `credential_string` text ".
" after locker_pid");
return 0;
# Local Variables:
# mode:perl
# End:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment