{"id":32438783,"url":"https://github.com/mcguinness/saml-idp","last_synced_at":"2025-10-26T00:52:58.427Z","repository":{"id":13975868,"uuid":"16676603","full_name":"mcguinness/saml-idp","owner":"mcguinness","description":"Simple SAML Identity Provider (IdP) for Node","archived":false,"fork":false,"pushed_at":"2023-07-25T22:29:43.000Z","size":1468,"stargazers_count":468,"open_issues_count":16,"forks_count":176,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-20T05:56:14.364Z","etag":null,"topics":["identity-provider","idp","saml","saml2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcguinness.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-02-09T21:48:20.000Z","updated_at":"2025-09-17T07:59:44.000Z","dependencies_parsed_at":"2023-01-11T20:21:34.223Z","dependency_job_id":"a0781304-4619-4747-9b48-032c18c2a459","html_url":"https://github.com/mcguinness/saml-idp","commit_stats":{"total_commits":87,"total_committers":19,"mean_commits":4.578947368421052,"dds":0.5287356321839081,"last_synced_commit":"a0bc70351fc7473996ffae85c7b40844831f0a9a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mcguinness/saml-idp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcguinness%2Fsaml-idp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcguinness%2Fsaml-idp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcguinness%2Fsaml-idp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcguinness%2Fsaml-idp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcguinness","download_url":"https://codeload.github.com/mcguinness/saml-idp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcguinness%2Fsaml-idp/sbom","scorecard":{"id":631992,"data":{"date":"2025-08-11","repo":{"name":"github.com/mcguinness/saml-idp","commit":"5c726484166c1dbf6bf044e5151894458d082bcf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":3,"reason":"Found 10/28 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:latest to node:latest@sha256:d2b6b5aedb5b729f68ee1129e0f5a5d4713d93f82448249e82241876d8e8d86e","Warn: npmCommand not pinned by hash: Dockerfile:4","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-c27r-x354-4m68","Warn: Project is vulnerable to: GHSA-9p8x-f768-wp2g","Warn: Project is vulnerable to: GHSA-x3m8-899r-f7c3","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T08:11:37.810Z","repository_id":13975868,"created_at":"2025-08-21T08:11:37.810Z","updated_at":"2025-08-21T08:11:37.810Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281043404,"owners_count":26434444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["identity-provider","idp","saml","saml2"],"created_at":"2025-10-26T00:52:48.276Z","updated_at":"2025-10-26T00:52:58.421Z","avatar_url":"https://github.com/mcguinness.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis app provides a simple SAML Identity Provider (IdP) to test SAML 2.0 Service Providers (SPs) with the [SAML 2.0 Web Browser SSO Profile](http://en.wikipedia.org/wiki/SAML_2.0#Web_Browser_SSO_Profile) or the Single Logout Profile.\n\n\u003e **This sample is not intended for use with production systems!**\n\n## Installation\n\n### Global Command Line Tool\n\n``` shell\nnpm install --global saml-idp\n```\n\n### Manual\n\nFrom inside a local copy of this repo\n\n``` shell\nnpm install\n# or\nnpm link\n```\n\n### Library\n\n``` shell\nnpm install saml-idp\n```\n\n### Docker\n\n1. docker-compose build\n2. docker-compose up\n\nSimply modify Dockerfile to specify your own parameters.\n\n## Generating IdP Signing Certificate\n\nYou must generate a self-signed certificate for the IdP.\n\n\u003e The private key should be unique to your test IdP and not shared!\n\nYou can generate a keypair using the following command (requires openssl in your path):\n\n``` shell\nopenssl req -x509 -new -newkey rsa:2048 -nodes -subj '/C=US/ST=California/L=San Francisco/O=JankyCo/CN=Test Identity Provider' -keyout idp-private-key.pem -out idp-public-cert.pem -days 7300\n```\n\n## Usage\n\n### Library\n\nAn IdP server can be started using the exported `runServer` function. `runServer` accepts a config object which matches the interface of the `saml-idp` command.\n\n``` javascript\nconst {runServer} = require('saml-idp');\n\nrunServer({\n  acsUrl: `https://foo.okta.com/auth/saml20/assertion-consumer`,\n  audience: `https://foo.okta.com/auth/saml20/metadata`,\n});\n```\n\n#### Custom user config (claims)\n\n``` javascript\nconst {runServer} = require('saml-idp');\n\nrunServer({\n  acsUrl: `https://foo.okta.com/auth/saml20/assertion-consumer`,\n  audience: `https://foo.okta.com/auth/saml20/metadata`,\n  config: {\n    user: userDefaults,\n    // The auth-service requires at least one AttributeStatement in the SAML assertion.\n    metadata: [{\n      id: 'email',\n      optional: false,\n      displayName: 'E-Mail Address',\n      description: 'The e-mail address of the user',\n      multiValue: false\n    }, {\n      id: \"userType\",\n      optional: true,\n      displayName: 'User Type',\n      description: 'The type of user',\n      options: ['Admin', 'Editor', 'Commenter']\n    }],\n    user: {\n      email: 'saml.jackson@example.com',\n    },\n  },\n});\n```\n\n### Command Line\n\n#### SSO Profile\n\n``` shell\nsaml-idp --acsUrl {POST URL} --audience {audience}\n```\n\n#### SSO \u0026 SLO Profile\n\n```\nsaml-idp --acsUrl {POST URL} --sloUrl {POST URL} --audience {audience}\n```\n\nOpen `http://localhost:7000` in your browser to start an IdP initiated flow to your SP\n\n#### Example\n\n```\nsaml-idp --acsUrl https://foo.okta.com/auth/saml20/example --audience https://www.okta.com/saml2/service-provider/spf5aFRRXFGIMAYXQPNV\n```\n\n#### Options\n\nThe following options can either be passed as `--\u003coption\u003e` or to `runServer` in an options object.\n\nOption (* required)      | Description                                                                                         | Default\n-----------------------: | --------------------------------------------------------------------------------------------------- | ----------\n**host**                 | IdP Web Server Listener Host                                                                       | localhost\n**port**                 | IdP Web Server Listener Port                                                                        | 7000\n**cert** _*_             | IdP Signature PublicKey Certificate                                                                 | ./idp-public-cert.pem\n**key** _*_              | IdP Signature PrivateKey Certificate                                                                | ./idp-private-key.pem\n**issuer** _*_           | IdP Issuer URI                                                                                      | urn:example:idp\n**acsUrl** _*_           | SP Assertion Consumer URL                                                                           |\n**sloUrl**               | SP Single                                                                                           |\n**audience** _*_         | SP Audience URI                                                                                     |\n**serviceProviderId**    | SP Issuer/Entity URI                                                                                |\n**relayState**           | Default SAML RelayState                                                                             |\n**disableRequestAcsUrl** | Disables ability for SP AuthnRequest to specify Assertion Consumer URL                              | false\n**encryptAssertion**     | Encrypts assertion with SP Public Key                                                               | false\n**encryptionCert**       | SP Certificate (pem) for Assertion Encryption                                                       |\n**encryptionPublicKey**  | SP RSA Public Key (pem) for Assertion Encryption (e.g. openssl x509 -pubkey -noout -in sp-cert.pem) |\n**httpsPrivateKey**      | Web Server TLS/SSL Private Key (pem)                                                                |\n**httpsCert**            | Web Server TLS/SSL Certificate (pem)                                                                |\n**https** _*_            | Enables HTTPS Listener (requires httpsPrivateKey and httpsCert)                                     | false\n**configFile** _*_       | Path to a SAML attribute config file                                                                | saml-idp/config.js\n**rollSession**          | Create a new session for every authn request instead of reusing an existing session                 | false\n**authnContextClassRef** | Authentication Context Class Reference                                                              | urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n**authnContextDecl**     | Authentication Context Declaration (XML FilePath)                                                   |\n\n\n# IdP SAML Settings\n\n## Issuer\n\nThe default IdP issuer is `urn:example:idp`.  You can change this with the `--iss` argument.\n\n## Signing Certificate\n\nThe signing certificate public key must be specified as a file path or PEM string using the `cert` argument.\n\nTo generate a self-signed certificate for the IdP run\n\n``` shell\nopenssl req -x509 -new -newkey rsa:2048 -nodes \\\n  -subj '/C=US/ST=California/L=San Francisco/O=JankyCo/CN=Test Identity Provider' \\\n  -keyout idp-private-key.pem \\\n  -out idp-public-cert.pem -days 7300\n```\n\nThe signing certificate private key must be specified as a file path or PEM string using the `key` argument\n\n### Passing key/cert pairs from environment variables\n\nSigning certificate key/cert pairs can also be passed from environment variables.\n\n```\nsaml-idp --acsUrl {POST URL} --audience {audience} --cert=\"$SAML_CERT\" --key=\"$SAML_KEY\"\n```\n\n## Single Sign-On Service Binding\n\nBoth SSO POST and Redirect bindings are available on the same endpoint which by default is `http://localhost:7000/saml/sso`\n\nBinding       | URL\n------------- | --------------------------------------------------------\nHTTP-Redirect | `http://localhost:port/saml/sso`\nHTTP-POST     | `http://localhost:port/saml/sso`\n\n## Single Logout Service Binding\n\nBoth SSO POST and Redirect bindings are available on the same endpoint which by default is `http://localhost:7000/saml/slo`\n\nBinding       | URL\n------------- | --------------------------------------------------------\nHTTP-Redirect | `http://localhost:port/saml/slo`\nHTTP-POST     | `http://localhost:port/saml/slo`\n\n## SAML Metadata\n\nIdP SAML metadata is available on `http://localhost:port/metadata`\n\n## Assertion Attributes\n\nThe IdP mints the user's profile as a SAML Assertion Attribute Statement using the `metadata` property in `config.js`.  Profile properties that match a metadata entry `id` property will be generated as a SAML Attribute with the same name.  The IdP UI will automatically render an input for each entry defined via a `metadata` entry in `config.js` with a default value from the matching `profile` property.\n\n#### Profile Property\n\n```json\n{\n  \"email\": \"saml.jackson@example.com\"\n}\n```\n\n#### Metadata Entry\n\n```json\n{\n  \"id\": \"email\",\n  \"optional\": false,\n  \"displayName\": \"E-Mail Address\",\n  \"description\": \"The e-mail address of the user\",\n  \"multiValue\": false\n}\n```\n\n#### SAML Assertion Attribute Statement\n\n```xml\n\u003csaml:Attribute Name=\"email\"\u003e\u003csaml:AttributeValue xsi:type=\"xs:anyType\"\u003esaml.jackson@example.com\u003c/saml:AttributeValue\u003e\n```\n\n### Default Attributes\n\nThe default profile mappings are defined in `config.js` as:\n\nProfile Property      | SAML Attribute Name\n--------------------- | --------------------------------------------------------\nuserName              | Subject NameID\nnameIdFormat          | Subject NameID Format\nnameIdNameQualifier   | Subject NameID Name Qualifer\nnameIdSPNameQualifier | Subject NameID SP Name Qualifer\nnameIdSPProvidedID    | Subject NameID SP ProvidedID\nfirstName             | `firstName`\nlastName              | `lastName`\ndisplayName           | `displayName`\nemail                 | `email`\nmobilePhone           | `mobilePhone`\ngroups                | `groups`\n\n\u003e SAML attribute mappings currently default to [Okta (Inbound SAML)](developer.okta.com)\n\n### Custom Attributes\n\nNew attributes can be defined at runtime in the IdP UI or statically by modifying the `profile` and `metadata` objects in `config.js`.\n\n1. Add metadata entry for your new attributes.  The `id` property must be the name of the SAML Attribute\n\n    ```json\n    {\n      \"id\": \"customAttribute\",\n      \"optional\": false,\n      \"displayName\": \"Custom Attribute\",\n      \"description\": \"My custom attribute\",\n      \"multiValue\": false\n    }\n    ```\n\n2. Optionally add a default profile attribute value that will be used on startup\n\n\n## Assertion Encryption\n\nEncrypted assertions require both a certificate and public key from the target service provider in the PEM format (base64 encoding of `.der`, `.cer`, `.cert`, `.crt`).  You can convert certificate formats with `openssl`\n\n### DER to PEM\n\n``` shell\nopenssl x509 -inform der -in to-convert.der -out converted.pem\n```\n\n\u003e The following formats or extensions should be convertible to the pem format: `.der`, `.cer`, `.cert`, `.crt\n\n### PEM Certificate to Public Key\n\nPEM files that contain the header `-----BEGIN CERTIFICATE-----` can also be converted to just the public key which is a file with just the `-----BEGIN PUBLIC KEY-----` header\n\n``` shell\nopenssl x509 -pubkey -noout -in cert.pem \u003e pub.key\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcguinness%2Fsaml-idp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcguinness%2Fsaml-idp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcguinness%2Fsaml-idp/lists"}