Skip to content

Commit ad8aaa2

Browse files
committed
update readme.md
1 parent 3dd87c9 commit ad8aaa2

1 file changed

Lines changed: 19 additions & 28 deletions

File tree

README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
# phpList simpleSAML Plugin
22

3-
SimpleSaml plugin for phpList
3+
Saml2 plugin for phpList
44

55
## Plugin Setup
66

77
After `cd`-ing into the configured phpList plugin directory:
88

9-
1) `git clone https://github.com/phpList/phplist-plugin-simplesaml.git`
9+
1) `git clone git@github.com:phpList/phplist-plugin-saml2.git`
1010

1111
## Configuration
1212

13-
In `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp` the following directories should be present.
13+
### You can configure saml from the phplist configuration page "SSO config" category (except for certificate which should be added manually in the cert folder)
14+
you will need to give write permission to the simplesaml/settings.php file
1415

15-
- `config`
16-
- `metadata`
16+
https://resources.phplist.com/plugin/simplesaml#simplesamlphp_installation_check
1717

18-
If not, you want to:
19-
20-
- `cd phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp`
21-
- `cp -r config-templates config`
22-
- `cp -r metadata-templates metadata`
23-
24-
* **In [phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp/config/authsources.php] the following parameters have to be set:**
18+
* **In [phplist-plugin-saml2/plugins/simplesaml/simplesamlphp/config/authsources.php] the following parameters will to be set:**
2519

2620
- **`entityID`**: The `entityID` is essentially the client ID which is specified in Keycloak or IDP
2721
- **`idp`**: The IDP is the identifier for the IdP (Keycloak) which simplesaml would connect to.
2822
- **`RelayState`**: The `RelayState` specifies where `simplesamlphp` should redirect to after a successful authentication. Basically it's like a callback url. This should simply be the URL from which the authentication started. Hence, a 'redirect back'.
2923
- **`NameIDPolicy`**: The IdP is expected to return a `NameID` every successful auth session, this name ID is what identifies the user. Depending on the IdP this `NameID` might change every session. That makes it impossible to tract the user across session. So we have to said the `NameIDPolicy` to `persistent` essentially telling the IdP to send the same `NameID` all the time for the same user.
3024

31-
The`authsources.php` should look like:
25+
The`authsources.php` will look like (values set automatically from configuration):
3226

3327
```php
3428
<?php
@@ -63,13 +57,13 @@ $config = [
6357
];
6458
```
6559

66-
- **In [phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp/config/config.php] the following parameters have to be set:**
60+
- **In [phplist-plugin-saml2/plugins/simplesaml/simplesamlphp/config/config.php] the following parameters will be set:**
6761

6862
* **`baseurlpath`**: The `baseurlpath` refers to the base url the running `SimpleSAML` configuration. Depending on where simplesaml was installed, it could be a separate domain such as `phplist.com/simplesamlphp/www` or a path like `phplist.com/admin/simplesamlphp/www`.
6963

7064
_**NB:** The baseurlpath (which is essentially the simplesaml installation) is where the IdP returns the SAML response after a successful login. The SAML request would then be parsed and simplesamlphp would redirect back to the phplist url that sent the request or the one set via the `RelayState` property in the config array of `authsources.php`_ within the config dir.
7165

72-
The `config.php` should look like:
66+
The `config.php` will look like:
7367

7468
```php
7569
<?php
@@ -85,7 +79,7 @@ $config = [
8579
];
8680
```
8781

88-
- **In [phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp/metadata/saml20-idp-remote.php] metadata about the IdP has to be provided:**
82+
- **In [phplist-plugin-saml2/plugins/saml2/simplesamlphp/metadata/saml20-idp-remote.php] metadata about the IdP will be provided:**
8983

9084
* **Metadata array**: The metadata should be assigned to `$metadata['id']` (where id is the idp identifier passed to `idp` paramater in the config above!)
9185
* **SingleSignOnService**: The keycloak endpoint to send login requests to.
@@ -110,31 +104,28 @@ $metadata['https://sso.phplist.com:8443/realms/master'] = [
110104
];
111105
```
112106

113-
2) Set up `phplist.domain/simplesamlphp` to point to `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp`
107+
certData will be taken from the cert/saml-remote-idp.crt file (you should add a certificate there, it will not be set from configuration page as other values are)
108+
109+
2) Set up `phplist.domain/simplesamlphp` to point to `phplist-plugin-saml2/plugins/simplesaml/simplesamlphp`
114110

115111

116112
## Ways to configure 2) above:
117113

118-
* **VERY SIMPLE: ** After following the steps in the configuration phase above, simply copy the contents of `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp` to `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp`. OR;
119-
* A symlink from `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp` to `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp` should work. OR;
120-
* Server configuration to pass traffic from `phplist.domain/simplesamlphp` to `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp`.
114+
* **VERY SIMPLE: ** After following the steps in the configuration phase above, simply copy the contents of `phplist-plugin-saml2/plugins/simplesaml/simplesamlphp` to `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp`. OR;
115+
* A symlink from `phplist-plugin-saml2/plugins/simplesaml/simplesamlphp` to `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp` should work. OR;
116+
* Server configuration to pass traffic from `phplist.domain/simplesamlphp` to `phplist-plugin-saml2/plugins/simplesaml/simplesamlphp`.
121117

122118

123119
Notes: The symlink method would not work in docker and the "VERY SIMPLE" method creates some redundancy. However the goal is that, by whatever means `phplist.domain/simplesamlphp` points to `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp`.
124120

125121
You might be required to manually create a `log` directory inside `PATH_TO_PHPLIST_INSTALLATION/public_html/simplesamlphp` with write permissions granted, so: `mkdir log && sudo chmod -R a+rwx log`
126122

127-
**NB**: `simplesamlphp` **MUST BE CONFIGURED ON SAME DOMAIN** as your phplist installation. Hence `phplist.domain/simplesamlphp` SHOULD point to `phplist-plugin-simplesaml/plugins/simplesaml/simplesamlphp`.
123+
**NB**: `simplesamlphp` **MUST BE CONFIGURED ON SAME DOMAIN** as your phplist installation. Hence `phplist.domain/simplesamlphp` SHOULD point to `phplist-plugin-saml2/plugins/simplesaml/simplesamlphp`.
128124

129125

130126
# UPDATING SimpleSAMLPHP [Developer Instructions]
131127

132-
- Download new version of `simplesamlphp` from their [official website](https://simplesamlphp.org/download/)
133-
- Unzip it and rename the folder to `simplesamlphp`, delete existing `simplesaml/simplesamlphp` and replace with the newly downloaded folder.
134-
- Git commit it with the version number like "Added simplesamlphp-1.19.5"
135-
136-
137-
*This plugin ships with built version of `simplesamlphp` cloned from [`https://github.com/simplesamlphp/simplesamlphp`](https://github.com/simplesamlphp/simplesamlphp).*
128+
- Updating is not recommended
138129

139130
## Configuring the IdP
140131

@@ -152,7 +143,7 @@ Keycloak does creates a `Master realm` by default but more realms can be created
152143

153144
### Clients
154145

155-
Within realms, are clients! A client is an entity that can request Keycloak to authenticate a user. Most often, clients are applications and services that want to use Keycloak to secure themselves and provide a single sign-on solution. Essentially, the client represents or serves as a connector that makes request on behalf of the **service provider (in this case simplesamlphp)**
146+
Within the realm, there are clients! A client is an entity that can request Keycloak to authenticate a user. Most often, clients are applications and services that want to use Keycloak to secure themselves and provide a single sign-on solution. Essentially, the client represents or serves as a connector that makes request on behalf of the **service provider (in this case simplesamlphp)**
156147

157148
Again, we have a couple of default clients created in the `Master realm` by keycloak! Each client contains access control information such as roles and scope!
158149

0 commit comments

Comments
 (0)