kibana/x-pack/test/api_integration/apis/synthetics/index.ts
Kibana Machine 0b193ec81e
Unauthorized route migration for routes owned by obs-ux-management-team (#198374)
### Authz API migration for unauthorized routes

This PR migrates unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```

### What to do next?
1. Review the changes in this PR.
2. Elaborate on the reasoning to opt-out of authorization.
3. Routes without a compelling reason to opt-out of authorization should
plan to introduce them as soon as possible.
2. You might need to update your tests to reflect the new security
configuration:
  - If you have snapshot tests that include the route definition.

## Any questions?
If you have any questions or need help with API authorization, please
reach out to the `@elastic/kibana-security` team.

---------

Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-11-21 17:03:55 -05:00

41 lines
1.8 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esDeleteAllIndices = getService('esDeleteAllIndices');
describe('Synthetics API Tests', () => {
before(async () => {
await esDeleteAllIndices('heartbeat*');
await esDeleteAllIndices('synthetics*');
});
loadTestFile(require.resolve('./synthetics_api_security'));
loadTestFile(require.resolve('./edit_monitor_public_api'));
loadTestFile(require.resolve('./add_monitor_public_api'));
loadTestFile(require.resolve('./synthetics_enablement'));
loadTestFile(require.resolve('./get_filters'));
loadTestFile(require.resolve('./enable_default_alerting'));
loadTestFile(require.resolve('./get_monitor'));
loadTestFile(require.resolve('./add_monitor'));
loadTestFile(require.resolve('./add_monitor_project'));
loadTestFile(require.resolve('./get_monitor_project'));
loadTestFile(require.resolve('./add_monitor_private_location'));
loadTestFile(require.resolve('./edit_monitor'));
loadTestFile(require.resolve('./delete_monitor'));
loadTestFile(require.resolve('./delete_monitor_project'));
loadTestFile(require.resolve('./sync_global_params'));
loadTestFile(require.resolve('./add_edit_params'));
loadTestFile(require.resolve('./add_monitor_project_private_location'));
loadTestFile(require.resolve('./inspect_monitor'));
loadTestFile(require.resolve('./test_now_monitor'));
loadTestFile(require.resolve('./suggestions'));
loadTestFile(require.resolve('./private_location_apis'));
});
}