Skip to content

Commit

Permalink
Simplesaml (#673)
Browse files Browse the repository at this point in the history
* Reformatted code blocks for ReadTheDocs.

* Reformatted code blocks for ReadTheDocs.
  • Loading branch information
grasmash authored Nov 15, 2016
1 parent 97f6bfa commit 34cfb12
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions readme/simplesamlphp-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ To configure SimpleSAMLphp with BLT perform the following steps after initially

1. Add the following two lines to `docroot/.htaccess`:

# Allow access to simplesaml paths.
RewriteCond %{REQUEST_URI} !^/simplesaml
# Allow access to simplesaml paths.
RewriteCond %{REQUEST_URI} !^/simplesaml

For example, as depicted in the "diff" below:
For example, as depicted in the "diff" below:

# 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]
# 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/acquia_config.php` as follows:

1. Update your database name in `$ah_options`:

$ah_options = array(
// Use the database "role" without the "stage", e.g., "example", not
// "exampletest" or "exampleprod".
'database_name' => 'example',
'session_store' => array(
// Valid values are "memcache" and "database".
'prod' => 'memcache',
'test' => 'memcache',
'dev' => 'database',
),
);
$ah_options = array(
// Use the database "role" without the "stage", e.g., "example", not
// "exampletest" or "exampleprod".
'database_name' => 'example',
'session_store' => array(
// Valid values are "memcache" and "database".
'prod' => 'memcache',
'test' => 'memcache',
'dev' => 'database',
),
);

1. Update the following values in the `$config` array:

// The technical contact for the SAML identity provider, i.e., the customer.
$config['technicalcontact_name'] = "Joe IT";
$config['technicalcontact_email'] = "joe.it@example.com";
$config['secretsalt'] = 'y0h9d13pki9qdhfm3l5nws4jjn55j6hj';
$config['auth.adminpassword'] = 'mysupersecret';
// The technical contact for the SAML identity provider, i.e., the customer.
$config['technicalcontact_name'] = "Joe IT";
$config['technicalcontact_email'] = "joe.it@example.com";
$config['secretsalt'] = 'y0h9d13pki9qdhfm3l5nws4jjn55j6hj';
$config['auth.adminpassword'] = 'mysupersecret';

1. Optionally set the following values to password protect the SimpleSAMLphp pages. (The password will be the value of `$config['auth.adminpassword']`.)

$config['admin.protectindexpage'] = TRUE;
$config['admin.protectmetadata'] = TRUE;
$config['admin.protectindexpage'] = TRUE;
$config['admin.protectmetadata'] = TRUE;

1. Edit `${project.root}/simplesamlphp/config/authsources.php` as described in [SimpleSAMLphp Service Provider QuickStart](https://simplesamlphp.org/docs/stable/simplesamlphp-sp) (except enabling a certificate for your service provider, which should be done according to the instructions below).

Expand All @@ -61,17 +61,17 @@ To configure SimpleSAMLphp with BLT perform the following steps after initially

1. Create a self-signed certificate in the `${project.root}/simplesamlphp/cert` directory:

cd simplesamlphp/cert
openssl req -x509 -sha256 -nodes -days 3652 -newkey rsa:2048 -keyout saml.pem -out saml.crt
cd simplesamlphp/cert
openssl req -x509 -sha256 -nodes -days 3652 -newkey rsa:2048 -keyout saml.pem -out saml.crt

2. Edit your `${project.root}/simplesamlphp/config/authsources.php` entry, and add references to your certificate:

'default-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'signature.algorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
),
'default-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'signature.algorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
),

1. Review `${project.root}/simplesamlphp/config/config.php` and set any values called for by your project requirements.

Expand Down

0 comments on commit 34cfb12

Please sign in to comment.