[PR #3216] [CLOSED] feat: Add secrets flag to hide secrets in frontend and cli logs #4288

Closed
opened 2026-03-17 01:50:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3216
Author: @DanielMaurer02
Created: 7/27/2023
Status: Closed

Base: release/2023.8.2Head: feat/secret-masking


📝 Commits (10+)

  • 7d61e69 feat: added toggle Button to Frontend
  • 088f1d6 feat: missing files from last commit
  • e0eb8af feat: added masking of secrets in cli in url
  • f530fc2 fix: inputfield to readonly + asterisk if secret
  • b9a1cc2 fix: fixed bug in gui with masked secrets
  • f33fa6a fix: adjusted tests to work with the secret flag
  • 882aafd refactor: update secret toggle icon
  • 9581f1d refactor: asterik length same as real text length
  • 0875d6f refactor: add mask/unmask button for env value
  • 6f397aa chore: hide env value in selector

📊 Changes

34 files changed (+409 additions, -114 deletions)

View changed files

📝 packages/hoppscotch-cli/src/commands/test.ts (+3 -2)
📝 packages/hoppscotch-cli/src/handlers/error.ts (+3 -0)
📝 packages/hoppscotch-cli/src/index.ts (+1 -0)
📝 packages/hoppscotch-cli/src/interfaces/request.ts (+1 -0)
📝 packages/hoppscotch-cli/src/options/test/env.ts (+31 -8)
📝 packages/hoppscotch-cli/src/types/commands.ts (+1 -0)
📝 packages/hoppscotch-cli/src/types/errors.ts (+1 -0)
📝 packages/hoppscotch-cli/src/types/request.ts (+1 -1)
📝 packages/hoppscotch-cli/src/utils/display.ts (+6 -5)
📝 packages/hoppscotch-cli/src/utils/pre-request.ts (+38 -11)
📝 packages/hoppscotch-cli/src/utils/request.ts (+3 -2)
📝 packages/hoppscotch-common/locales/de.json (+3 -2)
📝 packages/hoppscotch-common/locales/en.json (+3 -0)
📝 packages/hoppscotch-common/src/components.d.ts (+0 -4)
📝 packages/hoppscotch-common/src/components/environments/Selector.vue (+9 -1)
📝 packages/hoppscotch-common/src/components/environments/my/Details.vue (+45 -1)
📝 packages/hoppscotch-common/src/components/environments/teams/Details.vue (+48 -3)
📝 packages/hoppscotch-common/src/components/http/TestResult.vue (+1 -0)
📝 packages/hoppscotch-common/src/components/http/TestResultEnv.vue (+1 -0)
📝 packages/hoppscotch-common/src/components/smart/EnvInput.vue (+90 -17)

...and 14 more files

📄 Description

Closes #3195

Description

Secrets can now be marked with an icon next to the designated environment
hopp
If an environment is marked as a secret, it is replaced with asterisk's (******) everywhere in the frontend.
Furthermore environments with the secret flag are masked in the url in the CLI.
This pull request also changes the format of inputed environment files for the CLI to the format already used by the frontend (including the secret flag). To use this new format a new option "-envName" was added to the cli so that it is possible to choose a specific environment

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

Breaking Changes: -new format for CLI environments


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3216 **Author:** [@DanielMaurer02](https://github.com/DanielMaurer02) **Created:** 7/27/2023 **Status:** ❌ Closed **Base:** `release/2023.8.2` ← **Head:** `feat/secret-masking` --- ### 📝 Commits (10+) - [`7d61e69`](https://github.com/hoppscotch/hoppscotch/commit/7d61e69b3dd7d1da1552c324c0fb04d8f11d3d89) feat: added toggle Button to Frontend - [`088f1d6`](https://github.com/hoppscotch/hoppscotch/commit/088f1d6b478112ce4f44bf1be7e76e573da9d2bd) feat: missing files from last commit - [`e0eb8af`](https://github.com/hoppscotch/hoppscotch/commit/e0eb8af6f59dcaf3b06348eb7aa3aec8c9fe107b) feat: added masking of secrets in cli in url - [`f530fc2`](https://github.com/hoppscotch/hoppscotch/commit/f530fc28531c8111d2fa2b357d65b96c7e6cd1d9) fix: inputfield to readonly + asterisk if secret - [`b9a1cc2`](https://github.com/hoppscotch/hoppscotch/commit/b9a1cc21f18c86518743368c07bfc3cd16785c10) fix: fixed bug in gui with masked secrets - [`f33fa6a`](https://github.com/hoppscotch/hoppscotch/commit/f33fa6ac1a07e3447ac71ba115fd30865de59006) fix: adjusted tests to work with the secret flag - [`882aafd`](https://github.com/hoppscotch/hoppscotch/commit/882aafdb43265314dfe1b890aa9aedc6a76e22d0) refactor: update secret toggle icon - [`9581f1d`](https://github.com/hoppscotch/hoppscotch/commit/9581f1d7473b0d7c2a3789892f9e37341e48aa0c) refactor: asterik length same as real text length - [`0875d6f`](https://github.com/hoppscotch/hoppscotch/commit/0875d6f75a37a3ae0a8fbbbed92eddd4e0cd28da) refactor: add mask/unmask button for env value - [`6f397aa`](https://github.com/hoppscotch/hoppscotch/commit/6f397aa24eda96695bf515db4536b70dc2908275) chore: hide env value in selector ### 📊 Changes **34 files changed** (+409 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-cli/src/commands/test.ts` (+3 -2) 📝 `packages/hoppscotch-cli/src/handlers/error.ts` (+3 -0) 📝 `packages/hoppscotch-cli/src/index.ts` (+1 -0) 📝 `packages/hoppscotch-cli/src/interfaces/request.ts` (+1 -0) 📝 `packages/hoppscotch-cli/src/options/test/env.ts` (+31 -8) 📝 `packages/hoppscotch-cli/src/types/commands.ts` (+1 -0) 📝 `packages/hoppscotch-cli/src/types/errors.ts` (+1 -0) 📝 `packages/hoppscotch-cli/src/types/request.ts` (+1 -1) 📝 `packages/hoppscotch-cli/src/utils/display.ts` (+6 -5) 📝 `packages/hoppscotch-cli/src/utils/pre-request.ts` (+38 -11) 📝 `packages/hoppscotch-cli/src/utils/request.ts` (+3 -2) 📝 `packages/hoppscotch-common/locales/de.json` (+3 -2) 📝 `packages/hoppscotch-common/locales/en.json` (+3 -0) 📝 `packages/hoppscotch-common/src/components.d.ts` (+0 -4) 📝 `packages/hoppscotch-common/src/components/environments/Selector.vue` (+9 -1) 📝 `packages/hoppscotch-common/src/components/environments/my/Details.vue` (+45 -1) 📝 `packages/hoppscotch-common/src/components/environments/teams/Details.vue` (+48 -3) 📝 `packages/hoppscotch-common/src/components/http/TestResult.vue` (+1 -0) 📝 `packages/hoppscotch-common/src/components/http/TestResultEnv.vue` (+1 -0) 📝 `packages/hoppscotch-common/src/components/smart/EnvInput.vue` (+90 -17) _...and 14 more files_ </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #3195 ### Description Secrets can now be marked with an icon next to the designated environment <img width="397" alt="hopp" src="https://github.com/hoppscotch/hoppscotch/assets/54203817/620a461c-8ac9-43ef-b86e-14cdec86e92f"> If an environment is marked as a secret, it is replaced with asterisk's (******) everywhere in the frontend. Furthermore environments with the secret flag are masked in the url in the CLI. This pull request also changes the format of inputed environment files for the CLI to the format already used by the frontend (including the secret flag). To use this new format a new option "-envName" was added to the cli so that it is possible to choose a specific environment <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [x] secrets masked in frontend - [x] secrets masked in CLI --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information Breaking Changes: -new format for CLI environments <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:50:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4288
No description provided.