From d31b0e5eb1515ce291b60397700d28c13d6dac30 Mon Sep 17 00:00:00 2001 From: P-O Quirion Date: Fri, 13 Nov 2026 15:33:42 -0500 Subject: [PATCH 1/4] Add globus HA option. This setup is imutable and cannot be update lated. --- README.md | 2 ++ site/profile/manifests/globus.pp | 2 ++ site/profile/templates/globus/globus-gateway-setup.epp | 1 + 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index c41259290..a4f4e1b99 100644 --- a/README.md +++ b/README.md @@ -848,6 +848,7 @@ authentication domain must be listed in `domains`. | `enable_oidc` | Enable local OpenID Connect authentication for cluster users | Boolean | | `identity_mapping` | Optional expression-based identity mappings for storage gateway accounts | Optional[Array[Hash]] | | `freeipa_mapping` | Enable external username mapping through the FreeIPA API using a dedicated gcsweb keytab; mutually exclusive with `identity_mapping` | Boolean | +| `high_assurance` | Create the POSIX storage gateway with `--high-assurance` (requires a subscribed endpoint) | Boolean | | `restrict_paths` | Path restrictions for accessing data on collections created using this storage gateway | [GlobusPathRestrictions](https://docs.globus.org/globus-connect-server/v5/api/schemas/PathRestrictions_schema/) |
@@ -860,6 +861,7 @@ profile::globus::domains: [] profile::globus::enable_oidc: true profile::globus::identity_mapping: ~ profile::globus::freeipa_mapping: false +profile::globus::high_assurance: false profile::globus::restrict_paths: {} ```
diff --git a/site/profile/manifests/globus.pp b/site/profile/manifests/globus.pp index 696097e03..211c32963 100644 --- a/site/profile/manifests/globus.pp +++ b/site/profile/manifests/globus.pp @@ -23,6 +23,7 @@ Boolean $enable_oidc = true, Optional[Array[Hash]] $identity_mapping = undef, Boolean $freeipa_mapping = false, + Boolean $high_assurance = false, GlobusPathRestrictions $restrict_paths = {}, ) { if $freeipa_mapping and $identity_mapping != undef { @@ -51,6 +52,7 @@ 'display_name' => $display_name, 'domain_string' => $domain_string, 'identity_mapping' => $identity_mapping != undef or $freeipa_mapping, + 'high_assurance' => $high_assurance, } ), } diff --git a/site/profile/templates/globus/globus-gateway-setup.epp b/site/profile/templates/globus/globus-gateway-setup.epp index a64ee0c01..a808e3829 100644 --- a/site/profile/templates/globus/globus-gateway-setup.epp +++ b/site/profile/templates/globus/globus-gateway-setup.epp @@ -9,6 +9,7 @@ GATEWAY_OUTPUT=$( posix "<%= $display_name %> gateway" \ <%= $domain_string %> ${OIDC_DOMAIN} \ <% if $identity_mapping { %>--identity-mapping file:/etc/globus/identity_mapping.json<% } %> \ + <% if $high_assurance { %>--high-assurance<% } %> \ --restrict-paths file:/etc/globus/restrict_paths.json ) exit_code=$? From ca7962e356c37e9d7f352c2715af4d57098a402a Mon Sep 17 00:00:00 2001 From: P-O Quirion Date: Fri, 13 Nov 2026 16:46:18 -0500 Subject: [PATCH 2/4] add option for endpoint with subscription --- README.md | 6 +++- site/profile/manifests/globus.pp | 36 +++++++++++++++++++ .../templates/globus/globus-gateway-setup.epp | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4f4e1b99..5495ecbd7 100644 --- a/README.md +++ b/README.md @@ -848,8 +848,10 @@ authentication domain must be listed in `domains`. | `enable_oidc` | Enable local OpenID Connect authentication for cluster users | Boolean | | `identity_mapping` | Optional expression-based identity mappings for storage gateway accounts | Optional[Array[Hash]] | | `freeipa_mapping` | Enable external username mapping through the FreeIPA API using a dedicated gcsweb keytab; mutually exclusive with `identity_mapping` | Boolean | -| `high_assurance` | Create the POSIX storage gateway with `--high-assurance` (requires a subscribed endpoint) | Boolean | | `restrict_paths` | Path restrictions for accessing data on collections created using this storage gateway | [GlobusPathRestrictions](https://docs.globus.org/globus-connect-server/v5/api/schemas/PathRestrictions_schema/) | +| `subscription_id` | Attache the Globus endpoint to a subscription ID. Required for `high_assurance` | Optional[String[1]] | +| `high_assurance` | Creates a Globus `high-assurance` storage gateway, requires a subscribed endpoint | Boolean | +| `authentication_timeout_mins` | Minutes before users must re-authenticate to a `high-assurance` gateway | Integer[1] |
default values @@ -862,6 +864,8 @@ profile::globus::enable_oidc: true profile::globus::identity_mapping: ~ profile::globus::freeipa_mapping: false profile::globus::high_assurance: false +profile::globus::authentication_timeout_mins: 60 +profile::globus::subscription_id: ~ profile::globus::restrict_paths: {} ```
diff --git a/site/profile/manifests/globus.pp b/site/profile/manifests/globus.pp index 211c32963..3dbe653e9 100644 --- a/site/profile/manifests/globus.pp +++ b/site/profile/manifests/globus.pp @@ -24,6 +24,8 @@ Optional[Array[Hash]] $identity_mapping = undef, Boolean $freeipa_mapping = false, Boolean $high_assurance = false, + Integer[1] $authentication_timeout_mins = 60, + Optional[String[1]] $subscription_id = undef, GlobusPathRestrictions $restrict_paths = {}, ) { if $freeipa_mapping and $identity_mapping != undef { @@ -53,6 +55,7 @@ 'domain_string' => $domain_string, 'identity_mapping' => $identity_mapping != undef or $freeipa_mapping, 'high_assurance' => $high_assurance, + 'auth_timeout' => $authentication_timeout_mins, } ), } @@ -154,6 +157,39 @@ fail('Globus requires at least one authentication domain or ensure OIDC server is running (profile::globus::enable_oidc: true)') } + if $subscription_id { + file { '/root/globus-subscription-setup': + ensure => 'file', + owner => 'root', + group => 'root', + mode => '0700', + content => epp( + 'profile/globus/globus-subscription-setup', + { + 'subscription_id' => $subscription_id, + } + ), + } + + # Runs once after the endpoint and node are set up, and again whenever + # subscription_id differs from the one recorded in subscription.json. + exec { 'globus-subscription-setup': + command => '/bin/sh /root/globus-subscription-setup', + environment => [ + "GCS_CLI_CLIENT_ID=${globus::client_id}", + "GCS_CLI_CLIENT_SECRET=${globus::client_secret.unwrap}", + ], + unless => "/usr/bin/test \"\$(/usr/bin/jq -r .subscription_id /var/lib/globus-connect-server/subscription.json 2>/dev/null)\" = '${subscription_id}'", + provider => 'shell', + require => [ + Package['jq'], + Exec['globus-node-setup'], + File['/root/globus-subscription-setup'], + ], + before => Exec['globus-gateway-setup'], + } + } + exec { 'globus-gateway-setup': command => '/bin/sh /root/globus-gateway-setup', environment => [ diff --git a/site/profile/templates/globus/globus-gateway-setup.epp b/site/profile/templates/globus/globus-gateway-setup.epp index a808e3829..069e28e17 100644 --- a/site/profile/templates/globus/globus-gateway-setup.epp +++ b/site/profile/templates/globus/globus-gateway-setup.epp @@ -9,7 +9,7 @@ GATEWAY_OUTPUT=$( posix "<%= $display_name %> gateway" \ <%= $domain_string %> ${OIDC_DOMAIN} \ <% if $identity_mapping { %>--identity-mapping file:/etc/globus/identity_mapping.json<% } %> \ - <% if $high_assurance { %>--high-assurance<% } %> \ + <% if $high_assurance { %>--high-assurance --authentication-timeout-mins <%= $auth_timeout %><% } %> \ --restrict-paths file:/etc/globus/restrict_paths.json ) exit_code=$? From d58e234a989e5d4feded030f2c3ff6c3a7877deb Mon Sep 17 00:00:00 2001 From: P-O Quirion Date: Fri, 13 Nov 2026 16:48:52 -0500 Subject: [PATCH 3/4] add template --- .../globus/globus-subscription-setup.epp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 site/profile/templates/globus/globus-subscription-setup.epp diff --git a/site/profile/templates/globus/globus-subscription-setup.epp b/site/profile/templates/globus/globus-subscription-setup.epp new file mode 100644 index 000000000..ccf0b5e94 --- /dev/null +++ b/site/profile/templates/globus/globus-subscription-setup.epp @@ -0,0 +1,15 @@ +#!/bin/sh +export GCS_CLI_ENDPOINT_ID=$(jq .endpoint_id -r /var/lib/globus-connect-server/info.json) +SUBSCRIPTION_OUTPUT=$( + globus-connect-server endpoint update \ + --subscription-id <%= $subscription_id %> 2>&1 +) +exit_code=$? +if [ "${exit_code}" -eq 0 ]; then + jq -n --arg subscription_id "<%= $subscription_id %>" '{subscription_id: $subscription_id}' \ + > /var/lib/globus-connect-server/subscription.json + rm -f /var/lib/globus-connect-server/subscription-error.json +else + echo "${SUBSCRIPTION_OUTPUT}" > /var/lib/globus-connect-server/subscription-error.json + exit ${exit_code} +fi From 1558121f16a54db2a0d49248c5af789b3898fa58 Mon Sep 17 00:00:00 2001 From: P-O Quirion Date: Mon, 16 Nov 2026 10:06:26 -0500 Subject: [PATCH 4/4] add guest collection option --- README.md | 2 ++ site/profile/manifests/globus.pp | 10 ++++++---- .../templates/globus/globus-collection-setup.epp | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5495ecbd7..acdc61bd4 100644 --- a/README.md +++ b/README.md @@ -852,6 +852,7 @@ authentication domain must be listed in `domains`. | `subscription_id` | Attache the Globus endpoint to a subscription ID. Required for `high_assurance` | Optional[String[1]] | | `high_assurance` | Creates a Globus `high-assurance` storage gateway, requires a subscribed endpoint | Boolean | | `authentication_timeout_mins` | Minutes before users must re-authenticate to a `high-assurance` gateway | Integer[1] | +| `allow_guest_collections` | Allow users to create guest collections on the mapped collection, requires a subscribed endpoint | Boolean |
default values @@ -866,6 +867,7 @@ profile::globus::freeipa_mapping: false profile::globus::high_assurance: false profile::globus::authentication_timeout_mins: 60 profile::globus::subscription_id: ~ +profile::globus::allow_guest_collections: false profile::globus::restrict_paths: {} ```
diff --git a/site/profile/manifests/globus.pp b/site/profile/manifests/globus.pp index 3dbe653e9..b5975610e 100644 --- a/site/profile/manifests/globus.pp +++ b/site/profile/manifests/globus.pp @@ -26,6 +26,7 @@ Boolean $high_assurance = false, Integer[1] $authentication_timeout_mins = 60, Optional[String[1]] $subscription_id = undef, + Boolean $allow_guest_collections = false, GlobusPathRestrictions $restrict_paths = {}, ) { if $freeipa_mapping and $identity_mapping != undef { @@ -69,10 +70,11 @@ content => epp( 'profile/globus/globus-collection-setup', { - 'default_directory' => $default_directory, - 'public_ip' => lookup('terraform.self.public_ip'), - 'display_name' => $display_name, - 'collection_path' => $collection_path, + 'default_directory' => $default_directory, + 'public_ip' => lookup('terraform.self.public_ip'), + 'display_name' => $display_name, + 'collection_path' => $collection_path, + 'allow_guest_collections' => $allow_guest_collections, } ), } diff --git a/site/profile/templates/globus/globus-collection-setup.epp b/site/profile/templates/globus/globus-collection-setup.epp index 95b4afa62..52dc5bf83 100644 --- a/site/profile/templates/globus/globus-collection-setup.epp +++ b/site/profile/templates/globus/globus-collection-setup.epp @@ -9,6 +9,7 @@ COLLECTION_OUTPUT=$( collection create ${GATEWAY_ID} \ <%= $collection_path %> \ --default-directory <%= $default_directory %> \ + <% if $allow_guest_collections { %>--allow-guest-collections<% } %> \ "<%= $display_name %> collection" ) exit_code=$?