Skip to content

Commit

Permalink
Use node-saml implementation with sender-vouches
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf committed Jan 21, 2024
1 parent f5052af commit 87589d0
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 41 deletions.
125 changes: 86 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"helmet": "^7.1.0",
"passport": "^0.7.0",
"passport-azure-ad": "latest",
"saml": "^3.0.1",
"saml": "https://github.com/skat/node-saml.git",
"sqlite3": "^5.1.7"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion srv/saml-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const cds = require("@sap/cds");
const LOG = cds.log("saml-service");

const fs = require("fs");
var saml = require("saml").Saml20; // or Saml11
var saml = require("saml").Saml11; // Saml20 or Saml11

module.exports = class SamlService extends cds.Service {
init() {
Expand All @@ -11,7 +11,9 @@ module.exports = class SamlService extends cds.Service {
key: fs.readFileSync("./certificates/idp.example.com-key.pem").toString(),
issuer: "https://idp.example.com",
lifetimeInSeconds: 600,
offset: 60,
audiences: "http://A4H",
subjectConfirmationMethod: "sender-vouches",
attributes: {
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":
"Gregor Wolf",
Expand Down

0 comments on commit 87589d0

Please sign in to comment.