Skip to content

New authorization scheme for project creation endpoint #171

Closed
@vikasrohit

Description

@vikasrohit

To support a new use case, where we need to create projects for inactive users, we need to implement a new auth scheme in project service and use that only for project creation endpoint to allow the creation of projects by inactive users as well.

Details:

  1. We will look for Authorization header
  2. Technically it would still be using Bearer auth scheme but its value would not be a jwt token this time, rather it would be a simple string with following pattern like userId_<userId> i.e. useId_ as prefix to the actual userId.
  3. if we find the bearer token starting with userId_, we should not use the jwt auth middle ware from tc-core-library-js to validate the token and rather use custom logic.
  4. if the passed userId is inactive (we can query that using admin access to the identity api), we should authorize the user and if userId is active, we need to throw 403 with appropriate message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions