{"action":"created","issue":{"url":"https://api.github.com/repos/bergie/passport-saml/issues/225","repository_url":"https://api.github.com/repos/bergie/passport-saml","labels_url":"https://api.github.com/repos/bergie/passport-saml/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/bergie/passport-saml/issues/225/comments","events_url":"https://api.github.com/repos/bergie/passport-saml/issues/225/events","html_url":"https://github.com/bergie/passport-saml/issues/225","id":247688394,"number":225,"title":"Secure SAML implementation issue.","user":{"login":"ambermore","id":6920473,"avatar_url":"https://avatars3.githubusercontent.com/u/6920473?v=4","gravatar_id":"","url":"https://api.github.com/users/ambermore","html_url":"https://github.com/ambermore","followers_url":"https://api.github.com/users/ambermore/followers","following_url":"https://api.github.com/users/ambermore/following{/other_user}","gists_url":"https://api.github.com/users/ambermore/gists{/gist_id}","starred_url":"https://api.github.com/users/ambermore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambermore/subscriptions","organizations_url":"https://api.github.com/users/ambermore/orgs","repos_url":"https://api.github.com/users/ambermore/repos","events_url":"https://api.github.com/users/ambermore/events{/privacy}","received_events_url":"https://api.github.com/users/ambermore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-03T12:21:23Z","updated_at":"2018-02-03T13:42:45Z","closed_at":"2017-10-09T19:50:58Z","author_association":"NONE","body":"We need to implement SAML based secure authentication. Our IDP will be Okta and OneLogin. We use the following strategy configuration at SP side for Okta-\r\n\r\nvar oktaLoginStrategy = {\r\n    host: 'http://localhost:3000',\r\n    path: '/login/callback',\r\n    realm: 'urn:node:app',\r\n    entryPoint: \"https://dev-528399.oktapreview.com/app/builtiodev528399_oktasp1_1/exkbbi8vwj2OsHjbE0h7/sso/saml\",\r\n    issuer: \"http://www.okta.com/exkbbi8vwj2OsHjbE0h7\",\r\n    additionalParams: {\r\n        'RelayState': \"test\"\r\n    },\r\n    signatureAlgorithm: 'sha256',\r\n    decryptionPvk: privateKey,\r\n    privateCert: privateKey,\r\n    cert: oktaPublicKey,\r\n    identifierFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'\r\n};\r\n\r\nand for OneLogin we use-\r\n\r\nvar oneLoginStrategy = {\r\n    host: 'http://localhost:3000',\r\n    path: '/login/callback',\r\n    realm: 'urn:node:app',\r\n    entryPoint: \"https://flow-dev.onelogin.com/trust/saml2/http-post/sso/686218\",\r\n    issuer: \"https://app.onelogin.com/saml/metadata/686218\",\r\n    additionalParams: {\r\n        'RelayState': \"test\"\r\n    },\r\n    signatureAlgorithm: 'sha256',\r\n    decryptionPvk: privateKey,\r\n    privateCert: privateKey,\r\n    cert: oneLoginPublicKey,\r\n    validateInResponseTo: true,\r\n    identifierFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'\r\n};\r\n\r\nBut for Okta it is giving error as \"Cannot read property 'getAttribute' of undefined\" and for OneLogin it is giving error as \"Invalid signature\". Further, we debugged into the module and found that for Okta it breaks while finding algorithm and for OneLogin, it able to decrypt 'CipherData' but it breaks while validating the signature. \r\n\r\nOur private key format is-\r\n-----BEGIN PRIVATE KEY-----\r\n-----END PRIVATE KEY-----\r\n\r\nPlease help us into this.\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bergie/passport-saml/issues/comments/362807335","html_url":"https://github.com/bergie/passport-saml/issues/225#issuecomment-362807335","issue_url":"https://api.github.com/repos/bergie/passport-saml/issues/225","id":362807335,"user":{"login":"badalsharma31","id":12763825,"avatar_url":"https://avatars2.githubusercontent.com/u/12763825?v=4","gravatar_id":"","url":"https://api.github.com/users/badalsharma31","html_url":"https://github.com/badalsharma31","followers_url":"https://api.github.com/users/badalsharma31/followers","following_url":"https://api.github.com/users/badalsharma31/following{/other_user}","gists_url":"https://api.github.com/users/badalsharma31/gists{/gist_id}","starred_url":"https://api.github.com/users/badalsharma31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badalsharma31/subscriptions","organizations_url":"https://api.github.com/users/badalsharma31/orgs","repos_url":"https://api.github.com/users/badalsharma31/repos","events_url":"https://api.github.com/users/badalsharma31/events{/privacy}","received_events_url":"https://api.github.com/users/badalsharma31/received_events","type":"User","site_admin":false},"created_at":"2018-02-03T13:42:45Z","updated_at":"2018-02-03T13:42:45Z","author_association":"NONE","body":"Issue resolved, As I was using older version of passport-saml. So i updated version in package.json file."}}
{"actor":{"display_login":"badalsharma31"}}