Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit a9561e8

Browse files
wouterademgrasmash
authored andcommitted
Added and refactored some of the information for SimpleSAMLPHP setup. (#629)
1 parent 847d5a7 commit a9561e8

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

readme/simplesamlphp-setup.md

+37-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1-
# SimpleSAMLphp Setup
1+
# SimpleSAMLphp using BLT
22

3-
To configure SimpleSAMLphp, perform the following steps after initially setting up BLT:
3+
To configure SimpleSAMLphp with BLT perform the following steps after initially setting up BLT:
44

5-
1. Execute `blt simplesamlphp:init`. This performs the following initial setup tasks:
5+
#### <i class="icon-code"></i> BLT Basic Setup
6+
Execute `blt simplesamlphp:init`. This performs the following initial setup tasks:
67

7-
* Adds the `simplesamlphp_auth` module as a project dependency.
8+
* Adds the `simplesamlphp_auth` module as a project dependency in your `composer.json` file.
89
* Copies configuration files to `${project.root}/simplesamlphp`.
910
* Adds a `simplesamlphp` property to `project.yml`.
1011
* Creates a symbolic link in the docroot to the web accessible directory of the `simplesamlphp` library.
1112

12-
1. Add the following two lines to `docroot/.htaccess`:
13+
> **Note:**
14+
15+
> - The `simplesamlphp_auth` module contains a `composer.json` file where you can find the version (`~1.14.4`) of the SimpleSamlPHP library that will be installed.
16+
> - As part of `blt simplesamlphp:init` BLT creates a `config` directory that contains three important files: `config.php`, `acquia_config.php` and `authsources.php`.
17+
18+
#### <i class="icon-pencil"></i> Basic Config
19+
20+
- Add the following two lines to `docroot/.htaccess`:
1321

1422
```
1523
# Allow access to simplesaml paths.
1624
RewriteCond %{REQUEST_URI} !^/simplesaml
1725
```
1826

19-
...for example, as depicted in the "diff" below:
27+
> **Note:**
2028
21-
```
29+
> For example, as depicted in the "diff" below:
30+
> ```
2231
# Copy and adapt this rule to directly execute PHP files in contributed or
2332
# custom modules or to run another PHP application in the same directory.
2433
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
@@ -28,7 +37,7 @@ To configure SimpleSAMLphp, perform the following steps after initially setting
2837
RewriteRule "^.+/.*\.php$" - [F]
2938
```
3039
31-
1. Edit `${project.root}/simplesamlphp/config/acquia_config.php` as follows:
40+
- Edit `${project.root}/simplesamlphp/config/acquia_config.php` as follows:
3241

3342
* Update your database name in `$ah_options`:
3443

@@ -63,19 +72,25 @@ To configure SimpleSAMLphp, perform the following steps after initially setting
6372
$config['admin.protectmetadata'] = true;
6473
```
6574
66-
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).
75+
> **Note:**
6776
68-
1. If your Identity Provider/Federation requires that your Service Providers hold a certificate...
77+
> - The file `acquia_config.php` is created in the first step i.e. Basic Setup and the file `config.php` must contain a line `include 'acquia_config.php'` that includes that particular file.
6978
70-
1. Create a self-signed certificate in the `${project.root}/simplesamlphp/cert` directory:
79+
- 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).
7180
72-
```
81+
- Edit `${project.root}/simplesamlphp/metadata/saml20-idp-remote.php` as described in [IdP remote metadata reference](https://simplesamlphp.org/docs/stable/simplesamlphp-reference-idp-remote).
82+
83+
#### <i class="icon-pencil"></i> Optional Config
84+
85+
If your Identity Provider/Federation requires that your Service Providers hold a certificate.
86+
87+
1. Create a self-signed certificate in the `${project.root}/simplesamlphp/cert` directory:
88+
```
7389
cd simplesamlphp/cert
7490
openssl req -x509 -sha256 -nodes -days 3652 -newkey rsa:2048 -keyout saml.pem -out saml.crt
7591
```
76-
77-
1. Edit your `${project.root}/simplesamlphp/config/authsources.php` entry, and add references to your certificate:
78-
92+
93+
2. Edit your `${project.root}/simplesamlphp/config/authsources.php` entry, and add references to your certificate:
7994
```
8095
'default-sp' => array(
8196
'saml:SP',
@@ -85,10 +100,13 @@ To configure SimpleSAMLphp, perform the following steps after initially setting
85100
),
86101
```
87102
88-
1. Review `${project.root}/simplesamlphp/config/config.php` and set any values called for by your project requirements.
103+
#### <i class="icon-check"></i> Check Config
104+
105+
Review `${project.root}/simplesamlphp/config/config.php` and set any values called for by your project requirements.
89106
90-
1. Edit `${project.root}/simplesamlphp/metadata/saml20-idp-remote.php` as described in [IdP remote metadata reference](https://simplesamlphp.org/docs/stable/simplesamlphp-reference-idp-remote).
107+
#### <i class="icon-code"></i> BLT Copy Config
91108
92-
1. Execute `blt simplesamlphp:config:build` to copy these configuration files to the SimpleSAMLphp library.
109+
Execute `blt simplesamlphp:config:build` to copy these configuration files to the SimpleSAMLphp library.
93110
94-
1. Commit the changes.
111+
#### <i class="icon-provider-github"></i> Deploy Code
112+
Commit your changes to your Git repository.

0 commit comments

Comments
 (0)