# Feature OP-20363 - Have a proper UX/UI for handling the different kinds of secret inputs in Admin Settings

Project: OpenProject
Status: new
URL: https://community.openproject.org/work_packages/OP-20363

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Administration |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** an administrator in OpenProject  
**I want to** have a proper user experience, when handling settings that are marked as secret  
**so that** I can manage my installation properly

We have certain fields in the admin area that hold passwords or credentials for external systems (i.e. API keys, webhook secrets, passwords for mail server, etc). For those fields we recently added the `secret: true` flag and those render the fields in the user interface as password inputs, so that i.e. when the value is set via `ENV` vars, we are not leaking it to all instance admins. For this purpose we have defined a "magic string" that we render in the password field and if we send this back to the backend, we check for that exact value, and if this comes back, we leave the existing value in place. This "leaks" to the Admin that a value is even set. We have to consider if we think this is a problem or not. One likely approach is that we have a checkbox that an admin has to actively click to indicate they want to change the value, and only then the text field is shown, without the current value in it.

There is also the case, where a secret (like an API key) is generated on the OpenProject side and we need to at least display it once to the admin in plain text. Such an example would be `sys_api_key` for repositories. This is currently not marked as `secret: true` to allow reading the value. For those fields it might make sense to have a regenerate button, and then the value is displayed once in a modal and afterwards it is not shown, or at least not fully. Other sites show a few characters so one can identify if they have the correct key.

The purpose for this ticket is to have a proper UX/UI evaluation of how we want to model the secret handling processes in the admin UI.

**Acceptance criteria**

  - There is a proper design and implementation for the case "OpenProject needs to hold a secret that is generated by someone else, that should be entered, cleared, but never shown"

  - There is a proper design and implementation for the case "OpenProject generates a secret that needs to be given to another application, that should be regenerateable and shown once"

**Technical notes**

  - In <mention class="mention" data-id="80841" data-type="work_package" data-text="##SC-285" data-display-id="SC-285">\#\#SC-285</mention>we have added a flag to mark settings as `secret: true` so that we can have a special handling

**Permissions and visibility considerations**

  - *To whom is this feature visible?*

  - *When is it not visible?*

**Translation considerations**

  - *Key terms and phrases in the key languages*

**Out of scope**

  - 
    <br>

*Set the* **To be informed/consulted teams** *field to include all teams necessary to be informed of the changes.*
