Skip to content

Commit

Permalink
Revert "Automated SimpleSAMLphp htaccess patch." (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Oct 26, 2016
1 parent 1a9b3d1 commit eaf0bc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions phing/tasks/simplesamlphp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<target name="simplesamlphp:lib:init" hidden="true" unless="simplesamlphp">
<echo>Adding SimpleSAMLphp Auth module as a dependency.</echo>
<exec dir="${repo.root}" command="composer require drupal/simplesamlphp_auth:8.3.x-dev#283994f" logoutput="true" checkreturn="true" passthru="true" level="${blt.exec_level}"/>
<exec dir="${repo.root}" command="${repo.root}/vendor/bin/blt-console composer:munge ${blt.root}/scripts/simplesamlphp/htaccess-saml.json ${repo.root}/composer.json > ${repo.root}/composer.json.tmp" logoutput="true" checkreturn="true" level="${blt.exec_level}"/>
<!--@todo Find out why can't we just redirect output directly back to composer.json. -->
<exec dir="${repo.root}" command="mv ${repo.root}/composer.json.tmp ${repo.root}/composer.json" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
</target>

<!-- Copies the configuration templates from the library to a simplesamlphp directory located in the project root. -->
Expand Down Expand Up @@ -76,6 +73,7 @@
To complete the setup you must manually modify several files.
============================================================================

* ${docroot}/.htaccess
* ${repo.root}/simplesamlphp/config/acquia_config.php
* ${repo.root}/simplesamlphp/config/authsources.php
* ${repo.root}/simplesamlphp/metadata/saml20-idp-remote.php
Expand Down
13 changes: 11 additions & 2 deletions readme/simplesamlphp-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ To configure SimpleSAMLphp, perform the following steps after initially setting

1. Execute `blt simplesamlphp:init`. This will perform the initial setup tasks including:
* Adds the simplesamlphp_auth module as a project dependency.
* Patches your .htaccess file to allow access to the simplesaml path.
* Copies configuration files to `${project.root}/simplesamlphp`
* Adds a simplesamlphp property to project.yml
* Creates a symbolic link in the docroot to the web accessible directory of the simplesamlphp library.
* Adds a settings.php file to the project's default settings directory.


1. Edit `docroot/.htaccess` to include the following 2 lines. Note: the only 2 lines that need to be added are the lines marked with "+" signs.

# Copy and adapt this rule to directly execute PHP files in contributed or
# custom modules or to run another PHP application in the same directory.
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
+ # Allow access to simplesaml paths
+ RewriteCond %{REQUEST_URI} !^/simplesaml
# Deny access to any other PHP files that do not match the rules above.
RewriteRule "^.+/.*\.php$" - [F]

1. Edit `${project.root}/simplesamlphp/config/config.php`
* This file has been pre-populated with a code snippet recommended for Acquia Cloud Environments. You will need to edit the `$config` array for your local environment.
* Update your database name in `$ah_options`
Expand Down
9 changes: 0 additions & 9 deletions scripts/simplesamlphp/htaccess-saml.json

This file was deleted.

0 comments on commit eaf0bc3

Please sign in to comment.