Skip to content

Store Web API key in database -> Switch to basic auth #1540

@goekay

Description

@goekay

Checklist

  • I checked other issues already and found no answer
  • I checked the documentation and found no answer
  • I am running the latest version and the feature i am requesting is not implemented there

Describe the problem you are trying to solve

currently, we are storing web api key in properties file. this is problematic for multiple reasons:

  • it is not dynamic/flexible/easy-to-change since hardcoded as property
  • it is a singleton value valid for all steve API access. it is the same for all types API users. a user A and another user B should not share the key
  • we should be able to revoke/change individual API keys on a per-use basis

Describe the solution you'd like

since we are moving into database for multi-users and rbac (see #991, #1165 and #1539), i am thinking about adding another column api_token to web_user. this way, each user will have the possibility to access web UI and API. with this approach, we will start associating tokens with web users.

Describe alternative solutions or features you've considered

  • add two new columns (header key and value) to settings table in order o preserve current behaviour
  • add a parallel web_token (or similar) table to have a separate modeling/process/flow to deal with tokens.

Additional context

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions