{"_id":"@aws/fhir-works-on-aws-authz-rbac","_rev":"4-4145a22ce6223d7c0bd7de3a8362b378","name":"@aws/fhir-works-on-aws-authz-rbac","dist-tags":{"latest":"6.0.1"},"versions":{"5.0.0":{"name":"@aws/fhir-works-on-aws-authz-rbac","version":"5.0.0","description":"FHIR Works on AWS role base access control","homepage":"https://github.com/aws-solutions/fhir-works-on-aws/fwoa-core/authz-rbac","repository":{"type":"git","url":"git://github.com/awslabs/fhir-works-on-aws-authz-rbac.git"},"license":"Apache-2.0","author":{"name":"Amazon Web Services","email":"fhir-works-on-aws-dev@amazon.com","url":"https://aws.amazon.com/"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{"@aws/fhir-works-on-aws-interface":"12.1.0","jsonwebtoken":"^9.0.0","lodash":"^4.17.21"},"devDependencies":{"@aws/eslint-config-fwoa-eslint-custom":"0.0.1","@rushstack/eslint-config":"^3.0.0","@rushstack/heft":"0.49.0","@rushstack/heft-jest-plugin":"0.4.2","@rushstack/heft-node-rig":"1.11.11","@types/heft-jest":"^1.0.3","@types/jest":"^26.0.19","@types/jsonwebtoken":"^8.5.4","@types/lodash":"^4.14.182","@types/node":"^14","@types/shuffle-array":"^1.0.0","eslint":"^8.7.0","jest":"^26.6.3","jest-mock-extended":"^1.0.8","npm-package-json-lint":"^6.3.0","npm-package-json-lint-config-default":"^5.0.0","prettier":"^2.4.1","shuffle-array":"^1.0.1","sort-package-json":"^1.57.0","standard-version":"^9.3.2","ts-jest":"^26.4.4","typescript":"^4.9.4"},"engines":{"node":">=18.0.0"},"scripts":{"build":"heft build --clean && rushx pkg-json-lint","build-test":"heft test --clean && rushx pkg-json-lint","clean":"rm -rf build/* node_modules/* dist/* .nyc_output/* lib/*","lint-fix":"eslint . --fix","local":"node .","pkg-json-lint":"npmPkgJsonLint -c ../../.npmpackagejsonlintrc.json .","sort-package-json":"sort-package-json package.json","standard-version":"standard-version --skip.tag=true","test":"heft test --clean --no-build && rushx pkg-json-lint","watch":"tsc -w"},"gitHead":"42549579feaa325466353a45c6c7190ca637464e","bugs":{"url":"https://github.com/awslabs/fhir-works-on-aws-authz-rbac/issues"},"_id":"@aws/fhir-works-on-aws-authz-rbac@5.0.0","_integrity":"sha512-1O/lI7GoJ51VZz3xEVa9S2AB89gKBqOaXALZFo/Y07NLrtMsZoQPZ+PslbWHOlyHI7uTPAryqm7pjKAJToaXYw==","_resolved":"/tmp/8b190c9d232fde00b5a6b074812da3a6/aws-fhir-works-on-aws-authz-rbac-5.0.0.tgz","_from":"file:aws-fhir-works-on-aws-authz-rbac-5.0.0.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-1O/lI7GoJ51VZz3xEVa9S2AB89gKBqOaXALZFo/Y07NLrtMsZoQPZ+PslbWHOlyHI7uTPAryqm7pjKAJToaXYw==","shasum":"2ec2277d692c70ac2127e7ab1bcf15f41650109a","tarball":"https://registry.npmjs.org/@aws/fhir-works-on-aws-authz-rbac/-/fhir-works-on-aws-authz-rbac-5.0.0.tgz","fileCount":32,"unpackedSize":426680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICYpAXV+qS7CKdQ+vUkJMZGDo94YSZoMi8LyqA0oI9IjAiEA7tzN3WCLooJuYPaUANR2HO2/kNfNjQkjl4JjCFvbohM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKuh9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrG4Q/8DP7ZhDzbDTPBjXkETLsUr8C/sxRA8L34LQ++UJzJWoh1+o1+\r\nJfNKMiGfhY+kUC7ukBDKI9udE59w7wfpwkwx7LmFNTvdzuxPqcHas0kgEUZ9\r\nPbtUBOZQaKTWyal9oaloUKWDJEnUqvAhP4sCiMlhtwmvkG6g+wOrNXXihwCU\r\nNa/b8J+346pA733QjtOLRoxGAmHoaPbCct7TA85WUDBku1unSkKzUBXRGmI3\r\nrohcDxcK3BtOr3YEe6fIuYKCK4sUYQJd7dtpXhagee29mTqlFTdxFIck2A9F\r\n9gH/m1x4uJOF+qIO5mV1dC1JamorDEfCcQSzP7Gay7AiOhJaOz9yt98FX2Kk\r\nGs0trTdX/BXVihv6g83uGtuaVGiLAWVWjaGq7NKTT4tkx9Rjwi4Og6pog/Gu\r\nqnku3LqCm2QLbsJrXAQQlop76zlYhMmnotB66B9TPij4VGT2NX8O8DHDSCHI\r\nUoxS1CyAqH3BuITY78D83DtdH21puIlOyKqS772XHm2dPWT8HUY8OLvOKo9q\r\nZs/hE44pzgoP40vKjRKrqIGXZ2xX0deoEKynjRrCFXV4YIudLEdIokbHgKfD\r\nmLt8Pw9JZDDQxd3EVn7Yv2bOyl4ixKhknQpbKCz5YYq+599fIXsCdys/FmaC\r\n3zPwoRFglsXdexQrjc5kHwe38k0rurBtS5I=\r\n=b8WV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},"directories":{},"maintainers":[{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},{"name":"ma-foundation","email":"mafoundation-team@amazon.com"},{"name":"rsmayda","email":"smayda44@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fhir-works-on-aws-authz-rbac_5.0.0_1680533629515_0.7658125053340152"},"_hasShrinkwrap":false,"deprecated":"We are deprecating this npm package. Please use https://www.npmjs.com/package/fhir-works-on-aws-authz-rbac instead."},"6.0.0":{"name":"@aws/fhir-works-on-aws-authz-rbac","version":"6.0.0","description":"FHIR Works on AWS role base access control","homepage":"https://github.com/aws-solutions/fhir-works-on-aws","repository":{"type":"git","url":"git+https://github.com/aws-solutions/fhir-works-on-aws.git"},"license":"Apache-2.0","author":{"name":"Amazon Web Services","email":"fhir-works-on-aws-dev@amazon.com","url":"https://aws.amazon.com/"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{"@aws/fhir-works-on-aws-interface":"13.0.0","jsonwebtoken":"^9.0.0","lodash":"^4.17.21"},"devDependencies":{"@aws/eslint-config-fwoa-eslint-custom":"0.0.1","@rushstack/eslint-config":"^3.0.0","@rushstack/heft":"0.49.0","@rushstack/heft-jest-plugin":"0.4.2","@rushstack/heft-node-rig":"1.11.11","@types/heft-jest":"^1.0.3","@types/jest":"^26.0.19","@types/jsonwebtoken":"^8.5.4","@types/lodash":"^4.14.182","@types/node":"^14","@types/shuffle-array":"^1.0.0","eslint":"^8.7.0","jest":"^26.6.3","jest-mock-extended":"^1.0.8","npm-package-json-lint":"^6.3.0","npm-package-json-lint-config-default":"^5.0.0","prettier":"^2.4.1","shuffle-array":"^1.0.1","sort-package-json":"^1.57.0","standard-version":"^9.3.2","ts-jest":"^26.4.4","typescript":"^4.9.4"},"engines":{"node":">=18.0.0"},"scripts":{"build":"heft build --clean && rushx pkg-json-lint","build-test":"heft test --clean && rushx pkg-json-lint","clean":"rm -rf build/* node_modules/* dist/* .nyc_output/* lib/*","lint-fix":"eslint . --fix","local":"node .","pkg-json-lint":"npmPkgJsonLint -c ../../.npmpackagejsonlintrc.json .","sort-package-json":"sort-package-json package.json","standard-version":"standard-version --skip.tag=true","test":"heft test --clean --no-build && rushx pkg-json-lint","watch":"tsc -w"},"gitHead":"928dc2816b6d363c408886ea3f6ce02348f19ebc","bugs":{"url":"https://github.com/aws-solutions/fhir-works-on-aws/issues"},"_id":"@aws/fhir-works-on-aws-authz-rbac@6.0.0","_integrity":"sha512-5qpc3Rt4bbYM7OgTCXX5BbeD1kD49GBNixZCk9vTgRufo5GaJT9pGrh0IMsmn9AyZcgHMo1AdsPakvxTpRPSFQ==","_resolved":"/tmp/4f14977193e77a03791262581111273d/aws-fhir-works-on-aws-authz-rbac-6.0.0.tgz","_from":"file:aws-fhir-works-on-aws-authz-rbac-6.0.0.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-5qpc3Rt4bbYM7OgTCXX5BbeD1kD49GBNixZCk9vTgRufo5GaJT9pGrh0IMsmn9AyZcgHMo1AdsPakvxTpRPSFQ==","shasum":"8eea100c79444c71766333369e440a94f2f0f185","tarball":"https://registry.npmjs.org/@aws/fhir-works-on-aws-authz-rbac/-/fhir-works-on-aws-authz-rbac-6.0.0.tgz","fileCount":32,"unpackedSize":427579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBKFSTh5nqbtj7qZNS8p9FW1Z1cosIjd2rQKPPRwU6/wIgQArmCa4SrGqZig8t8G2Sk45hdDMhbZtxbYDYFRsfPrU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkK0N6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVyQ//VbdulLhLmtpZ0cnvIbyQnayC5QlsjwedKy8xLYhuU+Og5gXc\r\nxYQ5yl82gSO9N9ncWgwcbXmfKkT8TIuISewqT34w8iHxfrwOzW0kKo14Ex7a\r\ne7oew8rARzBCotPnPtjCpe6m45tcMlkZGGozLinRr3xRS6BfYsbkp2VhnqNC\r\nhx9PNgBTD9HHrrMZJYWN0Kf/OuVTfAyitdmbYD22z5x5/eA3w8opywQcUWDf\r\ntdTd48Yf4Hva1znSlNdA2iQzYha9ye3GwvtxuXBxtctICI5MX1DXvXAh1pcp\r\nfGueADOS1hkwGvgR9KPUdIH/aw/X1cCBqjjTZS429yXXEDobSvmq/Y00tvoo\r\nbca5Tt7T/12KubIwVteNP0L7+9vSy9/rFLQd2kvKqQq0eKXGI3lOdZOpxqfI\r\nGi62KNnBoJW2V/mbDQmZxgHxfLSBBGqzj3VEsJNN+kmKiNmCW4jG1oYURJYV\r\nB3HioA7s9Big6kybKPkiXLNaQGEPROSKUJIeVbC/00qrVl6HAozVc7Zp9agM\r\nlr4w2Pt7XOJWohe7NYqyrYVhjCbh3D+94gO4a0zT470/tSQOKYev2WBhMryZ\r\nbua5tmtczmxH0SwjgzGCtDs1mvkn9WVgwGqVhrA+vSGnD9Fbml0HkJoaYxTH\r\ndwCvTL6YTRaka2UDMMV1Y4seFMd+4j2mjQE=\r\n=mkBP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},"directories":{},"maintainers":[{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},{"name":"ma-foundation","email":"mafoundation-team@amazon.com"},{"name":"rsmayda","email":"smayda44@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fhir-works-on-aws-authz-rbac_6.0.0_1680556922619_0.8184017956491978"},"_hasShrinkwrap":false,"deprecated":"We are deprecating this npm package. Please use https://www.npmjs.com/package/fhir-works-on-aws-authz-rbac instead."},"6.0.1":{"name":"@aws/fhir-works-on-aws-authz-rbac","version":"6.0.1","description":"FHIR Works on AWS role base access control","homepage":"https://github.com/aws-solutions/fhir-works-on-aws","repository":{"type":"git","url":"git+https://github.com/aws-solutions/fhir-works-on-aws.git"},"license":"Apache-2.0","author":{"name":"Amazon Web Services","email":"fhir-works-on-aws-dev@amazon.com","url":"https://aws.amazon.com/solutions"},"main":"lib/index.js","types":"lib/index.d.ts","dependencies":{"@aws/fhir-works-on-aws-interface":"13.0.1","jsonwebtoken":"^9.0.0","lodash":"^4.17.21"},"devDependencies":{"@aws/eslint-config-fwoa-eslint-custom":"0.0.1","@rushstack/eslint-config":"^3.0.0","@rushstack/heft":"0.49.0","@rushstack/heft-jest-plugin":"0.4.2","@rushstack/heft-node-rig":"1.11.11","@types/heft-jest":"^1.0.3","@types/jest":"^26.0.19","@types/jsonwebtoken":"^8.5.4","@types/lodash":"^4.14.182","@types/node":"^14","@types/shuffle-array":"^1.0.0","eslint":"^8.7.0","jest":"^26.6.3","jest-mock-extended":"^1.0.8","npm-package-json-lint":"^6.3.0","npm-package-json-lint-config-default":"^5.0.0","prettier":"^2.4.1","shuffle-array":"^1.0.1","sort-package-json":"^1.57.0","standard-version":"^9.3.2","ts-jest":"^26.4.4","typescript":"^4.9.4"},"engines":{"node":">=18.0.0"},"scripts":{"build":"heft build --clean && rushx pkg-json-lint","build-test":"heft test --clean && rushx pkg-json-lint","clean":"rm -rf build/* node_modules/* dist/* .nyc_output/* lib/*","lint-fix":"eslint . --fix","local":"node .","pkg-json-lint":"npmPkgJsonLint -c ../../.npmpackagejsonlintrc.json .","sort-package-json":"sort-package-json package.json","standard-version":"standard-version --skip.tag=true","test":"heft test --clean --no-build && rushx pkg-json-lint","watch":"tsc -w"},"gitHead":"f5e7d90e843cc86f99e47acee2c8ec872c9b3a65","bugs":{"url":"https://github.com/aws-solutions/fhir-works-on-aws/issues"},"_id":"@aws/fhir-works-on-aws-authz-rbac@6.0.1","_integrity":"sha512-7FAK8mJGy5VjpKSwA/9dAwsqcmzeZ4uWasRjK8OcJI+qWEjq9cWeovUZ0a49JRiDxOn3nOG9yLjkcPxKdzxsFA==","_resolved":"/tmp/8f793eb7588629f2028e28ab2819a2ab/aws-fhir-works-on-aws-authz-rbac-6.0.1.tgz","_from":"file:aws-fhir-works-on-aws-authz-rbac-6.0.1.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-7FAK8mJGy5VjpKSwA/9dAwsqcmzeZ4uWasRjK8OcJI+qWEjq9cWeovUZ0a49JRiDxOn3nOG9yLjkcPxKdzxsFA==","shasum":"5e3a053e2812482aa95d947dc418c2221613f1bb","tarball":"https://registry.npmjs.org/@aws/fhir-works-on-aws-authz-rbac/-/fhir-works-on-aws-authz-rbac-6.0.1.tgz","fileCount":32,"unpackedSize":432126,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7NZ6lC/Yew9bKNZqcMkcBCG/lHWNVqJMeGOifnbEkygIhALzTG6EoX1JG+y/xKrkRdj41srM5J3vlQPhxzkAKfNRc"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOBMSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTKQ//adEHxlU9PeMtVnzBxylVTJxoEhUgQ9StdaPuc7BKimENEf9D\r\nzhOmOJyYjIg+K5/st9YHb0nRfNHzfvZGXLCYSCA4YZDK9FKKNQwQsmLKdsLq\r\nlhLu8XZr8+UExj7Lvlz0AHag5phpGLnJ+VdbydoTUlcTlJO3j5OmWHriPPO1\r\nrHiLB3flbUKEzqjG/ZfsNKTm1gbUHh+/03WYUZt+hZDRN0QMed+5LZRyC/EN\r\nxPdw9K1FKZknoGL4DQklWfLdaeI5Kb/rD2Z32QzYaezKM715m2Wo0dd8D1eV\r\nVA0clL4qDAjBi8qqAN6nFjjQQldAPYM9RbJaRiJrMK0++4ZkjUAQgJsqgJ6Y\r\n67xzrUekwCBsKEyTv3TRxMjfQ1zio2WjNUa98ZwoPbvnCXFmb/yv+tVaOlVj\r\nb1/MUF+lOnsc4CIBFzr9eLl+qPNC6icCFFlYwSWtiTiNn4PseoyJxEk48VJv\r\nHsxgUwCRXbPE7CcdRVfdhCh3EyyGpC8rdv3iErlgnaQCqaS1S2K2rVtmESJw\r\nspy9UgYu8GVuXRlIe3EcmVVGoAhHZcDIs/rMjfsTnTO9n0eOyRn9uUvf4p7u\r\nsWjdu1SSIJwzMW9wmggTM8yheaWwaZE8te3QZy77Ig7/SzfkhrIBd3CTsQzX\r\n62BsNm2Ug0U/PGkwwAWLheELag0Qoo80LQM=\r\n=DFbJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},"directories":{},"maintainers":[{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"},{"name":"ma-foundation","email":"mafoundation-team@amazon.com"},{"name":"rsmayda","email":"smayda44@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fhir-works-on-aws-authz-rbac_6.0.1_1681396498647_0.36432997912811094"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2023-04-03T14:53:49.460Z","5.0.0":"2023-04-03T14:53:49.746Z","modified":"2024-01-31T16:10:33.112Z","6.0.0":"2023-04-03T21:22:02.809Z","6.0.1":"2023-04-13T14:34:58.934Z"},"maintainers":[{"name":"ma-foundation","email":"mafoundation-team@amazon.com"},{"name":"rsmayda","email":"smayda44@gmail.com"},{"name":"wwps-psh-dev","email":"wwps-psh-dev@amazon.com"}],"description":"FHIR Works on AWS role base access control","homepage":"https://github.com/aws-solutions/fhir-works-on-aws","repository":{"type":"git","url":"git+https://github.com/aws-solutions/fhir-works-on-aws.git"},"author":{"name":"Amazon Web Services","email":"fhir-works-on-aws-dev@amazon.com","url":"https://aws.amazon.com/solutions"},"bugs":{"url":"https://github.com/aws-solutions/fhir-works-on-aws/issues"},"license":"Apache-2.0","readme":"# fhir-works-on-aws-authz-rbac\n\n## Purpose\n\nPlease visit [fhir-works-on-aws-deployment](https://github.com/awslabs/fhir-works-on-aws-deployment) for overall vision of the project and for more context.\n\nThis package is an implementation of the authorization interface from the [FHIR Works interface](https://github.com/awslabs/fhir-works-on-aws-interface). It uses role based access control (RBAC) to limit access to certain resource types and what operations one can do on those resource types. Cognito User Groups are used to determine which roles the user has. The User Group information is passed along in the OAuth access token when a user makes a request to the FHIR API. This means that the user must correctly obtained an access token from Cognito by using scopes of either:\n\n- `openid profile` Must have both\n- `aws.cognito.signin.user.admin`\n\nTo use and deploy this component (with the other 'out of the box' components) please follow the overall [README](https://github.com/awslabs/fhir-works-on-aws-deployment)\n\n## Infrastructure\n\nThis package assumes certain infrastructure:\n\n- Cognito - is our idP\n  - Users - created and managed inside of Cognito\n  - User Groups - Used to determine which role the users have\n  - OAuth - Used to provide an access token to the user. To understand the flow more see this [link](https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/)\n\n## Usage\n\nFor usage please add this package to your `package.json` file and install as a dependency. For usage examples please see the deployment component's [package.json](https://github.com/awslabs/fhir-works-on-aws-deployment/blob/mainline/package.json)\n\n### Authorization rules\n\nThe rules are defined very simply and are in this format:\n\n```txt\n{\n  <name-of-role>: {\n    operations: [<array-of-operations-that-can-be-performed>],\n    resources: [<array-of-resource-types>]\n  }\n}\n```\n\nFor a working example please see [RBACRules.ts](https://github.com/awslabs/fhir-works-on-aws-deployment/blob/mainline/src/RBACRules.ts) in the deployment package\n\n## Dependency tree\n\nThis package is dependent on:\n\n- [interface component](https://github.com/awslabs/fhir-works-on-aws-interface)\n  - This package defines the interface we are trying to use\n- [deployment component](https://github.com/awslabs/fhir-works-on-aws-deployment)\n  - This package deploys this and all the default components\n\n## Known issues\n\nFor known issues please track the issues on the GitHub repository\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n","readmeFilename":"README.md"}