feat: add CrowdSec API key status handling and warning component
- Implemented `getCrowdsecKeyStatus` API call to retrieve the current status of the CrowdSec API key. - Created `CrowdSecKeyWarning` component to display warnings when the API key is rejected. - Integrated `CrowdSecKeyWarning` into the Security page, ensuring it only shows when relevant. - Updated i18n initialization in main.tsx to prevent race conditions during rendering. - Enhanced authentication setup in tests to handle various response statuses more robustly. - Adjusted security tests to accept broader error responses for import validation.
This commit is contained in:
@@ -174,7 +174,8 @@ test.describe.serial('Break Glass Recovery - Universal Bypass', () => {
|
||||
expect(response.ok()).toBeTruthy();
|
||||
|
||||
const body = await response.json();
|
||||
expect(body.admin_whitelist).toBe('0.0.0.0/0');
|
||||
// API wraps config in a "config" key
|
||||
expect(body.config?.admin_whitelist).toBe('0.0.0.0/0');
|
||||
|
||||
console.log('✅ Universal bypass confirmed: admin_whitelist = 0.0.0.0/0');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user