Hi @gkoli@apigee.com
I was following the Steps mentioned at link below to setup SAML on Developer Portal version 4.16.0.5
https://community.apigee.com/articles/29201/sso-integration-via-saml-with-developer-portal.html
Now we have moved to Developer Portal version 4.17.0.1 (nginx instead of apache and postgres instead of mariadb), how should we configure below two points of Step 5
- Set ‘store.type’ to sql
- Set the value of the ‘store.sql.dsn’ key as 'mysql:host=;port=;dbname=
Also are there any other changes related to new version in the Steps mentioned in link above.
I made the below entries in config.php
‘store.type’ => ‘sql’,
‘store.sql.dsn’ => ‘pgsql:host=localhost;port=5432;dbname=devportal’
I am getting 403 Forbidden, when trying to access
http://<devportal_fqdn>:8080/simplesaml/
and it is redirecting to url
http://<devportal_fqdn>:8080/simplesaml/module.php/core/frontpage_welcome.php
Thanks
It needs to be something like pgsql:host=localhost;port=5432;dbname=testdb;user=bruce;password=mypass
Hi @Christin Brown
I have added below code in
/opt/apigee/apigee-drupal-devportal/source/conf/apigee-drupal-devportal-nginx.conf
Attaching the file for reference
location = /simplesaml {
alias /opt/apigee/apigee-drupal/sites/default/private/simplesamlphp/www; ##
location ~ ^(?<prefix>/saml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}
} <br>
But still no luck, did I miss anything ?
apigee-drupal-devportal-nginx.zip
This seems to do the trick:
-
Add following to /opt/apigee/apigee-drupal-devportal/source/conf/apigee-drupal-devportal-nginx.conf
location /simplesaml {
alias /opt/apigee/apigee-drupal/sites/default/private/simplesamlphp/www;
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
include /opt/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:{T}php_fpm_port{/T};
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}
}
-
Restart services with /opt/apigee/apigee-service/bin/apigee-service apigee-drupal-devportal restart
-
Copy all files from /opt/apigee/apigee-drupal/sites/default/private/simplesamlphp/config-templates to /opt/apigee/apigee-drupal/sites/default/private/simplesamlphp/config
-
Modify following values in /opt/apigee/apigee-drupal/sites/default/private/simplesamlphp/config/config.php
'baseurlpath' => 'http://_FQDN_:_PORT_/simplesaml/',
'store.type' => 'sql',
'store.sql.dsn' => 'pgsql:host=_FQDN_;port=_PORT_;dbname=_DBNAME_',
'store.sql.username' => '_DBUSER_',
'store.sql.password' => '_DBPASS_',
'trusted.url.domains' => array('_FQDN_:_PORT_'),
1 Like
Hi @GAURAV
The master process for php-fpm has no unix socket by default
/opt/apigee/apigee-drupal-devportal-4.xxx.xxxx/conf/php-fpm.conf
So your location block should like this.
location ^~ /simplesaml {
index index.php index.html index.htm;
alias /opt/apigee/apigee-drupal/wwwroot/private/simplesamlphp/www;
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
include /opt/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:8888;
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}
}
Please use /opt/apigee/apigee-drupal/wwwroot/private/ as your location for simplesamlphp as indicated above.
Also of you for fastcgi_pass check the IP and port number of php-fpm master process at /opt/apigee/apigee-drupal-devportal-4.xxx.xxxx/conf/php-fpm.conf if the config above doesnt work