You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
***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:**
25
19
26
20
-**`entityID`**: The `entityID` is essentially the client ID which is specified in Keycloak or IDP
27
21
-**`idp`**: The IDP is the identifier for the IdP (Keycloak) which simplesaml would connect to.
28
22
-**`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'.
29
23
-**`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.
30
24
31
-
The`authsources.php`should look like:
25
+
The`authsources.php`will look like (values set automatically from configuration):
32
26
33
27
```php
34
28
<?php
@@ -63,13 +57,13 @@ $config = [
63
57
];
64
58
```
65
59
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:**
67
61
68
62
***`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`.
69
63
70
64
_**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.
71
65
72
-
The `config.php`should look like:
66
+
The `config.php`will look like:
73
67
74
68
```php
75
69
<?php
@@ -85,7 +79,7 @@ $config = [
85
79
];
86
80
```
87
81
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:**
89
83
90
84
***Metadata array**: The metadata should be assigned to `$metadata['id']` (where id is the idp identifier passed to `idp` paramater in the config above!)
91
85
***SingleSignOnService**: The keycloak endpoint to send login requests to.
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`
114
110
115
111
116
112
## Ways to configure 2) above:
117
113
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`.
121
117
122
118
123
119
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`.
124
120
125
121
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`
126
122
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`.
128
124
129
125
130
126
# UPDATING SimpleSAMLPHP [Developer Instructions]
131
127
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
138
129
139
130
## Configuring the IdP
140
131
@@ -152,7 +143,7 @@ Keycloak does creates a `Master realm` by default but more realms can be created
152
143
153
144
### Clients
154
145
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)**
156
147
157
148
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!
0 commit comments