Input plugin should not be hardcoded in the key type annotation

Created on 5 June 2023, almost 2 years ago

Problem/Motivation

In Upload the file Needs review , I tried to allow the user to upload the file containing the key. I was thinking that file upload is also an input thing, and, if you reflect a little, it really is an input. It's a way to input the key when the key provider is a file. Then I discovered that I cannot use any of the existing type plugins with my new file upload input plugin because the type plugins are hardcoding the input plugin to be used in their annotation.

Then I said, "well, I'll create my own type plugin to point to the new file upload input plugin". Hm, I realized that a file provider plugin should work with all types: encryption, authentication, authentication-multi, user-pass. Do I need to duplicate all? Ugly.

Another approach could have been to transform the key_value.plugin annotation from type plugins into a multi-value definition entry. Meaning that, for instance, the user_password could have the textarea_field and the new file upload as plugins. But, again, this would limit 3rd-party modules to add new input plugins and use the existing type plugins.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024