diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
new file mode 100644
index 0000000..dae4ae2
--- /dev/null
+++ b/.github/workflows/main.yaml
@@ -0,0 +1,27 @@
+name: CI
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+# This workflow contains a single job called "npm_test"
+jobs:
+ npm_test:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '18.x'
+
+ - name: Install Dependencies 📌
+ run: npm ci
+
+ - name: Run Test Cases 🔧
+ run: npm run test
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index c5c333b..94b3272 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -22,7 +22,7 @@ jobs:
run: |
git config --global user.name $CONFIG_USERNAME
git config --global user.email $CONFIG_EMAIL
- git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/sourcefuse/loopback4-microservice-catalog
+ git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/sourcefuse/loopback4-authorization
env:
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
@@ -48,3 +48,5 @@ jobs:
env:
GH_TOKEN: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ - name: Changelog 📝
+ run: cd src/release_notes && HUSKY=0 node release-notes.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 13be4be..e1b3f18 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,33 @@
+## Release [v7.0.1](https://github.com/sourcefuse/loopback4-authorization/compare/v7.0.0..v7.0.1) May 15, 2024
+Welcome to the May 15, 2024 release of loopback4-authorization. There are many updates in this version that we hope you will like, the key highlights include:
+
+ - [Changelog not generated](https://github.com/sourcefuse/loopback4-authorization/issues/128) :- [fix(ci-cd): step to generate changelog ](https://github.com/sourcefuse/loopback4-authorization/commit/341f8154ed9fdb306cba02e8f392c91963012cd6) was commited on May 15, 2024 by [yeshamavani](mailto:83634146+yeshamavani@users.noreply.github.com)
+
+ - add the missing ci checks on pr
+
+ - GH-128
+
+
+ - [Copy the Readme to root as well](https://github.com/sourcefuse/loopback4-authorization/issues/126) :- [docs(chore): copy the Readme to root as well ](https://github.com/sourcefuse/loopback4-authorization/commit/0fc85a206dfb4a3e6a9c48148165a60d90f31fe5) was commited on May 13, 2024 by [arpit1503khanna](mailto:108673359+arpit1503khanna@users.noreply.github.com)
+
+ - copy the Readme to root as well
+
+ - GH-126
+
+
+ - [](https://github.com/sourcefuse/loopback4-authorization/issues/) :- [](https://github.com/sourcefuse/loopback4-authorization/commit/964d5c67422b68ed1f98054cab1f1b2b0ee63265) was commited on March 13, 2024 by [yeshamavani](mailto:83634146+yeshamavani@users.noreply.github.com)
+
+
+ - [](https://github.com/sourcefuse/loopback4-authorization/issues/00) :- [chore(ci-cd): update the readme path in sync docs workflow ](https://github.com/sourcefuse/loopback4-authorization/commit/d1008920f8cd1cb3ad58964ee00536d57f09b55a) was commited on March 13, 2024 by [yeshamavani](mailto:83634146+yeshamavani@users.noreply.github.com)
+
+ - readme moved to docs folder
+
+ - GH-00
+
+
+Clink on the above links to understand the changes in detail.
+ ___
+
## Release [v6.1.0](https://github.com/sourcefuse/loopback4-authorization/compare/v6.0.0..v6.1.0) July 14, 2023
Welcome to the July 14, 2023 release of loopback4-authorization. There are many updates in this version that we hope you will like, the key highlights include:
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..aef2663
--- /dev/null
+++ b/README.md
@@ -0,0 +1,636 @@
+
+
+# [loopback4-authorization](https://github.com/sourcefuse/loopback4-authorization)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Overview
+
+A LoopBack 4 extension for Authorization Capabilities. It's very simple to integration yet powerful and effective.
+
+## Install
+
+```sh
+npm install loopback4-authorization
+```
+
+## Quick Starter
+
+For a quick starter guide, you can refer to our [loopback 4 starter](https://github.com/sourcefuse/loopback4-starter) application which utilizes method #3 from the above in a simple multi-tenant application.
+
+## Usage
+
+### Ways of Integration:
+
+On a higher level, it provides three ways of integration:
+
+#### 1. User Level Permissions Only
+
+Where permissions are associated directly to user. In this case, each user entry in DB contains specific array of permission keys.
+
+#### 2. Role Based Permissions
+
+Where permissions are associated to roles and users have a specific role attached. This actually reduces redundancy in DB a lot, as most of the time, users will have many common permissions. If that is not the case for you, then, use the first method.
+
+#### 3. Role Based Permissions with User Level Flexibility
+
+This is the most flexible architecture. In this case, method #2 is implemented as is.
+
+On top of it, we also add user-level permissions override, allow/deny permissions over role permissions. So, say there is user who can perform all admin role actions except he cannot remove users from the system. So, DeleteUser permission can be denied at user level and role can be set as Admin for the user.
+
+[Extension enhancement using CASBIN authorisation](#Extension-enhancement-using-CASBIN-authorisation)
+
+Refer to the usage section below for details on integration.
+
+In order to use this component into your LoopBack application, please follow below steps.
+
+### Steps
+
+#### Bind Component
+
+Add `AuthorizationComponent` to your application, Like below:
+
+```ts
+this.bind(AuthorizationBindings.CONFIG).to({
+ allowAlwaysPaths: ['/explorer'],
+});
+this.component(AuthorizationComponent);
+```
+
+#### Implement Permission Interface
+
+If using method #1 from above, implement Permissions interface in User model and add permissions array.
+
+```ts
+@model({
+ name: 'users',
+})
+export class User extends Entity implements Permissions {
+ // .....
+ // other attributes here
+ // .....
+
+ @property({
+ type: 'array',
+ itemType: 'string',
+ })
+ permissions: string[];
+
+ constructor(data?: Partial) {
+ super(data);
+ }
+}
+```
+
+If using method #2 or #3 from above, implement Permissions interface in Role model and add permissions array.
+
+```ts
+@model({
+ name: 'roles',
+})
+export class Role extends Entity implements Permissions {
+ // .....
+ // other attributes here
+ // .....
+
+ @property({
+ type: 'array',
+ itemType: 'string',
+ })
+ permissions: string[];
+
+ constructor(data?: Partial) {
+ super(data);
+ }
+}
+```
+
+#### Implement `UserPermissionsOverride` Interface
+
+If using method #3 from above, implement UserPermissionsOverride interface in User model and add user level permissions array as below.
+Do this if there is a use-case of explicit allow/deny of permissions at user-level in the application.
+You can skip otherwise.
+
+```ts
+@model({
+ name: 'users',
+})
+export class User extends Entity implements UserPermissionsOverride {
+ // .....
+ // other attributes here
+ // .....
+
+ @property({
+ type: 'array',
+ itemType: 'object',
+ })
+ permissions: UserPermission[];
+
+ constructor(data?: Partial) {
+ super(data);
+ }
+}
+```
+
+#### User Permissions Provider
+
+For method #3, This extension exposes a provider function [AuthorizationBindings.USER_PERMISSIONS](https://github.com/sourcefuse/loopback4-authorization/blob/master/src/providers/user-permissions.provider.ts) to evaluate the user permissions based on its role permissions and user-level overrides.
+
+Just inject it like below:
+
+```ts
+@inject(AuthorizationBindings.USER_PERMISSIONS)
+private readonly getUserPermissions: UserPermissionsFn,
+```
+
+and invoke it
+
+```ts
+const permissions = this.getUserPermissions(user.permissions, role.permissions);
+```
+
+Add a step in custom sequence to check for authorization whenever any endpoint is hit.
+
+```ts
+import {inject} from '@loopback/context';
+import {
+ FindRoute,
+ HttpErrors,
+ InvokeMethod,
+ ParseParams,
+ Reject,
+ RequestContext,
+ RestBindings,
+ Send,
+ SequenceHandler,
+} from '@loopback/rest';
+import {AuthenticateFn, AuthenticationBindings} from 'loopback4-authentication';
+import {
+ AuthorizationBindings,
+ AuthorizeErrorKeys,
+ AuthorizeFn,
+ UserPermissionsFn,
+} from 'loopback4-authorization';
+
+import {AuthClient} from './models/auth-client.model';
+import {User} from './models/user.model';
+
+const SequenceActions = RestBindings.SequenceActions;
+
+export class MySequence implements SequenceHandler {
+ constructor(
+ @inject(SequenceActions.FIND_ROUTE) protected findRoute: FindRoute,
+ @inject(SequenceActions.PARSE_PARAMS) protected parseParams: ParseParams,
+ @inject(SequenceActions.INVOKE_METHOD) protected invoke: InvokeMethod,
+ @inject(SequenceActions.SEND) public send: Send,
+ @inject(SequenceActions.REJECT) public reject: Reject,
+ @inject(AuthenticationBindings.USER_AUTH_ACTION)
+ protected authenticateRequest: AuthenticateFn,
+ @inject(AuthenticationBindings.CLIENT_AUTH_ACTION)
+ protected authenticateRequestClient: AuthenticateFn,
+ @inject(AuthorizationBindings.AUTHORIZE_ACTION)
+ protected checkAuthorisation: AuthorizeFn,
+ @inject(AuthorizationBindings.USER_PERMISSIONS)
+ private readonly getUserPermissions: UserPermissionsFn,
+ ) {}
+
+ async handle(context: RequestContext) {
+ const requestTime = Date.now();
+ try {
+ const {request, response} = context;
+ const route = this.findRoute(request);
+ const args = await this.parseParams(request, route);
+ request.body = args[args.length - 1];
+ await this.authenticateRequestClient(request);
+ const authUser: User = await this.authenticateRequest(request);
+
+ // Do ths if you are using method #3
+ const permissions = this.getUserPermissions(
+ authUser.permissions,
+ authUser.role.permissions,
+ );
+ // This is the important line added for authorization. Needed for all 3 methods
+ const isAccessAllowed: boolean = await this.checkAuthorisation(
+ permissions, // do authUser.permissions if using method #1
+ request,
+ );
+ // Checking access to route here
+ if (!isAccessAllowed) {
+ throw new HttpErrors.Forbidden(AuthorizeErrorKeys.NotAllowedAccess);
+ }
+
+ const result = await this.invoke(route, args);
+ this.send(response, result);
+ } catch (err) {
+ this.reject(context, err);
+ }
+ }
+}
+```
+
+The above sequence also contains user authentication using [loopback4-authentication](https://github.com/sourcefuse/loopback4-authentication) package. You can refer to the documentation for the same for more details.
+
+Now we can add access permission keys to the controller methods using authorize decorator as below:
+
+```ts
+@authorize(['CreateRole'])
+@post(rolesPath, {
+ responses: {
+ [STATUS_CODE.OK]: {
+ description: 'Role model instance',
+ content: {
+ [CONTENT_TYPE.JSON]: {schema: {'x-ts-type': Role}},
+ },
+ },
+ },
+})
+async create(@requestBody() role: Role): Promise {
+ return await this.roleRepository.create(role);
+}
+```
+
+This endpoint will only be accessible if logged in user has permission
+`CreateRole`.
+
+A good practice is to keep all permission strings in a separate enum file like this.
+
+```ts
+export const enum PermissionKey {
+ ViewOwnUser = 'ViewOwnUser',
+ ViewAnyUser = 'ViewAnyUser',
+ ViewTenantUser = 'ViewTenantUser',
+ CreateAnyUser = 'CreateAnyUser',
+ CreateTenantUser = 'CreateTenantUser',
+ UpdateOwnUser = 'UpdateOwnUser',
+ UpdateTenantUser = 'UpdateTenantUser',
+ UpdateAnyUser = 'UpdateAnyUser',
+ DeleteTenantUser = 'DeleteTenantUser',
+ DeleteAnyUser = 'DeleteAnyUser',
+
+ ViewTenant = 'ViewTenant',
+ CreateTenant = 'CreateTenant',
+ UpdateTenant = 'UpdateTenant',
+ DeleteTenant = 'DeleteTenant',
+
+ ViewRole = 'ViewRole',
+ CreateRole = 'CreateRole',
+ UpdateRole = 'UpdateRole',
+ DeleteRole = 'DeleteRole',
+
+ ViewAudit = 'ViewAudit',
+ CreateAudit = 'CreateAudit',
+ UpdateAudit = 'UpdateAudit',
+ DeleteAudit = 'DeleteAudit',
+}
+```
+
+### Overriding Permissions
+
+API endpoints provided by ARC API (aka Sourceloop) services have their permissions pre-defined in them bundled.
+
+In order to override them you can bind your custom permissions in the `AuthorizationBindings.PERMISSION` binding key.
+This accepts an object that should have Controller class name as the root level key and the value of which is another object of method to permissions array mapping.
+
+Like below:
+
+```ts
+this.bind(AuthorizationBindings.PERMISSION).to({
+ MessageController: {
+ create: ['CreateMessage', 'ViewMessage'],
+ updateAll: ['UpdateMessage', 'ViewMessage', 'ViewMessageNum']
+ }
+ AttachmentFileController: {
+ create: ['CreateAttachmentFile', 'ViewAttachmentFile'],
+ updateAll: ['UpdateAttachmentFile', 'ViewAttachmentFileNum']
+ }
+});
+```
+
+You can easily check the name of the controller and it's method name from the source code of the services or from the Swagger UI (clicking the endpoint in swagger append the controller and method name in the URL like `LoginController.login` where `login` is the method name).
+
+## Serving the static files:
+
+Authorization configuration binding sets up paths that can be accessed without any authorization checks, allowing static files to be served directly from the root URL of the application.The allowAlwaysPaths property is used to define these paths for the files in public directory i.e for a test.html file in public directory ,one can provide its path as follows:
+
+```
+this.bind(AuthorizationBindings.CONFIG).to({
+ allowAlwaysPaths: ['/explorer','/test.html'],
+});
+```
+
+To set up the public directory as a static,one can add the following in application.ts file.
+
+```
+this.static('/', path.join(__dirname, '../public'));
+
+```
+
+If, in case the file is in some other folder then `app.static()` can be called multiple times to configure the app to serve static assets from different directories.
+
+```
+this.static('/', path.join(__dirname, '../public'));
+this.static('/downloads', path.join(__dirname, '../downloads'));
+
+```
+
+For more details,refer [here](https://loopback.io/doc/en/lb4/Serving-static-files.html#:~:text=One%20of%20the%20basic%20requirements,the%20API%20are%20explained%20below.)
+
+## Extension enhancement using CASBIN authorisation
+
+As a further enhancement to these methods, we are using [casbin library](https://casbin.org/docs/en/overview) to define permissions at level of entity or resource associated with an API call. Casbin authorisation implementation can be performed in two ways:
+
+1. **Using default casbin policy document** - Define policy document in default casbin format in the app, and configure authorise decorator to use those policies.
+2. **Defining custom logic to form dynamic policies** - Implement dynamic permissions based on app logic in casbin-enforcer-config provider. Authorisation extension will dynamically create casbin policy using this business logic to give the authorisation decisions.
+
+### Casbin Usage
+
+In order to use this enhacement into your LoopBack application, please follow below steps.
+
+- Add providers to implement casbin authorisation along with authorisation component.
+
+```ts
+this.bind(AuthorizationBindings.CONFIG).to({
+ allowAlwaysPaths: ['/explorer'],
+});
+this.component(AuthorizationComponent);
+
+this.bind(AuthorizationBindings.CASBIN_ENFORCER_CONFIG_GETTER).toProvider(
+ CasbinEnforcerConfigProvider,
+);
+
+this.bind(AuthorizationBindings.CASBIN_RESOURCE_MODIFIER_FN).toProvider(
+ CasbinResValModifierProvider,
+);
+```
+
+- Implement the **Casbin Resource value modifier provider**. Customise the resource value based on business logic using route arguments parameter in the provider.
+
+```ts
+import {Getter, inject, Provider} from '@loopback/context';
+import {HttpErrors} from '@loopback/rest';
+import {
+ AuthorizationBindings,
+ AuthorizationMetadata,
+ CasbinResourceModifierFn,
+} from 'loopback4-authorization';
+
+export class CasbinResValModifierProvider
+ implements Provider
+{
+ constructor(
+ @inject.getter(AuthorizationBindings.METADATA)
+ private readonly getCasbinMetadata: Getter,
+ @inject(AuthorizationBindings.PATHS_TO_ALLOW_ALWAYS)
+ private readonly allowAlwaysPath: string[],
+ ) {}
+
+ value(): CasbinResourceModifierFn {
+ return (pathParams: string[], req: Request) => this.action(pathParams, req);
+ }
+
+ async action(pathParams: string[], req: Request): Promise {
+ const metadata: AuthorizationMetadata = await this.getCasbinMetadata();
+
+ if (
+ !metadata &&
+ !!this.allowAlwaysPath.find(path => req.path.indexOf(path) === 0)
+ ) {
+ return '';
+ }
+
+ if (!metadata) {
+ throw new HttpErrors.InternalServerError(`Metadata object not found`);
+ }
+ const res = metadata.resource;
+
+ // Now modify the resource parameter using on path params, as per business logic.
+ // Returning resource value as such for default case.
+
+ return `${res}`;
+ }
+}
+```
+
+- Implement the **casbin enforcer config provider** . Provide the casbin model path. Model definition can be initialized from [.CONF file, from code, or from a string](https://casbin.org/docs/en/model-storage).
+ In the case of policy creation being handled by extension (isCasbinPolicy parameter is false), provide the array of Resource-Permission objects for a given user, based on business logic.
+ In other case, provide the policy from file or as CSV string or from [casbin Adapters](https://casbin.org/docs/en/adapters).
+ **NOTE**: In the second case, if model is initialized from .CONF file, then any of the above formats can be used for policy. But if model is being initialised from code or string, then policy should be provided as [casbin adapter](https://casbin.org/docs/en/adapters) only.
+
+```ts
+import {Provider} from '@loopback/context';
+import {
+ CasbinConfig,
+ CasbinEnforcerConfigGetterFn,
+ IAuthUserWithPermissions,
+} from 'loopback4-authorization';
+import * as path from 'path';
+
+export class CasbinEnforcerConfigProvider
+ implements Provider
+{
+ constructor() {}
+
+ value(): CasbinEnforcerConfigGetterFn {
+ return (
+ authUser: IAuthUserWithPermissions,
+ resource: string,
+ isCasbinPolicy?: boolean,
+ ) => this.action(authUser, resource, isCasbinPolicy);
+ }
+
+ async action(
+ authUser: IAuthUserWithPermissions,
+ resource: string,
+ isCasbinPolicy?: boolean,
+ ): Promise {
+ const model = path.resolve(__dirname, './../../fixtures/casbin/model.conf'); // Model initialization from file path
+ /**
+ * import * as casbin from 'casbin';
+ *
+ * To initialize model from code, use
+ * let m = new casbin.Model();
+ * m.addDef('r', 'r', 'sub, obj, act'); and so on...
+ *
+ * To initialize model from string, use
+ * const text = `
+ * [request_definition]
+ * r = sub, obj, act
+ *
+ * [policy_definition]
+ * p = sub, obj, act
+ *
+ * [policy_effect]
+ * e = some(where (p.eft == allow))
+ *
+ * [matchers]
+ * m = r.sub == p.sub && r.obj == p.obj && r.act == p.act
+ * `;
+ * const model = casbin.newModelFromString(text);
+ */
+
+ // Write business logic to find out the allowed resource-permission sets for this user. Below is a dummy value.
+ //const allowedRes = [{resource: 'session', permission: "CreateMeetingSession"}];
+
+ const policy = path.resolve(
+ __dirname,
+ './../../fixtures/casbin/policy.csv',
+ );
+
+ const result: CasbinConfig = {
+ model,
+ //allowedRes,
+ policy,
+ };
+ return result;
+ }
+}
+```
+
+- Add the dependency injections for resource value modifer provider, and casbin authorisation function in the sequence.ts
+
+```ts
+ @inject(AuthorizationBindings.CASBIN_AUTHORIZE_ACTION)
+ protected checkAuthorisation: CasbinAuthorizeFn,
+ @inject(AuthorizationBindings.CASBIN_RESOURCE_MODIFIER_FN)
+ protected casbinResModifierFn: CasbinResourceModifierFn,
+```
+
+- Add a step in custom sequence to check for authorization whenever any end
+ point is hit.
+
+```ts
+import {inject} from '@loopback/context';
+import {
+ FindRoute,
+ HttpErrors,
+ InvokeMethod,
+ ParseParams,
+ Reject,
+ RequestContext,
+ RestBindings,
+ Send,
+ SequenceHandler,
+} from '@loopback/rest';
+import {AuthenticateFn, AuthenticationBindings} from 'loopback4-authentication';
+import {
+ AuthorizationBindings,
+ AuthorizeErrorKeys,
+ AuthorizeFn,
+ UserPermissionsFn,
+} from 'loopback4-authorization';
+
+import {AuthClient} from './models/auth-client.model';
+import {User} from './models/user.model';
+
+const SequenceActions = RestBindings.SequenceActions;
+
+export class MySequence implements SequenceHandler {
+ constructor(
+ @inject(SequenceActions.FIND_ROUTE) protected findRoute: FindRoute,
+ @inject(SequenceActions.PARSE_PARAMS) protected parseParams: ParseParams,
+ @inject(SequenceActions.INVOKE_METHOD) protected invoke: InvokeMethod,
+ @inject(SequenceActions.SEND) public send: Send,
+ @inject(SequenceActions.REJECT) public reject: Reject,
+ @inject(AuthenticationBindings.USER_AUTH_ACTION)
+ protected authenticateRequest: AuthenticateFn,
+ @inject(AuthenticationBindings.CLIENT_AUTH_ACTION)
+ protected authenticateRequestClient: AuthenticateFn,
+ @inject(AuthorizationBindings.CASBIN_AUTHORIZE_ACTION)
+ protected checkAuthorisation: CasbinAuthorizeFn,
+ @inject(AuthorizationBindings.CASBIN_RESOURCE_MODIFIER_FN)
+ protected casbinResModifierFn: CasbinResourceModifierFn,
+ ) {}
+
+ async handle(context: RequestContext) {
+ const requestTime = Date.now();
+ try {
+ const {request, response} = context;
+ const route = this.findRoute(request);
+ const args = await this.parseParams(request, route);
+ request.body = args[args.length - 1];
+ await this.authenticateRequestClient(request);
+ const authUser: User = await this.authenticateRequest(request);
+
+ // Invoke Resource value modifier
+ const resVal = await this.casbinResModifierFn(args);
+
+ // Check authorisation
+ const isAccessAllowed: boolean = await this.checkAuthorisation(
+ authUser,
+ resVal,
+ request,
+ );
+ // Checking access to route here
+ if (!isAccessAllowed) {
+ throw new HttpErrors.Forbidden(AuthorizeErrorKeys.NotAllowedAccess);
+ }
+
+ const result = await this.invoke(route, args);
+ this.send(response, result);
+ } catch (err) {
+ this.reject(context, err);
+ }
+ }
+}
+```
+
+- Now we can add access permission keys to the controller methods using authorize
+ decorator as below. Set isCasbinPolicy parameter to use casbin default policy format. Default is false.
+
+```ts
+@authorize({permissions: ['CreateRole'], resource:'role', isCasbinPolicy: true})
+@post(rolesPath, {
+ responses: {
+ [STATUS_CODE.OK]: {
+ description: 'Role model instance',
+ content: {
+ [CONTENT_TYPE.JSON]: {schema: {'x-ts-type': Role}},
+ },
+ },
+ },
+})
+async create(@requestBody() role: Role): Promise {
+ return await this.roleRepository.create(role);
+}
+```
+
+## Feedback
+
+If you've noticed a bug or have a question or have a feature request, [search the issue tracker](https://github.com/sourcefuse/loopback4-authorization/issues) to see if someone else in the community has already created a ticket.
+If not, go ahead and [make one](https://github.com/sourcefuse/loopback4-authorization/issues/new/choose)!
+All feature requests are welcome. Implementation time may vary. Feel free to contribute the same, if you can.
+If you think this extension is useful, please [star](https://help.github.com/en/articles/about-stars) it. Appreciation really helps in keeping this project alive.
+
+## Contributing
+
+Please read [CONTRIBUTING.md](https://github.com/sourcefuse/loopback4-authorization/blob/master/.github/CONTRIBUTING.md) for details on the process for submitting pull requests to us.
+
+## Code of conduct
+
+Code of conduct guidelines [here](https://github.com/sourcefuse/loopback4-authorization/blob/master/.github/CODE_OF_CONDUCT.md).
+
+## License
+
+[MIT](https://github.com/sourcefuse/loopback4-authorization/blob/master/LICENSE)
diff --git a/package.json b/package.json
index a035c2c..d5f6bc2 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "loopback4-authorization",
- "version": "7.0.0",
- "description": "An authorization extension for loopback-next applications.",
+ "version": "7.0.1",
+ "description": "ARC authorization extension for loopback-next applications.",
"keywords": [
"loopback-extension",
"loopback",