Skip to content

Instantly share code, notes, and snippets.

@gregmercer
Created October 11, 2019 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregmercer/e5c1622c3d37d84db0903a3f1542b046 to your computer and use it in GitHub Desktop.
Save gregmercer/e5c1622c3d37d84db0903a3f1542b046 to your computer and use it in GitHub Desktop.
Patch file for simplesamlphp to allow you to add specific configuration per acquia environment.
diff --git a/config/authsources.php b/config/authsources.php
index 0d8da0e..3aa71c7 100644
--- a/config/authsources.php
+++ b/config/authsources.php
@@ -318,3 +318,12 @@ $config = [
],
*/
];
+
+// Add the GSB specific configuration.
+if (empty($_ENV['AH_SITE_NAME'])) {
+ // We are not on Acquia's Servers
+ //include '';
+}
+else {
+ include '/mnt/gfs/' . $_ENV['AH_SITE_NAME'] . '/libraries/simplesamlphp/authsources.inc';
+}
\ No newline at end of file
diff --git a/config/config.php b/config/config.php
index 29d7a00..1462dfb 100644
--- a/config/config.php
+++ b/config/config.php
@@ -1123,3 +1123,12 @@ $config = [
*/
'store.redis.prefix' => 'SimpleSAMLphp',
];
+
+// Add the GSB specific configuration.
+if (empty($_ENV['AH_SITE_NAME'])) {
+ // We are not on Acquia's Servers
+ //include '';
+}
+else {
+ include '/mnt/gfs/' . $_ENV['AH_SITE_NAME'] . '/libraries/simplesamlphp/config.inc';
+}
diff --git a/metadata/saml20-idp-remote.php b/metadata/saml20-idp-remote.php
index d390647..c6bf67d 100644
--- a/metadata/saml20-idp-remote.php
+++ b/metadata/saml20-idp-remote.php
@@ -6,3 +6,12 @@
*
* See: https://simplesamlphp.org/docs/stable/simplesamlphp-reference-idp-remote
*/
+
+// Add the GSB specific configuration.
+if (empty($_ENV['AH_SITE_NAME'])) {
+ // We are not on Acquia's Servers
+ //include '';
+}
+else {
+ include '/mnt/gfs/' . $_ENV['AH_SITE_NAME'] . '/libraries/simplesamlphp/saml20-idp-remote.inc';
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment