Simplesamlphp

 

 

Simplesamlphp

安装:

下载:https://simplesamlphp.org/

 cd /opt/www/html
 tar xzf simplesamlphp-x.y.z.tar.gz
 mv simplesamlphp-x.y.z samlldp

 

设置Apache设置:

Alias /samlsp /opt/www/html/samlsp/www
Alias /samlldp /opt/www/html/samlldp/www
<Directory /opt/www/html/samlsp/www>
     Require all granted
</Directory>
<Directory /opt/www/html/samlldp/www>
     Require all granted
</Directory>

Simplesamlphp可以设置为LDP, 也可以设置为SP;

可以在服务器上建立两个独立的解压目录, 如上图。本文主要是配置基于Mysql数据存储的LDP;

Simplesamlphp的配置目录位于:/opt/www/html/samlldp/config

其中:

config.php为Simplesamlphp本身的设置

authsources.php 为授权源设置

 'baseurlpath' => 'samlldp/', 




 'technicalcontact_name' => 'xxx',
 'technicalcontact_email' => 'xxx@qq.com',


 
'timezone' => 'Asia/Shanghai',


 'secretsalt' => 'absssssssssst',

 'auth.adminpassword' => 'xxxxx',

  
 'debug' => [
        'saml' => true,
        'backtraces' => true,
        'validatexml' => false,
    ],

 /*
     * Database connection string.
     * Ensure that you have the required PDO database driver installed
     * for your connection string.
     */
    'database.dsn' => 'mysql:host=xx.x.x.x;dbname=samlldp',

    /*
     * SQL database credentials
     */
    'database.username' => 'xxx',
    'database.password' => 'xxxxxxx',
    'database.options' => [],


 'module.enable' => [
         'exampleauth' => false,
         'core' => true,
         'saml' => true
     ],

 'store.type'                    => 'sql', 
'store.sql.dsn'                 => 'mysql:host=xx.x.xx.xx;dbname=samlldp',
    /*
     * The username and password to use when connecting to the database.
     */
    'store.sql.username' => 'xxx',#null,
    'store.sql.password' => 'xx',# null,



authsources.php 设置

 'example-sql' => [
        'sqlauth:SQL',
        'dsn' => 'mysql:host=xxx.xx.x.x;port=3306;dbname=samlldp',
        'username' => 'xx',
        'password' => 'xxx',
        'query' => 'SELECT uid, givenName, email, eduPersonPrincipalName FROM users WHERE uid =:username AND password = SHA2(CONCAT((SELECT salt FROM users WHERE uid = :username),:password), 256);',
    ],

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Kalong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值