node.js - 如何在 SAML POST 中通过 X509 证书
问题描述
我正在将我们现有的 SAML 实现从 SimpleSAMLphp 迁移到 passport-saml。在使用 HTTP-POST 绑定时,我遇到了一些障碍。
使用 SAML chrome 检查器时,我注意到工作实现通过了消息正文中的 X509 证书,但 passport-saml 似乎没有包含它,只有 SignatureValue。
我的 SAML 策略目前看起来像这样。
const strategy = new passportSaml.Strategy(
{
callbackUrl: 'http://localhost:3000/assert',
entryPoint: 'https://clientsaml.com/samljct/',
passReqToCallback: true,
cert: fs.readFileSync(
path.resolve(__dirname, '../certs/cert.crt'),
'utf-8'
),
privateKey: fs.readFileSync(
path.resolve(__dirname, '../certs/privateKey.pem'),
'utf-8'
),
authnRequestBinding: 'HTTP-POST',
skipRequestCompression: true
},
(profile, done) => {
console.log(profile);
return done(null, profile);
}
);
解决方案
推荐阅读
- amazon-web-services - 请求 AWS Spot 实例最佳实践?
- javascript - jQuery - 在 Range Track 上更改 CSS
- java - 如何创建一个最小的 Android gradle 项目?
- sql-server - 如何在VS中以调试模式在脚本任务中执行打包任务
- sql - PostgreSQL,在另一个表中创建行时向表中添加行
- django - 将excel文档上传到React并存储在数据库中
- css - Ionic 5 ion-tab-bar 渐变背景
- spring-kafka - 如果生产者应用程序在发送到代理之前崩溃,生产者“buffer.memory”中的消息会发生什么?
- c++ - 如何在 C++ 中将浮点数转换为无符号整数?
- java - 如何使用 Jackson 的 ObjectMapper 从 JSON 字符串创建对象?