You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "ysinghc (via GitHub)" <gi...@apache.org> on 2025/11/11 19:46:19 UTC
[PR] Fix/mask sensitive fields [apisix-dashboard]
ysinghc opened a new pull request, #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251
Based on your recent commits and the PR template, here's the completed pull request description:
---
**Why submit this pull request?**
- [x] Bugfix
- [x] New feature provided
- [ ] Improve performance
- [ ] Backport patches
**What changes will this PR take into?**
This PR enhances security by masking sensitive data fields in the APISIX Dashboard UI:
### Changes Made:
1. **New PasswordInput Component** (PasswordInput.tsx)
- Created a reusable form component for sensitive data fields
- Built on Mantine's PasswordInput with proper form validation integration
- Supports reveal/hide toggle for user convenience while maintaining security
2. **Updated Secret Management Forms** (FormPartSecret.tsx)
- Replaced TextInput with PasswordInput for sensitive fields:
- **Vault secrets**: `token` field
- **AWS secrets**: `access_key_id`, `secret_access_key`, `session_token` fields
- **GCP secrets**: `private_key` field
3. **Updated Settings Modal** (SettingsModal.tsx)
- Changed Admin Key input from TextInput to PasswordInput
- Prevents accidental exposure of admin credentials
4. **Updated E2E Tests**
- Modified test selectors in auth.spec.ts to work with PasswordInput component
- Updated test.ts authentication helper to use proper selectors
5. **Code Consistency** (i18n.ts)
- Reordered import statements alphabetically for better maintainability
### Security Benefits:
- Passwords, tokens, and keys are now masked by default
- Reduces risk of shoulder surfing and accidental exposure
- Maintains usability with toggle visibility option
- Consistent UX across all sensitive field inputs
**Related issues**
fixes #3218
**Checklist:**
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- **Problem**: Sensitive data (passwords, API keys, tokens) was displayed in plain text in form fields, creating a security risk
- **Solution**: Implemented masked password inputs with toggle visibility for all sensitive fields
- [x] Have you added corresponding test cases?
- Updated E2E tests in auth.spec.ts and test.ts to work with the new PasswordInput component
- [ ] Have you modified the corresponding document?
- No documentation changes required as this is a UI improvement that doesn't change the API or user workflows
- [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
- **Yes, fully backward compatible**. This change only affects the UI rendering of form inputs. All data handling, API interactions, and existing configurations remain unchanged.
---
**Note**: The E2E test results show the authentication tests are passing successfully with the new PasswordInput component, confirming the implementation works correctly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix/mask sensitive fields [apisix-dashboard]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on code in PR #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251#discussion_r2532398260
##########
src/config/i18n.ts:
##########
@@ -19,8 +19,8 @@ import { initReactI18next } from 'react-i18next';
import de_common from '@/locales/de/common.json';
import en_common from '@/locales/en/common.json';
-import zh_common from '@/locales/zh/common.json';
import es_common from '@/locales/es/common.json';
+import zh_common from '@/locales/zh/common.json';
Review Comment:
Why is this change needed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix/mask sensitive fields [apisix-dashboard]
Posted by "ysinghc (via GitHub)" <gi...@apache.org>.
ysinghc commented on code in PR #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251#discussion_r2532760372
##########
src/config/i18n.ts:
##########
@@ -19,8 +19,8 @@ import { initReactI18next } from 'react-i18next';
import de_common from '@/locales/de/common.json';
import en_common from '@/locales/en/common.json';
-import zh_common from '@/locales/zh/common.json';
import es_common from '@/locales/es/common.json';
+import zh_common from '@/locales/zh/common.json';
Review Comment:
Its not a fix, just a nitpick, made it in the alphabetical order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix/mask sensitive fields [apisix-dashboard]
Posted by "ysinghc (via GitHub)" <gi...@apache.org>.
ysinghc commented on PR #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251#issuecomment-3540070716
I will add it asap. I am having troubles testing my changes cause my docker container keeps on crashing mid tests, so it might take some time.
sorry for the sloppyness in this PR I will ensure the quality in future contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: mask sensitive fields [apisix-dashboard]
Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung merged PR #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix/mask sensitive fields [apisix-dashboard]
Posted by "ysinghc (via GitHub)" <gi...@apache.org>.
ysinghc commented on PR #3251:
URL: https://github.com/apache/apisix-dashboard/pull/3251#issuecomment-3540053317
Its just consistent with the order that is in the locales folder. Its not a
fix just a small nitpick.
On Mon, 17 Nov, 2025, 6:55 am Baoyuan, ***@***.***> wrote:
> ***@***.**** commented on this pull request.
>
> Another test is needed to verify the password input field switching
> between showing and hiding.
> ------------------------------
>
> In src/config/i18n.ts
> <https://github.com/apache/apisix-dashboard/pull/3251#discussion_r2532398260>
> :
>
> > import es_common from '@/locales/es/common.json';
> +import zh_common from '@/locales/zh/common.json';
>
> Why is this change needed?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/apisix-dashboard/pull/3251#pullrequestreview-3470652442>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A7YM4NMT37NNZ5DUNBX54G335EPZ3AVCNFSM6AAAAACLZ2IYIWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTINZQGY2TENBUGI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org