Problem/Motivation

API tokens and the secure slug are stored in the myrest.auth_settings configuration object, which means they end up in configuration exports and in version control. Secrets should never be part of exported configuration.

Proposed resolution

  • Add optional integration with the key module so tokens can be referenced instead of stored.
  • Fall back to the State API when key is not installed.
  • Mark the sensitive schema keys appropriately and never render stored token values in the settings form.

Remaining tasks

Implement the key/state backends and migrate existing configuration.

User interface changes

Token fields can point to a key entity; stored values are masked.

API changes

Token resolution goes through a pluggable backend.

Issue fork myrest-3615495

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 44c50e5f on 1.0.x
    Issue #3615495: Support the Key module for API token storage
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)